I have a RPi 3 and a Huawei E397 usb dongle with a Ting SIM card; I'm trying to have the Pi itself connect to the internet automatically on startup.

I'm trying to follow this guide but with the APN replaced with Ting's APN "wholesale". I am running into problems:

  • The connection is not automatic; on startup the dongle will just continually try to register to the 4g network but won't actually connect until I log in and run sudo ifup gprs. Even adding that command in /etc/rc.local doesn't seem to work. wvdial seems to have the same limitation. How do I work around this?

  • Even when I do connect manually, the connection will stay connected for a couple minutes, then disconnect and reconnect for no reasons (/var/log/syslog shows pppd hangup and SIGHUP). I'm not sure if this is a power limitation; if the Pi's USB port isn't providing enough power and I'd have to buy a powered USB hub for it to work; are there other possibilities?


1 Answer 1

  • make sure your LTE modem is detected by system and switched by usb_modeswitch to modem mode prior to run ppp script. I, personally, use modem availability check (like described here, see Patch for modem availability after booting part
  • I have the same problem - Pi loses modem after couple of mins of activity. Suspect it's power issues as well .Did you try to use powered hub? Did it fix the problem?

Update!!!* Tip that eventually worked for my E397 modem with no additional powered hub: when modem is detected in system and switched by modeswitch to modem mode, make sure you use serial port which is mapped to PCUI interface among these which belong to modem, this one is usually second serial (or ttyUSB1). You may check needed by running serial terminal to modem and issuing AT^SETPORT? which gives you current configuration (modem reply would be smth like A1,A2;1,2,3,7,A1,A2 - check the part after semicolon) and AT^SETPORT=? which lists available options. Google for details. Once again, use PCUI, not MODEM port in your dial-up script.

  • A powered hub didn't seem to fix the problem sadly :/ we just ended up asking someone in the area (since this was a IoT kinda project) if we could use their wifi. saves us the monthly data cost too :D but we're at their whim now.
    – ieatpizza
    Oct 18, 2017 at 7:09
  • See update, solution is found!
    – DmitryD
    Oct 19, 2017 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.