Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
SniperWoreConverse
Mar 20, 2010



Gun Saliva
So I half eyeballed the thread and didn't see anything like the problem I'm having.

A few months ago I bought an Adafruit Pi 3 IoT starter kit to mess around with. It comes with some basic projects, like blink a light, read info off a chip, etc. I did the blinking light one and part of one where you read data off a digital/analog converter chip (https://www.hackster.io/windows-iot/bright-or-not-v-2-0-30dec8). Some stuff happened and I just now got back to that project.

So before, it built and compiled or whatever, but now when I open the project I get:



What the loving poo poo is this? I know for a fact that's not what it did before, so I figured something was jacked up with the project and I deleted it and redownloaded the source. Same thing. I figure, well, this weirdo version with the Microsoft.IoT.AdcMcp3008 and all that, you have to import that as a sub project or whatever, I don't have time for this I'm going back to the older version. There's an alternate version that doesn't have the Microsoft bus thing -- you just have to write that part of the code yourself and it tells you how. That one shows this same problem where using System; is coming up as an error. The exact error is:

CS0246 C# The type or namespace name 'System' could not be found #are you missing a using directive or an assembly reference?#

I don't get it. It's kind of upsetting because I'm not anything more than a hobbyist coder and I need intellesense to let me know what's up. But according to this project fuckin "strings" are undefined.

Now the thing that really gets me is if create a new, empty IoT solution it doesn't have this issue at all. I guess I could type the whole thing out from scratch, but I'd rather know what is going on to cause this in the first place. Was there some kind of update to the way they want IoT projects set up, and the source code never got updated? Is my install of Visual Studio broken? The only thing I was able to find by googling it was basically "clean the solution" and "reinstall everything." Cleaning didn't do anything and it's gonna be lovely to reinstall. Maybe some update caused it to break?

Another thing is, back then I started a project based off of this one, made a bunch of modifications and stuff, and didn't touch it for like 6 months or whatever. I just now opened it and it absolutely does not have this issue at all. So what the hell is going on?

:iiam: Pretty stumped here. Is this even the thread for this or should I be talking to some intense COBOL goons or something?

Adbot
ADBOT LOVES YOU

SniperWoreConverse
Mar 20, 2010



Gun Saliva
Welp, I think I got it. It seems like there were some pretty heavy changes with a lot of packages since the last time I screwed with any of this.

Basically, I randomly flailed around until I right clicked the project, ended up on "Manage NuGet packages" and then realized there were updates. It was a lot. Like hundreds. After that I was also able to just use NuGet to import Microsoft.IoT.AdcMcp3008. A lot easier than their instructions that involved copying and pasting poo poo all over the place.

So I don't know what I was doing but was still able to at least get to the point where I can get started. So hopefully this might be helpful to someone who sees it.

LRADIKAL
Jun 10, 2001

Fun Shoe

Lord Windy posted:

I have issues with my raspberry pis SD cards corrupting after blackouts and other events. I use it to run several things so it's a pain in the butt when it dies and I have to recompile all my stuff.

Would eMMC be a solution? And if so would it be dooable on a raspberry pi 2 or 3 with ubuntu 16.04? Otherwise are there any other solutions?

https://www.modmypi.com/raspberry-pi/breakout-boards/pi-modules/ups-pico

This seems reasonable

SniperWoreConverse
Mar 20, 2010



Gun Saliva
Another update in my IoT struggles, if anyone cares:

The documentation sucks poo poo.

So I go through the whole thing and finally get to the point where I'm ready to try and run it. There are a couple of errors in the source they give you and also the instructions, but you can kinda look and get a feel for what they were going for. The problem I ran into now was that you need to initialize the analog to digital converter chip, and that requires you to get the actual controller from the system or whatever.

That's in a line like this:
adcController = (await AdcController.GetControllersAsync(AdcMcp3008Provider.GetAdcProvider()))[0];
and it doesn't compile because "await" can only be used in asynchronous methods. Boned. I don't know barely anything about that kind of stuff, but it does look like GetControllersAsync has to run asynchronously. Tacking on that [0] looks very foreign too.

There's also the problem where I don't see anywhere where it shows how to assign the correct pins to this chip. I think I'm going to go back and do the version where you write the code that does all this stuff instead of using Microsoft.IoT.AdcMcp3008 and see if I can get it to work that way. With my luck I've probably broken the chip by now.

Skarsnik
Oct 21, 2008

I...AM...RUUUDE!




Lord Windy posted:

I have issues with my raspberry pis SD cards corrupting after blackouts and other events. I use it to run several things so it's a pain in the butt when it dies and I have to recompile all my stuff.

Would eMMC be a solution? And if so would it be dooable on a raspberry pi 2 or 3 with ubuntu 16.04? Otherwise are there any other solutions?

This comes up every time but there are a few of us here who have experienced zero corruptions since switching to better quality sd cards

In my case Samsung ones, but really just not cheap sandisk ones

Multiple pi, over many years, all getting power yanked

ItBurns
Jul 24, 2007
I agree about the high quality cards avoiding many of the problems. Even the Samsung EVO cards are relatively cheap now. They are also significantly faster, possibly 2-3x if not more in some cases. A high quality USB thumb drive is likely just as reliable as a good SD card and possibly cheaper and faster as well. It's not a solution, per se, but it significantly reduces the likelihood of having issues.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

ItBurns posted:

It's not a solution, per se, but it significantly reduces the likelihood of having issues.

The whole concept of "computer reliability" is one of probabilities. Adjusting the odds is the best you can do.

Skarsnik
Oct 21, 2008

I...AM...RUUUDE!




Pi's can network boot too I think now? So you could drop the card entirely in theory

Never tried it myself

wolrah
May 8, 2006
what?

Skarsnik posted:

Pi's can network boot too I think now? So you could drop the card entirely in theory

Never tried it myself

Huh, so they can...

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net_tutorial.md

Gonna have to give that a shot some time. It'd be nice to have all my Kodi boxes booting from the same image.

Paul MaudDib
May 3, 2006

TEAM NVIDIA:
FORUM POLICE
Net boot is probably the best option nowadays for a Pi3.

For everything except the Pi3 you are SOL though because you need to bootstrap from the SD card. There's no choice there, the SD card contains the GPU blob that starts up the CPU and the rest of the system. You can't netboot when the GPU doesn't know how to start up the network adapter chip.

Get:

Good luck. Corruption is a big problem with RPis. I could never make it work, even with a high-end SD card. These are a few tricks that have come out since those days that might help.

The biggest problem is brownout. The voltage may get low enough that some of the writes to the SD card don't actually "stick", but not so low that the processor dies. So it keeps on trucking and half the writes make it and half of them don't. The power supply voltage can also droop if the Pi starts pulling more current than the adapter can actually supply - at some point it will drop below 5V. Not a huge deal for phones, since they are often dropping down to 3.6V anyway... but it screws the Pi up. Also since the phone is doing its own voltage regulation it also has its own power filtering, and the Pi does not have that built in so it needs a good adapter with a well-filtered output. Noise also gets worse the more current you try to pull from an adapter - so the Pi's power consumption also stresses this characteristic of the adapter.

Also, SD cards are not really meant for sustained random writes, they are meant to be filled up and emptied a couple hundred times and then thrown away. Cheap ones often don't have any wear levelling, so the flash cells can just burn out. So you want to go with a nicer one - everyone seems to have settled on the Samsung EVOs as the best for Pis. Forged SD cards with crap quality are incredibly common, probably the majority of them out there - so buy from a reputable place, not eBay. Not Amazon either - they comingle stock from their sellers, so even a "sold and shipped by Amazon" product may actually be a forgery. Use like Adorama, B&H, or Newegg.

SD cards are also really meant to be used in a camera or other device that can supply continuous power from a battery, and bad things happen if you pull the plug during a write operation. Especially when you are running on an ext4 filesystem - data loss from power failure is a known weakness of ext4 because it delays flushing writes for performance. So ideally you also want some kind of UPS circuit like the one above, and to use ext3, which is slightly slower but much safer in case of power failures.

SD cards are also not meant to hang off into space - normally cameras and phones have a slot to support them. With heat and time the plastic will warp and they will lose contact. This is especially problematic when the RPi is run inside a case, because it traps heat. The low-profile adapter minimizes this as much as possible, there's less leverage hanging off the board and twisting the card.

Basically the SD card was a terrible idea and the Pi would have been so much better if it included some eMMC for bootstrapping. They justified it with "it'll be impossible to brick" but that's bullshit, people manage to use Linux all the time without overwriting their BIOS (nowadays EFI is even mounted into the filesystem by default! as writeable!). Also - we have this little thing called "a JTAG port" that lets us reflash a chip if we need. The actual problem was they wanted to hit their all-important price targets for their marketing copy, so now you get to spend $30 messing with workarounds that kinda-sorta work instead of paying $2 more up front for an onboard 2 GB eMMC chip that solves the problem.

Paul MaudDib fucked around with this message at 00:52 on Dec 31, 2016

YouTuber
Jul 31, 2004

by FactsAreUseless
Anyone familiar with using a Pi for receiving FM signal? I noticed that Kodi has a "Radio" tab on their new UI and was wondering if I could rig up a setup that would allow me to listen to FM radio over my network. My initial searches is drumming up "Software Defined Radio" but I understood this to mean shortwave frequency stuff used by the greybeards. Does this hardware cross over into medium wave frequency now? I'd love to be able to just flip on the radio and listen to it without a huge delay like you get over the internet. We have a great local Football commentary crew in Philly that I'd prefer to listen to rather than get stuck with Joe Buck.

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

YouTuber posted:

Anyone familiar with using a Pi for receiving FM signal? I noticed that Kodi has a "Radio" tab on their new UI and was wondering if I could rig up a setup that would allow me to listen to FM radio over my network. My initial searches is drumming up "Software Defined Radio" but I understood this to mean shortwave frequency stuff used by the greybeards. Does this hardware cross over into medium wave frequency now? I'd love to be able to just flip on the radio and listen to it without a huge delay like you get over the internet. We have a great local Football commentary crew in Philly that I'd prefer to listen to rather than get stuck with Joe Buck.

You can receive FM radio with a pi, but you'll need an FM tuner which it doesn't have built in.

I don't have a short answer for a simple FM tuner with drivers out of the box, but if you go down the "software defined radio" rabbit hole then one of these: https://www.amazon.com/RTL-SDR-DVB-T-Stick-RTL2832U-R820T/dp/B00C37AZXK and GNU radio will let you recieve almost anything under the sun.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
It looks like you should go with software defined radio if you want to get the audio from your Raspbery Pi itself. I expect something like a RPi3 should be able to handle the signal processing needed for decoding FM radio.

If you're fine with just configuring a tuner, there appear a bunch of I2C FM tuner boards that have their own audio output via a headphone jack or line out. You can control these via a Raspberry Pi or anything else that can speak I2C.

You could also always build something like this...

GobiasIndustries
Dec 14, 2007

Lipstick Apathy
What do I need to connect a wireless xbox 360 controller to a pi3?

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

GobiasIndustries posted:

What do I need to connect a wireless xbox 360 controller to a pi3?

You need Microsoft's wireless receiver for Windows:
https://www.amazon.com/Microsoft-Xbox-Wireless-Receiver-Windows/dp/B000HZFCT2

They're usually around $20. Good news is, you only need one of them and you can connect up to 4 wireless 360 controllers to it. You can also find third party clones out there for cheaper, but many have a reputation of crapping out not long after you buy it.

Once you have that connected, it's similar to using a USB connected wired controller.

GobiasIndustries
Dec 14, 2007

Lipstick Apathy

fishmech posted:

You need Microsoft's wireless receiver for Windows:
https://www.amazon.com/Microsoft-Xbox-Wireless-Receiver-Windows/dp/B000HZFCT2

They're usually around $20. Good news is, you only need one of them and you can connect up to 4 wireless 360 controllers to it. You can also find third party clones out there for cheaper, but many have a reputation of crapping out not long after you buy it.

Once you have that connected, it's similar to using a USB connected wired controller.

Nice, thanks! I've got 4 360 controllers but only use 2 of them regularly now that I'm not in college. As long as the Pi plays well with the receiver I should be good to go.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
I bought an Xbox One S controller yesterday. It's an upgrade from the One controller in that it has both a Bluetooth and a wireless receiver but you don't get the wireless dongle with it. I was using it over Bluetooth with Windows 10 last night.

If I buy the the Xbox One version of the Microsoft Wireless reciever will it work with a Raspberry Pi, or am I better off trying to piss around getting a Bluetooth adaptor working in Raspbian?

Here's the version intended for the Xbox One:

https://www.amazon.com/Xbox-Wireless-Adapter-Windows-One/dp/B00ZB7W4QU

I'm streaming from my GPU using moonlight, so if I could get the new controller working in some kind of wireless capacity straight to the Pi then I could play in any room.

As a side note: the Xbox One S controller over bluetooth doesn't seem to have much input lag over Bluetooth. Although I haven't tried any L33T FPS action with it yet it seems very useable.

GutBomb
Jun 15, 2005

Dude?
The Xbox one wireless protocol is encrypted and thus far not a lot of progress has been made at getting it working outside of windows. Bluetooth is your best bet there.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!

GutBomb posted:

The Xbox one wireless protocol is encrypted and thus far not a lot of progress has been made at getting it working outside of windows. Bluetooth is your best bet there.

Cheers! I often wish there was a thumbs-up button on these forums. Hopefully when the upgrade happens they'll plonk one in.

Bleh Maestro
Aug 30, 2003
Anyone have a favorite/best guide for the Raspberry Pi retro game console? Sick of looking for an NES classic.

deong
Jun 13, 2001

I'll see you in heck!

Bleh Maestro posted:

Anyone have a favorite/best guide for the Raspberry Pi retro game console? Sick of looking for an NES classic.

The official one is easy to follow. Image a card, and let it do its thing. I noticed that it really likes to be connected to the internet for the initial setup, and I either glossed over that or it didnt say. I've only set up Rpi2's, so not sure about wifi.

Super Slash
Feb 20, 2006

You rang ?
Dangit, I ordered a JustBoom Digi Zero pHAT which finally came in the post today but I can't get it to work.

I've used LibreELEC, DietPi/Kodi, OSMC and none of them can detect the board. Is there any kind of detection tool out there to check if the GPIO pins are working properly? I haven't done any soldering since I was in high school but I did an alright job of fitting a bank of 40 pins, but I have no idea if that's the issue or not.

EDIT: Well there's a little progress, I can get OSMC to see the soundcard after dicking with the boot config.txt file but the select passthrough device is completely greyed out. So I can get 2.0 sound out of some videos but anything which uses dts etc plays mute.

Super Slash fucked around with this message at 00:31 on Jan 4, 2017

GobiasIndustries
Dec 14, 2007

Lipstick Apathy
A while ago I posted about the Onion Omega2 kickstarter campaign (onion.io). Mine finally showed up and it's actually pretty neat. It's not fast, nor would you use it like a pi for video stuff, but for $24+shipping I got a tiny-rear end linux (based off of Open-WRT) computer and a dock with GPIO ports, wifi, usb, and an arduino with compatible pinouts for uno shields. Wifi was a gigantic pain in the dick to get set up, probably because the web interface is buggy as poo poo right now and forced me to factory reset the unit and config things via cli, but GPIO works from what I've tested, ssh works, and I flashed a sketch to the arduino part of the board and it blinked my test pattern.

GobiasIndustries fucked around with this message at 01:02 on Jan 4, 2017

doctorfrog
Mar 14, 2007

Great.

deong posted:

The official one is easy to follow. Image a card, and let it do its thing. I noticed that it really likes to be connected to the internet for the initial setup, and I either glossed over that or it didnt say. I've only set up Rpi2's, so not sure about wifi.

Ditto this. I don't know about the internet thing, but I think for the sake of convenience it tries to get you to set up your network OOTB, so that once you start adding your completely legally acquired and owned ROMs it can download cover art and metadata for them without further ado.

By all means troll through the experimental section of the installer and try some of the stuff there, too. I use Kodi more than I use just about any other feature, and it's nice to have Tyrian 2000 and Star Control II on my TV.

Skarsnik
Oct 21, 2008

I...AM...RUUUDE!




Super Slash posted:

Dangit, I ordered a JustBoom Digi Zero pHAT which finally came in the post today but I can't get it to work.

I've used LibreELEC, DietPi/Kodi, OSMC and none of them can detect the board. Is there any kind of detection tool out there to check if the GPIO pins are working properly? I haven't done any soldering since I was in high school but I did an alright job of fitting a bank of 40 pins, but I have no idea if that's the issue or not.

EDIT: Well there's a little progress, I can get OSMC to see the soundcard after dicking with the boot config.txt file but the select passthrough device is completely greyed out. So I can get 2.0 sound out of some videos but anything which uses dts etc plays mute.

Stuff like that usually requires an overlay loaded in the config.txt, and possibly disabling any onboard sound

Online documentation for it seems rather lacking though from a quick google

Super Slash
Feb 20, 2006

You rang ?
Well how about that, last week I got in touch with both Justboom and LibreELEC and they've managed to cobble together a version which includes the necessary drivers and bits which were missing and it works!

Pretty drat cool.

tuna
Jul 17, 2003

GobiasIndustries posted:

A while ago I posted about the Onion Omega2 kickstarter campaign (onion.io). Mine finally showed up and it's actually pretty neat. It's not fast, nor would you use it like a pi for video stuff, but for $24+shipping I got a tiny-rear end linux (based off of Open-WRT) computer and a dock with GPIO ports, wifi, usb, and an arduino with compatible pinouts for uno shields. Wifi was a gigantic pain in the dick to get set up, probably because the web interface is buggy as poo poo right now and forced me to factory reset the unit and config things via cli, but GPIO works from what I've tested, ssh works, and I flashed a sketch to the arduino part of the board and it blinked my test pattern.

I'm still waiting for mine to arrive. My shipping notification came 12 days ago but the "track your package" button doesn't work, so no idea when it'll arrive. Can't wait!

tuna fucked around with this message at 09:32 on Jan 11, 2017

Fragrag
Aug 3, 2007
The Worst Admin Ever bashes You in the head with his banhammer. It is smashed into the body, an unrecognizable mass! You have been struck down.
There's no way to run Raspbian or any ARM linux distro on a VM on Windows right? I want to deploy some Pis for an exhibition at school and I'm trying to find a way to adjust the Pis on location without cobbling a monitor/keyboard together.

I was thinking of making a base image where they connect to my phone's hotspot and I SSH into. When I tried that, I couldn't find the IP address it got assigned so I can't SSH into it.

Ideally I'd love to run a VM, set everything up properly and then deploy it but that's not an option I'm guessing.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Seems like you should be able to do it with qemu or bochs or similar.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Use IP Scanner to find the IP. Use ethernet or an always on, you might have issues with an intermittent hotspot.


VMs for Raspbian are totally a thing, but it seems a very silly way of doing it.

Skarsnik
Oct 21, 2008

I...AM...RUUUDE!




I don't have it handy, but I had a script that would read out the ip address on boot, so you could just plug in a pair of headphones and it would tell you :coal:

Mantle
May 15, 2004

Fragrag posted:

There's no way to run Raspbian or any ARM linux distro on a VM on Windows right? I want to deploy some Pis for an exhibition at school and I'm trying to find a way to adjust the Pis on location without cobbling a monitor/keyboard together.

I was thinking of making a base image where they connect to my phone's hotspot and I SSH into. When I tried that, I couldn't find the IP address it got assigned so I can't SSH into it.

Ideally I'd love to run a VM, set everything up properly and then deploy it but that's not an option I'm guessing.

I use dataplicity to manage my pis. Something like this might work?

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

Fragrag posted:

There's no way to run Raspbian or any ARM linux distro on a VM on Windows right? I want to deploy some Pis for an exhibition at school and I'm trying to find a way to adjust the Pis on location without cobbling a monitor/keyboard together.

There are various ARM emulators around, but the problem is there aren't any I'm aware of that emulate the exact hardware in any of the Pi revisions. So you'd still need to do final testing of the image you're trying to create on an actual Pi to verify that the differences between the ARM emulator you used and the actual hardware won't cause things to crash.

This could especially be a problem if the thing you're trying to set up relies on the GPU heavily, you might end up doing things that aren't properly supported by the Pi GPU and then have to fix it.

Fragrag
Aug 3, 2007
The Worst Admin Ever bashes You in the head with his banhammer. It is smashed into the body, an unrecognizable mass! You have been struck down.
I guess I'm an idiot who can't Google. The reason I absolutely need the ability to SSH into the Pis is that they will be immediately start up omxplayer on booting and as far as I can tell, you can't quit it with a keyboard or mouse then. You have to kill the process via the command line.

So once the script is installed to boot the video up, I'm poo poo out of luck unless I can ssh in

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

Fragrag posted:

I guess I'm an idiot who can't Google. The reason I absolutely need the ability to SSH into the Pis is that they will be immediately start up omxplayer on booting and as far as I can tell, you can't quit it with a keyboard or mouse then. You have to kill the process via the command line.

So once the script is installed to boot the video up, I'm poo poo out of luck unless I can ssh in

You don't need to emulate a system to SSH in, and having a VM of the image up won't tell you what the IPs will be at the place you set them up. You should be able to find the IP address of your Pi systems by checking a page on the router's web controls.

Fragrag
Aug 3, 2007
The Worst Admin Ever bashes You in the head with his banhammer. It is smashed into the body, an unrecognizable mass! You have been struck down.
Yeah the vm idea was to make a build, deploy to the Pi. If something goes wrong, adjust the vm and redeploy.

Unfortunately the wifi at school is enterprise grade so I can't simply find their IP on the router web page.

I think I'll just make a base build to connect to my.phone wifi hotspot

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
Perhaps you could add a script which will echo the ifconfig command automatically at startup to a remote website (or some place) that you control? Then you could look at your website on external Internet, work out the internal address of the Pi and ssh in from the LAN.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I got my Pi to hit a page on my website that recorded the IP at one point. If you can't scan for it, you probably also can't access it with SSH, however.

Some other options:

- AutoSSH reverse tunneling using an outside server

- That hotspot idea on your phone

- A dedicated router sitting there somewhere - doesn't need outside access, just your own controllable LAN to plug into

- A "test Pi" where you can set up your image and then swap the SD cards into the production Pi
(can also clone the SD card to deploy to multiple)

- A VM https://grantwinney.com/how-to-create-a-raspberry-pi-virtual-machine-vm-in-virtualbox/ seriously don't do this though

- UART-Serial dongle to directly plug into the serial port on the Pi's GPIO

wolrah
May 8, 2006
what?

apropos man posted:

Perhaps you could add a script which will echo the ifconfig command automatically at startup to a remote website (or some place) that you control? Then you could look at your website on external Internet, work out the internal address of the Pi and ssh in from the LAN.

I was bored, so I threw together this:

code:
#!/bin/bash

submit_url="http://your.server.address/submit"

serialnumber=$(grep Serial /proc/cpuinfo | cut -d " " -f2)
ipaddress=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
interface=$(ip route get 8.8.8.8 | awk '/dev/ {f=NR} f&&NR-1==f' RS=" ")
macaddress=$(ifconfig $interface | awk '/HWaddr/ {print $NF}')

curl --data "serial=$serialnumber&int=$interface&ip=$ipaddress&mac=$macaddress" -m 15 -S -s -o /dev/null $submit_url
No guarantees of quality but it works on my LibreELEC and Raspbian Pis.

It'll gather the serial number of the Pi as well as the information of the primary network interface and submit that data as a HTTP POST. The receiving end of that is up to you.

Set submit_url to wherever you want and put this script somewhere in your boot process after the network is initialized. You could also make it a cron job. If for whatever reason 8.8.8.8 is inaccessible to these hosts you can replace it with any IP address that'll be found on the interface you care about.

wolrah fucked around with this message at 20:43 on Jan 11, 2017

Adbot
ADBOT LOVES YOU

Mantle
May 15, 2004

Fragrag posted:

Yeah the vm idea was to make a build, deploy to the Pi. If something goes wrong, adjust the vm and redeploy.

Unfortunately the wifi at school is enterprise grade so I can't simply find their IP on the router web page.

I think I'll just make a base build to connect to my.phone wifi hotspot

Seriously why would you not use dataplicity for this?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply