I have a fleet of raspberry pi's running as access points. I set the default SSID and PASSWORD using a simple bash script that runs at boot. I get unique values for this:
SSID = cat /sys/class/net/wlan0/address | tail -c 10 | tr -d ":"
PW = cat /proc/cpuinfo | tail -c 9
I just echo the results on the hostapd file, everything work just fine, each Raspberry Pi get unique SSID and PW. Now I need to generate a JSON file with this values (via bash) in a format like this.
{
"wifi": {
"ssid": "SSID",
"pw": "PW"
}
}
Can anyone shed some light on this?
Regards