SD Card problems installing Chirpstack OS

First, I’m a noob. But while following the first few steps of installing the Chirpstack OS on RasPi 4 utilizing sd card and wifi only (not ethernet), I see strange behavior with the SD Card in which it seems to retain information after what I think should be a clean reinstall.

First I use balenaEtcher to load the Chirpstack OS image to the SD card. I put it int the rpi4 and follow the directions, connecting to the AP successfully. I specify my wifi network and resent the router password and allow the system to restart.

For my first attempt, I think I made some kind of mistake in setting my wifi credentials in LuCI and could not subsequently contact the rpi either on my wifi or on the AP. (I’ve also been successful in following the directions with other fresh SD cards but this post is about the weird behavior that occurs when a redo is attempted).

So I try to start over and this is where the strange behavior begins. If I start with a fresh SD card all goes as expected.

But if I use the same SD card over again, reflashing it with balenaEtcher I can’t contact the LuCI on the Access Point. I connect a keyboard and monitor, run “uci show wireless” and I see my local WiFi with password listed. This I don’t expect it to retain my wifi credentials after reflashing the previously flashed SD card. But now I have some evidence it retains information from the previous AP session where I loaded my local WiFi. This behavior occurs even after formatting the SD card with Mac diskutil (which recovers its full SD card size) and again reflashing with balenaEtcher.

I tried writing large files to the diskutil formatted SD card and it still didn’t work but got different results at the OpenWrt command prompt: no information was listed by the “uci show wireless” command.

Most recently, I installed on the previously mis-used SD card an RasPi OS with the RasPi imager, used the card to boot the rpi4, then used balenaEtcher to load the Chirpstack OS image and it worked as expected. So at least once, loading RaspPi OS seemed to bring the SD card back to a state suitable for Chirpstack OS use.

I’m still isolating the procedure to recover a previously used SD (with some kind of mistake) card to repeat an install of Chirpstack OS, but clearly there is something strange happening.

I’ve seen a few other posts (that appear unresolved) describing similar behavior.

Maybe this info is helpful to someone more experienced in determining what’s happening and why a previously (mis)used SD card formatted and re-flashed with balenaEtcher is capable of retaining local wifi settings (as observed by “uci show wireless”), and ostensibly retaining whatever mistake was made constituting “mis” use.

Hi there,

in my experience, an SD retaining data is a sign of failure. Flash memory fails “read only”, meaning you cannot alter/delete data.
I have mostly witnessed complete fails:

  1. Mount sd card
  2. Write file, view file, all ok
  3. unmount sd card
  4. remount sd card
  5. file no longer there

Maybe you have an SD card that can wear level and the reflash triggers it?
Very strange behaviour…

Regards Luke