We are trying out resin and stumbled upon a problem with our 3g modem.
Normally the 3g modem we use can be connected with usb_modeswitch and then wvdial or pppd without a problem.
We followed the example on docs.resin.io/deployment/network/2.0.0/#cellular-modem-setup and run into trouble.
The modem flashes red/blue what indicates “a problem occured” from the modem manual.
I don’t know what resin does in the background to make the modem work so debugging is very difficult.
components:
raspberry pi 3
option icon 451 3g modem
configuration resin-cellular:
-> copied from docs:
changed apn
removed password and username
baud tried different settings that worked before
boot/config.txt
max_usb_current=1
safe_mode_gpio=4
from application terminal:
lsusb:
Bus 001 Device 015: ID 0af0:7701 Option Globetrotter HSUPA Modem (aka icon 451)
What version of resinOS does your device run? If if you take the latest -dev version of the resinOS 2.x release, you could possibly debug further by running in “local mode” - connecting the device over LAN, but also adding the modem, then resin local ssh to the host OS and debug there.
Im running Resin OS 2.0.0+rev3 (prod). Is the terminal on the platform not the same as ssh in the dev? Xan I update the resin-OS remotely? because I can’t find the controls to update the os with the 2 partition system
The dev version keeps things open and let you put the device into local mode as well as lets you ssh in to the host OS as well as the application container. The production version closes down the device (as it is suitable for production) and only lets you connect to the application container (not the host).
There’s no resinOS update remotely for the 2.x series yet. And there won’t be any production -> development version update, since it’s a huge security risk. The development version should be only used for development process as it leaves your device completely open. That’s great for debugging, but not good for a product.
Alternatively, you can try the 3G modem on your development machine with a machine using NetworkManager and adjust the NetworkManager settings until you can connect just fine, and add that file to your resinOS.
Tried it today, flashed the dev image, changed it to local, local ssh.
I notice that the files I update on the sd dont get copied to the resin-boot/ on the host. I dont know if it is supposed to do that?
So I’m not certain if the usb current is stil limited from the config.txt
lsusb is not installed and can’t install it because apt-get is not found
mmcli -L shows “No modems were found”
usb_modeswitch shows:
root@e07de5d:~# usb_modeswitch -v 0x0af0 -p 0x7701 -M
55534243785634120100000080000601000000000000000000000000000000
Look for default devices ...
product ID matched
Found devices in default mode (1)
Access device 026 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
Error: can't use storage command in MessageContent with interface 0;
interface class is 255, expected 8. Abort
What can I try more on the host OS to debug this and why is the boot not copied?
Did you run resin local ssh? That’ll drop you into your container (you should still be able to to see the modem from there, but you won’t be able to debug as well.
To get into the host:
Get the host name: sudo resin local scan
And ssh: ssh root@<hostname>.local -p22222
You can check the connection file is right by going to /etc/NetworkManager/system-connections.
Another thing to check would be network manager logs. journalctl -fu NetworkManager.
Hi @brett - Looks like the modem isnt registering onto the GSM network.
This could be because of
The SIM card being deactivated
Modem not getting enough power
Some sim cards need an unlock code to register onto the network - If this is the case your wvdial config should have the line for unlocking the SIM and a network manager equivalent might be needed.
This modem connects in other setups perfectly with the rpi3 to the network.
it only needs a correct APN normally, no passw or username, the rest of the config files i copied from your documentation.
I never needed more config as the default wvdial example files to get the modems connected with these sims.
the power is reconfigured in the config.txt to allow more usb current, this works in other setups.
The SIM also works, because i unplugged the modem, inserted it in a different pi and voila 3G connection
Hi @brett,
What carrier are you using. It could be that wvdial just adds some “sane” defaults that modem manager doesnt by default. Many carriers just have pretty straightforward username and passw, which are standard and perhaps wvdial is adding them in for you. Are you able to connect this usb modem up using an ubunut laptop?