Modem Profiles on Opal

I purchased a Spitz X750 and have had a pleasant experience with the GL modem manager connecting over LTE on reboots to visible without any problems.

Needing another travel router, I purchased an Opal with a USB to MiniPCIe enclosure with another EC-25af, but always have to log into the router, click disconnect, then click ‘manual setup’ to connect on every bootup.

I looked at gl_modem and a few topics on the forums, but I have not found any information on setting “manual setup” as the default connection. “Auto setup” does not connect successfully on the Opal.

Is there a feature to select “Auto Setup” as profile 1 and “Manual Setup” as profile 2, then select which profile to use or make default?

I can connect from the CLI using gl_modem -B 1-1 connect serial /dev/ttyUSB3 VSBLINTERNET, but gl_modem -B 1-1 disconnect or ifdown modem_1_1 does not change/disconnect the initial connection attempt on the Opal in the GL GUI. I still have to log into the router and disconnect the LTE connection manually on every boot.

If a script fix is available, that would be fine in 3.215, but maybe on your next firmware update, you can allow the GL modem manager to select “profile 2” to connect with the “manual setup” settings instead of “auto setup” on non-LTE models. The GL-X750 works perfectly.

First of all, there is currently only one configuration saved on the interface and the manual setup will only override the auto setup. Therefore it is not necessary to set “Manual Setup” as the default.

We’ll check which step is faulty. I think it should be connected using the previous configuration rather than going through the automatic configuration again.
But the problem could also be in the external module compatibility. Simply making the connection at boot-up does not work.

When you open “Manual Setup”, are the values of the settings on the page the same as the ones you configured before?

Yes. The APN was the only setting added on the initial configuration and it connected fine with manual setup.

The EC-25af works fine with the Opal other than getting stuck on auto connecting on a reboot, requiring a login to disconnect, click manual setup, then apply. It stays connected and works normally after that.

And I just looked at AT+CGDCONT? after a reboot and the APN is correct, but no IP address info is showing, requiring me to press “abort”, then connect with the manual setup, which connects successfully.

Just to follow-up, I went ahead and reflashed 3.215 and did not keep any settings, but after configuring manual setup, the same symptoms are still there after the 1st reboot.

I left the operator at “Auto” instead of setting “Visible” this time, changed device from ttyUSB4 to ttyUSB3 and replaced vzwinternet with VSBLINTERNET. It connected normally and the Internet was active. Upon rebooting, no IP information was listed and I had to click abort. Clicking on “manual setup” and apply connected normally. I rebooted a few times and it did not connect successfully on any reboots automatically.

So to summarize, a fresh install of 3.215 connects normally with “manual setup” and stays connected for hours with no problem.

When I click “auto setup”, no ip information is displayed and I have to click abort. The APN in “manual setup” is changed back to vzwinternet and has to be replaced again with VSBLINTERNET after I click “auto setup”, but the APN is not changed on reboots after successfully connecting with “manual setup”.

I am posting now from the Opal, so connectivity is working perfectly with “manual setup”.

Another bit of information I just noticed is that in Luci under Network>Interfaces, on a reboot, the modem_1_1 interface shows “network device not present” but that message disappears after I click “abort” in the GL GUI.

It looks like there is a compatibility issue. When the router boots up, the interface is enabled before the USB modem is successfully loaded.

I’m not sure compatability is the issue. When researching the problems on the forums, I found the following post:

On my X750, I can remove the internal sim card and connect automatically on reboots by changing glconfig to modem 1-1, using the same modem from the Opal . When I use the USB to mini-pcie enclosure on the X750, the modem name and IMEI are blank, but the IP information is present and it connects and surfs normally on reboots, just like the internal ec25-af.

I noticed another post where GL support recommended adding gl_modem auto-connect & to rc.local to fix an auto connect issue. Are you aware of any GL or Openwrt commands that I can use to “abort” the auto connect, then use gl_modem -B 1-1 connect serial /dev/ttyUSB3/ VSBLINTERNET?

My only goal on the Opal is to not have to login to the GL GUI and click “abort>manual setup>apply” on bootup/reboot.

You can try /etc/init.d/network reload command. it should abort and reconnect.

Or you can try using our API, you can use curl to call the following three interfaces to perform the same actions on the page:


For example

curl -k -d 'pwd=goodlife'
# respond token 4ffe721d295e448a847bbad0f13cf469
curl -k -H 'Authorization:4ffe721d295e448a847bbad0f13cf469' -d 'bus=1-1.2&modem_id=3&disable=true'
curl -k -H 'Authorization:4ffe721d295e448a847bbad0f13cf469' -d 'bus=1-1.2&modem_id=3&device=%2Fdev%2FttyUSB3&service=umts&apn=aaa&pincode=&ath=NONE&dianum=&username=&password=&proto=auto&ttl=&mtu=1428&operator='

The actual parameters can be checked by pressing ctrl+shift+i in your browser to open the Developer Debugging Tool to view the interface calls.

Thanks for the API information! I have the following diagnostic script in my rc.local, but it looks like the GL modem manager script is running after rc.local, so the same problem is still present. I can run rc.local after the Opal is booted and all of the commands work fine, connecting normally.

/usr/bin/gl_led blue_flash normal
sleep 15
#Get GL.Inet API Token 
curl -k -d 'pwd=goodlife' > /var/tmp/routerapi

#Filter API Token To File
sed 's/.*"token":"\{0,1\}\([^,"]*\)"\{0,1\}.*/\1/' /var/tmp/routerapi > /var/tmp/routertoken

#Set Token Variable
tokenapi=$(cat /var/tmp/routertoken)

#Add Token To Modem Command
echo "curl -k -H 'Authorization: $tokenapi' -d 'bus=1-1&modem_id=3&disable=true'" > /var/tmp/routerhangup

