I’ve been trying to get my new PiAware device working, and I’m having problems just getting the Pi to connect to my network. So a really basic question: Does the Pi boot of the SD card from scratch each time?
I think I initially mis-configured the WiFi setting. So I updated the piaware-config.txt file. But it’s not clear to me those changes are “sticking” when I plug the card back into the Pi and power up.
There is a note in /etc/piaware.conf that states “If /boot/piaware-config.txt exists, then settings present in that file will overide settings in this file.” It is safe to delete /boot/piaware-config.txt if it exists.
So it SHOULD BE the case that each time I power-up the Pi, it reads the /boot/piaware-config.txt file and applies it? That does not seem to be what’s happening, though.
Is there another way to connect to the Pi Zero if the WiFi settings are wrong? Or is there a way to tell the Pi to abandon anything previously remembered and start from scratch reloading from the SD card?
An RPi Zero W does not have an Ethernet port.
There is a USB/Ethernet dongle.
What tcp/ip configuration do you have for your Wi-Fi?
Is your router configured to issue an IP or otherwise allow a connection fron the RPi?
What is the network configuration in the text file wpa_supplicant.conf?
I’m not familiar with a Pi Zero W, so I can’t help you further other than pointing you at this tutorial.
Easy and sure solution: re-image microSD card with piaware sd card image, and while the microSD card is still in card reader of your Laptop / Desktop, click on its drive letter, then open file piaware-config.txt.Scroll down till you see following two lines:
(1) replace MyWifiNetwork with the name of your WiFi (aka the SSID of your local network)
(2) replace s3cr3t with the password to your WiFi
IMPORTANT
After editing the file piaware-config.txt, make sure to SAVE the edited file. If you forget to save the file after editing, the changes you made will disappear.
Slip out microSD card from card reader, slip into RPi and power up.
So I need to reflash the SD card? I can’t just edit the config file on the SD card and expect the Pi to reload from that? That’s a little strange to me, but I can see how that makes sense.
It does put a premium on getting the config settings right the first time
Well the flasher won’t open my SD card, so I ordered another, should arrive tomorrow. I tried the instructions to reformat the card, it shows up with the proper format and not locked, but the flasher still won’t open the volume.
Yes, both using DiskUtility and then with the command line string as recommended by Balena in their FAQ: diskutil eraseDisk FAT32 UNTITLED MBRFormat /dev/diskN (where “N” is the device number for the SD card.)
generally, my recommendation is “once an SD card is reluctant to work, throw it in the trash”. These things are consumables and there are so many fake / broken / purely QA’ed cards out there… and these are the most frustrating bugs to try to track down.
Yeah, replacement cards due tomorrow… But it doesn’t quite feel like a problem on the card, because the Flasher finds the card, can display the contents (directory info), but I can’t select that card for flashing. That feels more like an OS problem.
If you are using a Mac computer, try the SD card formator by SD Association (linked in my post above). It is available for Mac & Windows. Hopefully it will solve your problem.
@DavidEmery if you want to check if the problem is with Balena Etcher rather than the SD card, an alternative to @abcd567 's suggestion that is very robust on the Mac is Raspberry Pi Imager. https://www.raspberrypi.com/software/
While normally used for creating Raspberry Pi OS images, it is capable of flashing third party images including the Piaware one.
I’ve just confirmed this by using it to flash the Piaware Image to an SD card using an M1 Pro series Mac and booting the card on RasPi 4B:
Download and run Raspberry Pi Imager - select your Raspberry Pi Device type and the Storage location of the SD card.
To choose piaware image, click the Operating System button and then the Use custom option at the bottom of the list. This will let you navigate to the location of the image in the unzipped Piaware folder.
Click Edit Settings - Under the GENERAL tab, set the name for this Pi and your desired username and password. You don’t need to select Configure wireless LAN here (but it doesn’t hurt if you do - but you still need to manually edit piaware-config.txt later.
After the card is flashed it is dismounted - remove and reinsert the card to mount it in the Finder. Then double-click piaware-config.txt on the boot volume to open it in TextEdit
Edit the following lines of the file with the correct SSID and password for your WiFi network.
wireless-ssid MyWifiNetwork
wireless-password s3cr3t99
Save the file and eject the boot volume. Once the SD card is booted in your Pi and you have worked out its IP address you should get the following when viewing that IP in a browser on the same network (noting that I didn’t have a receiver attached to test this):
That’s helpful! I know the Mac side, but not the Raspberry Pi side. New SD cards arriving today, I’ll try this approach to loading the image. Thanks!
The one thing I’m not sure about is how the FlightAware packaged OS handles the SD. Is the OS installed into on-board memory by the initial load from the SD card? If so, is there a way to force the OS on the Pi to reload itself? It could be the logic in the Pi’s bootloader is something like “Check if there’s an SD card. If so, check if there’s the magic cookie that says ‘reload the OS from this card’.” Then after that happens, the new OS image goes back to the SD card and erases/changes that ‘magic cookie’.
Well now I’m totally stumped. Here’s what I’ve tried:
Loaded both FlightAware (FA) image and vanilla Raspberry Pi image using both the Raspberry Pi Imager software, and reloaded the FA image with the Balena Etcher software. (3 different scenarios.) The behavior of the Pi is a bit different with the Balena imager, the blinky light kinda implies it’s loading the image. I don’t see that with the boot image from the Raspberry Pi imager.
Anyway, from -every one of those-, I still don’t see the device show up on my router. That’s a bit different from before, where the device showed up, but with no IP address.
Now I’m not quite ready to blame the hardware, but I’ve kinda run out of things to try at this point. Suggestions VERY Welcome. (I do have a bit of experience with Arduino, but there’s enough differences with Raspberry Pi that I don’t know if there’s a way to connect to the Pi with a USB cable and talk to it via Serial, like I can do with an Arduino.)
The one thing I have not tried yet is to load a vanilla Raspberry Pi OS using the Balena loader. Oh, and I have tried these things with 2 different Micro SD cards.
Is there a way to force the Pi hardware to a full reset?
I’ve tried with both static IP on my IoT network and with DHCP on my trusted network. No luck either way. The IoT network is 2.4 only, the trusted network is both 2.4 and 5 ghz.