Problem connecting option icon 451 3g modem


#1

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)

ifconfig:
docker0,m eth0, lo, resin-vpn, wlan0

  • NO ppp0 or similar

what can I do to make it work?
Thanks in advance


#2

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.

In the background resinOS is using ModemManager (as mentioned in the docs with more links: https://docs.resin.io/runtime/migrate-to-2.0/#migrating-from-1-x-to-2-0 ), so whatever ModemManager works with, we should be able to work with too.


#3

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


#4

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.


#5

thank you for the explanation, will try it next week.


#6

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?


#7

Hey @brett,

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.


#8

I did type resin local ssh --host to get on the host OS.
I will check those files tommorow.


#9

These are the Networkmanager logs

root@e07de5d:~# journalctl -b -fu NetworkManager
-- Logs begin at Thu 2017-04-13 02:10:29 UTC. --
Apr 13 02:10:42 e07de5d dhclient[828]: RCV: Advertise message on wlan0 from fe80::1:1.
Apr 13 02:10:43 e07de5d dhclient[828]: XMT: Request on wlan0, interval 960ms.
Apr 13 02:10:43 e07de5d dhclient[828]: RCV: Reply message on wlan0 from fe80::1:1.
Apr 13 02:10:43 e07de5d NetworkManager[740]: <info>  [1492049443.6647] dhcp6 (wlan0):   valid_lft 7200
Apr 13 02:10:43 e07de5d NetworkManager[740]: <info>  [1492049443.6649] dhcp6 (wlan0):   preferred_lft 4500
Apr 13 02:10:43 e07de5d NetworkManager[740]: <info>  [1492049443.6650] dhcp6 (wlan0):   address 2a02:1810:3909:de00::1d01
Apr 13 02:10:43 e07de5d NetworkManager[740]: <info>  [1492049443.6651] dhcp6 (wlan0):   nameserver '2a02:1810:3909:de00:20c:29ff:feea:4584'
Apr 13 02:10:43 e07de5d NetworkManager[740]: <info>  [1492049443.6652] dhcp6 (wlan0): state changed unknown -> bound, event ID="eb:32:e6:6d|1492049443"
Apr 13 02:10:49 e07de5d NetworkManager[740]: <info>  [1492049449.1754] manager: (docker0): new Bridge device (/org/freedesktop/NetworkManager/Devices/3)
May 09 14:24:31 e07de5d NetworkManager[740]: <info>  [1494339871.5842] manager: (resin-vpn): new Tun device (/org/freedesktop/NetworkManager/Devices/4)
May 09 14:25:38 e07de5d NetworkManager[740]: <info>  [1494339938.6208] rfkill1: found WWAN radio killswitch (at /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/rfkill/rfkill1) (driver usb)
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.1638] (ttyHS2): modem state changed, 'disabled' --> 'enabling' (reason: user preference)
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.1707] manager: (ttyHS2): new Broadband device (/org/freedesktop/NetworkManager/Devices/5)
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.1723] device (ttyHS2): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.1752] device (ttyHS2): modem state 'enabling'
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.1795] device (ttyHS2): state change: unavailable -> disconnected (reason 'none') [20 30 0]
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.1830] policy: auto-activating connection 'resin-cellular'
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.1911] device (ttyHS2): Activation: starting connection 'resin-cellular' (3ca7ad0d-e56f-3765-a93a-f2ff10fc71de)
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.1920] device (ttyHS2): state change: disconnected -> prepare (reason 'none') [30 40 0]
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.6063] radio killswitch /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/rfkill/rfkill1 disappeared
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.6153] (ttyHS2): modem state changed, 'enabling' --> 'enabled' (reason: user-requested)
May 09 14:25:42 e07de5d NetworkManager[740]: <warn>  [1494339942.6375] modem-broadband[ttyHS2]: failed to connect modem: Network timeout
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.6377] device (ttyHS2): state change: prepare -> failed (reason 'gsm-registration-timeout') [40 120 32]
May 09 14:25:42 e07de5d NetworkManager[740]: <warn>  [1494339942.6427] device (ttyHS2): Activation: failed for connection 'resin-cellular'
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.6476] device (ttyHS2): state change: failed -> disconnected (reason 'none') [120 30 0]
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.6545] policy: auto-activating connection 'resin-cellular'
May 09 14:25:42 e07de5d NetworkManager[740]: <info>  [1494339942.6588] device (ttyHS2): state change: disconnected -> unmanaged (reason 'removed') [30 10 36]
May 09 14:25:49 e07de5d NetworkManager[740]: <info>  [1494339949.8139] rfkill2: found WWAN radio killswitch (at /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/rfkill/rfkill2) (driver usb)
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.1728] (ttyHS2): modem state changed, 'disabled' --> 'enabling' (reason: user preference)
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.1813] manager: (ttyHS2): new Broadband device (/org/freedesktop/NetworkManager/Devices/6)
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.1848] device (ttyHS2): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.1865] device (ttyHS2): modem state 'enabling'
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.1903] device (ttyHS2): state change: unavailable -> disconnected (reason 'none') [20 30 0]
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.1934] policy: auto-activating connection 'resin-cellular'
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.2012] device (ttyHS2): Activation: starting connection 'resin-cellular' (3ca7ad0d-e56f-3765-a93a-f2ff10fc71de)
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.2023] device (ttyHS2): state change: disconnected -> prepare (reason 'none') [30 40 0]
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.5329] radio killswitch /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/rfkill/rfkill2 disappeared
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.5343] (ttyHS2): modem state changed, 'enabling' --> 'enabled' (reason: user-requested)
May 09 14:25:53 e07de5d NetworkManager[740]: <warn>  [1494339953.5600] modem-broadband[ttyHS2]: failed to connect modem: Network timeout
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.5602] device (ttyHS2): state change: prepare -> failed (reason 'gsm-registration-timeout') [40 120 32]
May 09 14:25:53 e07de5d NetworkManager[740]: <warn>  [1494339953.5630] device (ttyHS2): Activation: failed for connection 'resin-cellular'
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.5657] device (ttyHS2): state change: failed -> disconnected (reason 'none') [120 30 0]
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.5720] policy: auto-activating connection 'resin-cellular'
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.5793] device (ttyHS2): Activation: starting connection 'resin-cellular' (3ca7ad0d-e56f-3765-a93a-f2ff10fc71de)
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.5809] device (ttyHS2): state change: disconnected -> prepare (reason 'none') [30 40 0]
May 09 14:25:53 e07de5d NetworkManager[740]: <info>  [1494339953.5977] device (ttyHS2): state change: prepare -> unmanaged (reason 'removed') [40 10 36]
May 09 14:25:53 e07de5d NetworkManager[740]: <warn>  [1494339953.6121] modem-broadband[ttyHS2]: failed to disconnect modem: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.ModemManager1.Modem.Simple' on object at path /org/freedesktop/ModemManager1/Modem/1

#10

Hmm, state change: unavailable -> disconnected (reason 'none') [20 30 0] isn’t very helpful…

Were you using network manager on your previous setup?

I haven’t any experience with modems so I’ll have to ping, @shaunmulligan @lifeeth. Do you guys see any useful errors in those logs?


#11

We already used those modems on different projects either with wvdial or pppd.


#12

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.

#13

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


#14

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?