I have a very strange problem. I use a 3G modem to connect my Raspi to the internet. I have a modem Sierra Wireless 307 and use sakis3g script. I also use another script umtskeeper which monitors the connection and when it's down reconnects using sakis3g.
The problem is when I use umtskeeper with exact same command as directly form console I get errors. This runs fine.
- Code: Select all
sudo ./sakis3g connect --console APN='CUSTOM_APN' USBINTERFACE='3' USBDRIVER='sierra' USBMODEM='1199:68a3' OTHER='USBMODEM' MODEM='OTHER' CUSTOM_APN='darmowy' APN_USER='user' APN_PASS='pass'"
I pass the exact same parameters to umtskeeper. When I echo the command used to run sakis3g in umtskeeper script before it is invoked I get the same.
- Code: Select all
echo "$sakisProg $sakisActors $sakisSwitches $sakisOperators"
this outputs
- Code: Select all
sudo ./sakis3g connect --console APN='CUSTOM_APN' USBINTERFACE='3' USBDRIVER='sierra' USBMODEM='1199:68a3' OTHER='USBMODEM' MODEM='OTHER' CUSTOM_APN='darmowy' APN_USER='user' APN_PASS='pass'
When I hardcoded the above it in the umtskeeper script it all goes well. How is it possible? Maybe it's some kind of a bug? It seems that when run from variables there is some error with loading unloading sierra module.