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):
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:
create new Application, then add new device “Ethernet Only” with this Dockerfile:
FROM armhf/busybox
CMD [“echo”, “hello”]
changed boot/config.txt to add max_usb_current=1 and safe_mode_gpio=4
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.
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).
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.
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.
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
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?
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.