I have a very simple procd script for starting/stopping wpa_supplicant that works fine from the command line, but when I reboot I get this error in the syslog: wlan1: mesh join error=-149
After I reboot I have to run /etc/init.d/wpa_supplicant stop and then /etc/init.d/wpa_supplicant start and it works fine.
By the way, I've tried disabling the procd script and and starting wpa_supplicant in /etc/rc.local with the same results. I also put in a sleep to give the interfaces time to come up. I've obviously Googled this before posting, but I have yet to find anything that works.
Is there a reason you’re not letting procd/netifd manage wpa_supplicant? Generally, that manages the orchestration of all the moving pieces quite well without any scripting.
Edit: My first guess is that the interface doesn’t exist when your script runs at boot.
I just started messing with OpenWrt a couple weeks ago and had never heard of netifd until you mentioned it here. All the examples I saw for setting up wpa_supplicant involved writing a procd script like the one I've included, which works fine except during a reboot. I'm not yet sure how to let netifd manage wpa_supplicant and there's next to no documentation out there, so I'm just pretty much winging it for now .
I suspected the same thing about the interface not being up causing the failure, so when I moved the startup of wpa_supplicant to /etc/rc.local I put a sleep command in there to give the interfaces time to intialize and checked that they were there.
With "normal" configuration in /etc/config/wireless and /etc/config/network, no additional scripts should be required for virtually any situation. If you did need to do something "special" (like some unsupported, advanced networking protocol), use of "hotplug" scripts that listen to interface up/down events would probably be a much more robust path.
No, I don't think we're doing anything "special". Just to clarify you're saying if I have /etc/config/wireless and /etc/config/network configured correctly I don't need the /etc/init.d/wpa_supplicant or a wpa_supplicant.conf at all? Assuming the wpa_supplicant-wlan1.conf gets generated based on my settings in /etc/config/network and /etc/config/wireless? I must have missed something because it's definitely not meshing up. I don't see a wpa_supplicant process either and of course no indication on the other mesh point that they connected. Guess I got a little more homework to do. Thanks!
Yes, if I enter opkg list-installed | grep wpad I get wpad-mesh-openssl as a result. Still not generating a wpa_supplicant conf file though when I enter /etc/init.d/wireless reload. According to logread the interface we have set up for the mesh point comes up, but that's where the log messages stop. Almost like it doesn't recognize mesh mode.
Would you post your (redacted) /etc/config/wireless and /etc/config/network? Perhaps there is something there that could use adjustment. The preformatted-text button </> will make it easier to read.