#Make Modem Command Executable
chmod +x /var/tmp/routerhangup

#Hangup Modem
/usr/bin/gl_led both_flash normal
sleep 10
#Connect Modem
gl_modem -B 1-1 connect serial /dev/ttyUSB3 VSBLINTERNET

Oddly enough, your 3rd command produces the same stuck on abort symptoms with no IP information using the updated APN, so I used the gl_modem command to connect. It did create a new interface though when I left your defaults on bus 1-1.2 initially before changing it to bus 1-1.

curl -k -H 'Authorization:4ffe721d295e448a847bbad0f13cf469' -d 'bus=1-1&modem_id=3&device=%2Fdev%2FttyUSB3&service=umts&apn=VSBLINTERNET&pincode=&ath=NONE&dianum=&username=&password=&proto=auto&ttl=&mtu=1428&operator='

I added the LED light patterns to let me know when my commands are running and even added the sleep commands to see if that would help, but no luck.

After a reboot, I still see the “abort” button with no IP information and in Luci, I am still seeing “network device not present” for the modem_1_1 interface. I can run /etc/rc.local at that point and it hangs-up the modem and connects normally with all of the commands, leading me to believe the GL modem manager is kicking off its initialization script after rc.local is run.

If you let me know which file the GL modem manager uses to connect the modem, I would like to add /usr/bin/gl_led blue_flash fast to confirm that it is running after the light combinations in rc.local.

Your API solution does work, but I just have to run the commands after the GL modem manager attempts to connect.

The bus should be the parameter that the actual interface calls when you operate on the interface. What I have provided is just an example.

I think you should increase the sleep time. Try putting the script in a file like /usr/reboot_modem first, then add sleep 300 && /usr/reboot_modem.
If that works, try reducing sleep again.

Finally, as an extra question, have you tried the 4.x version of the firmware?

Thanks! I was able to move the commands to a separate file and add /etc/config/ & in rc.local, sleeping for at least 60 seconds to hangup and connect with the API.

Here is the diagnostic file I used, adding a few more API calls for diags and the Openwrt API token.

/usr/bin/gl_led both_flash fast
sleep 65

#Get GL.Inet API Token 
echo $(curl -k -d 'pwd=goodlife') > /var/tmp/routerapi

#Get OpenWRT Luci API Token
curl -X POST --data ' { "id": 1, "method": "login", "params": ["root", "goodlife"] }' > /var/tmp/wrtapi

#Filter API Token To File
sed 's/.*"token":"\{0,1\}\([^,"]*\)"\{0,1\}.*/\1/' /var/tmp/routerapi > /var/tmp/routertoken
sed 's/.*"result":"\{0,1\}\([^,"]*\)"\{0,1\}.*/\1/' /var/tmp/wrtapi > /var/tmp/wrttoken

#Add Token To GL Modem Commands
echo "curl -k -H 'Authorization: $(cat /var/tmp/routertoken)' -d 'bus=1-1&modem_id=3&disable=true'" > /var/tmp/
echo "curl -k -H 'Authorization: $(cat /var/tmp/routertoken)'" > /var/tmp/
echo "curl -k -H 'Authorization: $(cat /var/tmp/routertoken)' -d 'bus=1-1&modem_id=3'" > /var/tmp/
echo "curl -k -H 'Authorization: $(cat /var/tmp/routertoken)'" > /var/tmp/
echo "curl -k -H 'Authorization: $(cat /var/tmp/routertoken)'" > /var/tmp/
echo "curl -k -H 'Authorization:$(cat /var/tmp/routertoken)' -d 'bus=1-1&modem_id=3&device=%2Fdev%2FttyUSB3&service=umts&apn=VSBLINTERNET&pincode=&ath=NONE&dianum=&username=&password=&proto=3g&ttl=&mtu=1428&operator=Visible'" > /var/tmp/

#Make Modem Command Executable
chmod +x /var/tmp/*.gl

#Hangup Modem

/usr/bin/gl_led blue_flash fast
sleep 5

#Connect Modem
#gl_modem -B 1-1 connect serial /dev/ttyUSB3 fdd_lte VSBLINTERNET

/usr/bin/gl_led white_flash fast
sleep 10

#OpenWRT Luci API Calls
curl -X POST$(cat /var/tmp/wrttoken) -d ' { "id": "1", "method": "get_all", "params": ["network"] }' > /var/tmp/network.txt

exit 0

I did install beta 4.1.1 beta1 on the Opal for a day, but the GL API gave a 403 error using the same login, even on a uboot flash. The modem had the same symptoms and required clicking Abort>Manual Settings>Apply. Even a soft reboot of the modem did not connect successfully under modem tools. Also, I saw more light activity going from blue breath to white when the modem auto-reconnected. The beta firmware reconnected fine, but it happened frequently, where firmware 3.215 fixed all of the problems with visible and stays connected for hours with a solid white light. The modem was not as reliable under the beta.

The reboot graphics on the beta also need to be changed to the blue theme colors, but I liked the many changes in the UI for the beta. The additional options are nice.

I would recommend adding a 3-place toggle switch for (auto connect on | auto connect off | auto soft connect) in the modem GUI for ease of use. The API /modem/set/ command looks like it creates a new interface every use, resetting all interface defaults on modem_1_1. Having the soft connect option use the “gl_modem connect” command or use the manual settings exclusively to keep interface customizations in place between reboots would be convenient.

Thanks again! The API script does hangup and connect normally, making the Opal plug-n-play with LTE connections, just like the X750 Spitz. Firmwares before 3.215 had many problems resolved by your fixes on both routers with Visible. Instead of a bunch of AT commands to configure, 3.215 is just updating the APN to connect. I just plug it in and it works over LTE!