I've been developing an IoT sensor suite based on the RPi, and am about to start shipping the systems to where they're being installed.
Problem is, it's more convenient to use WiFi both during system setup (here in Australia) and when the system is being installed (potentially in other countries) rather than using an Ethernet cable.
TL;DR: is there a way to specify more than one WiFi country code in wpa_supplicant.conf?
Thanks.
Re: Using two WiFi country codes
No. You can't specify multiple countries. Does the end user not pick the country themselves?
You need to change it at the last step of your programming process or have a manufacturing mode where it defaults to Australia.
Re: Using two WiFi country codes
Ok, thanks anyway.
"Does the end user not pick the country themselves?" No, it's a completely headless system; I need to pre-program the appropriate WiFi settings prior to shipping.
"You need to change it at the last step of your programming process" Yep, was just trying to avoid having to do that because my network switch is in a hard-to-reach place and I'm being lazy.

Thanks anyway for the advice.
Re: Using two WiFi country codes
Are you using a preconfigured card image that you write and then alter the WiFi settings? If so then just leave the prebuilt image set to Australia and your SSID details so it'll join your network automatically.ZPMMaker wrote: ↑Sun Mar 22, 2020 10:32 pm"Does the end user not pick the country themselves?" No, it's a completely headless system; I need to pre-program the appropriate WiFi settings prior to shipping.
"You need to change it at the last step of your programming process" Yep, was just trying to avoid having to do that because my network switch is in a hard-to-reach place and I'm being lazy.![]()
An alternative if you only need to configure WiFi before shipping is to copy a wpa_supplicant.conf file to the boot partition after you've written the card. The Pi startup scripts will look for a wpa_supplicant.conf file so people can configure WiFi headlessly.
RonR's RPi-Init tool might be helpful for you.
Re: Using two WiFi country codes
Thanks. I already have the file in the boot partition prior to first boot. Getting the RPi to connect to my WiFi when I first turn it on is not the issue, though.trejan wrote: ↑Sun Mar 22, 2020 10:49 pmAre you using a preconfigured card image that you write and then alter the WiFi settings? If so then just leave the prebuilt image set to Australia and your SSID details so it'll join your network automatically.ZPMMaker wrote: ↑Sun Mar 22, 2020 10:32 pm"Does the end user not pick the country themselves?" No, it's a completely headless system; I need to pre-program the appropriate WiFi settings prior to shipping.
"You need to change it at the last step of your programming process" Yep, was just trying to avoid having to do that because my network switch is in a hard-to-reach place and I'm being lazy.![]()
An alternative if you only need to configure WiFi before shipping is to copy a wpa_supplicant.conf file to the boot partition after you've written the card. The Pi startup scripts will look for a wpa_supplicant.conf file so people can configure WiFi headlessly.
RonR's RPi-Init tool might be helpful for you.
It's ok; I've since climbed up and run a Ethernet cable out of the network switch. Problem solved.
