Cellular Hologram.io issues

raspberrypi3

#1

Hello guys, I’ve been usin Resin for a couple of months now and everything has been going great but now I’m struggling to to add cellular connection so my machine (Raspberry Pi 3) doesn’t need to rely on Wifi availability.

I’m not sure if it’s similar to this issue but I’ve tried some tricks from there:

I have a Hologram Nova modem with a SIM card that works well when tested on my own Ubuntu Linux machine with very basic configuration (file under system-connections):

[connection]
id=hologram-cellular
type=gsm
autoconnect=true

[gsm]
apn=hologram
number=
password=
username=

[serial]
baud=115200

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

I can then connect and navigate well, although I need to connect manually. Then I tried to replicate the same on the R-Pi3 (Resin OS 2.7.8+rev1) doing the following:

  1. create new Application, then add new device “Ethernet Only” with this Dockerfile:
    FROM armhf/busybox
    CMD [“echo”, “hello”]

  2. changed boot/config.txt to add max_usb_current=1 and safe_mode_gpio=4

  3. Added my cellular configuration file (as above) to boot/system-connections
    unplug/plug modem again with the device on

But I still can’t get a connection established. Also tried adding autoconnect-priority, unplugging + plugging the modem while the machine was on, nothing worked.

Any tips? I’m trying to investigate it further but running out of ideas here on how to troubleshoot this.

I suppose it’s not possible to log on to the machine directly via keyboard + monitor, right?

One thing I was thinking was to add wi-fi connection, then try and open a terminal via the dashboard to play around trying to troubleshoot the modem, but I’m not sure which commands could help here and if I should use either the Host OS terminal or the container.

Any help would be appreciated.

Thank you.
Igor


#4

Hi @iggar
I just want to double check, did you add your configuration to the resin-boot/system-connections directory in the OS image as per the documentation here https://docs.resin.io/deployment/network/2.x/#introduction ?


#6

Hi @lucianbuzzo, thanks for your quick reply. Yes, that’s what I meant. Sorry for the typo. I’ve added that to /resin-boot/system-connections/ - the same directory where I drop wifi configuration files (and those work fine when I do).

Cheers,
Igor


#7

A member of our team has had success using the same modem as you.
Can you try using a development os edition and connecting it to Wifi/Ethernet.
You can then use the webterminal to acess the HostOS and run mmcli -L to check that the modem has been discovered.
Additionally, running journalctl -u ModemManager --no-pager in the HostOS will provide some additional information as to what is going on here.


#8

Thanks again, I think I made some progress here. From within the Host OS terminal session I can manually create a bearer and connect. At that point the modem blue LED goes from blinking (meaning network available ) to steady (meaning connected) but that’ s for about 10 seconds before starts blinking again (I assume it disconnected), although the status (running again command mmcli -b 0) still shows as connected.

I then tried to shutdown its wifi (ifconfig wlan0 down) to see if the gsm would hold it but then the machine went offline on the dashboard.

Here’s a dump to the Host OS terminal session:

Connecting to bc88bd6384e9e70f6143f641da9bb5d8...
Spawning shell...
=============================================================
    Welcome to ResinOS
=============================================================
bash-4.3# mmcli -L

Found 1 modems:
        /org/freedesktop/ModemManager1/Modem/0 [u-blox] SARA-U201

bash-4.3# mmcli -m 0 --create-bearer="apn=hologram,user=,password="
Successfully created new bearer in modem:
        /org/freedesktop/ModemManager1/Bearer/0
bash-4.3# mmcli -b 0
Bearer '/org/freedesktop/ModemManager1/Bearer/0'
  -------------------------
  Status             |   connected: 'no'
                     |   suspended: 'no'
                     |   interface: 'unknown'
                     |  IP timeout: '20'
  -------------------------
  Properties         |         apn: 'hologram'
                     |     roaming: 'allowed'
                     |     IP type: 'none'
                     |        user: ''
                     |    password: ''
                     |      number: 'none'
                     | Rm protocol: 'unknown'
  -------------------------
  IPv4 configuration |   method: 'unknown'
  -------------------------
  IPv6 configuration |   method: 'unknown'
  -------------------------
  Stats              |          Duration: '0'
                     |    Bytes received: 'N/A'
                     | Bytes transmitted: 'N/A'
bash-4.3# mmcli -m 0 -c -b 0
successfully connected the bearer
bash-4.3# mmcli -b 0
Bearer '/org/freedesktop/ModemManager1/Bearer/0'
  -------------------------
  Status             |   connected: 'yes'
                     |   suspended: 'no'
                     |   interface: 'ttyACM0'
                     |  IP timeout: '20'
  -------------------------
  Properties         |         apn: 'hologram'
                     |     roaming: 'allowed'
                     |     IP type: 'none'
                     |        user: ''
                     |    password: ''
                     |      number: 'none'
                     | Rm protocol: 'unknown'
  -------------------------
  IPv4 configuration |   method: 'ppp'
                     |  address: 'unknown'
                     |   prefix: '0'
                     |  gateway: 'unknown'
                     |      DNS: none
  -------------------------
  IPv6 configuration |   method: 'unknown'
  -------------------------
  Stats              |          Duration: '0'
                     |    Bytes received: 'N/A'
                     | Bytes transmitted: 'N/A'
bash-4.3#

#9

Additional info: I’m running the dev version, Resin OS 2.7.8+rev1 (dev)


#11

Hey @iggar , One other thing you might want to try is use the latest resinOS from dashboard.resinstaging.io (I tested the nova on Resin OS 2.9.4+rev1 (dev)), which is the new release that should come out later this week. We updated the kernel after 2.7.8


#12

Thanks @shaunmulligan - I’ m now using Resin OS 2.9.6+rev1 (dev) although it still behaves the same in that case.

I’ll carry on trying to figure out what’s wrong with the connection. Please let me know if you have any more ideas.

Thanks


#13

hmm, thats weird. I tested the nova on resinOS 2.9.4 but I never tested connection to hologram, i used Giffgaff ( a UK based carrier). Do you have any other sim cards you could test?


#14

I’ve finally managed to fix the issue with the following configuration:

[connection]
id=hologram-connection
type=gsm
autoconnect=true

[gsm]
apn=hologram
number=*99#

[serial]
baud=115200

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=ignore

which suggests that the issue was due to the missing number value. I’ve also managed to get it working with other carriers (Orange UK and EMnify).

We can now close this issue.

Thanks for the help!
Igor


#15

@iggar that is great news, glad you got it working. The nova is a really nice little modem :slight_smile:


#17

Hello Igor,

How did you manage to connect with other carriers?, did you use the same configuration, adding the number?

edit: I am having trouble getting it connected at boot, if i disconnect the NOVA and i plug it back in it gets connected.

Thanks in advance


#18

Hello @Miguel ,

Yes, I used the same trick (adding the number and changing only the apn from the configuration I posted above). But then I was having the same problem as you just described: the modem wouldn’t connect if I started my script too early. My script is a modified version of BLE Scanner (https://github.com/adamf/BLE/blob/master/ble-scanner.py) started by a shell script.

After a few attempts I got it working by making the script wait until the modem is found and ready. So I’ve added the a “wait for modem” code just before calling my python script and it worked. See if it works for you:

(I’m sorry the code could be improved but I’ve been too busy lately. Suggestions / PRs welcome).

Also please note that from the latest release (2.9.6rev1) I didn’t need the trick to attach the hci interface (/usr/bin/hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -) - it worked without that.

I hope it helps, please let me know.


#19

That did the trick, thanks a lot!!

Miguel