HSDPA Modem on Raspberry Pi/Emteria 1.1.37

edited April 7 in Supported peripherals

I'm trying to set up a USB modem for a kiosk device, with only partial success.

The modem is a generic Qualcomm device, which can be turned into a serial device with usb_modeswitch from the shell.

I can then directly issue the relevant AT commands from the shell to make it connect.

However, the version of pppd does not seem to be compatible with any of the guides online, and refuses to start a connection. The Emteria install doesn't appear to have a chat binary either.

Ideally I'd like to find/build a working pppd/chat/wvdial (whatever works) connection script that can be run at boot, but I'm not very well versed on which versions of these tools can be built to run in this environment.

Options like the infamous PPPWidget are off the table as (a) It requires Play Store and (b) It allows user interaction, both of which are unsuitable for a kiosk product.

Can someone advise on a correct build of these executables, or appropriate binaries? The existing discussions don't appear to reflect the current version of the tools in question.

Tagged:

Comments

  • Hi @AndyT and welcome to the forum. PPPWidget doesn't neccesarily require Play Store, but I agree that it isn't a good fit for automated deployments. Maybe you can contact the developer of the PPPWidget and ask if something like "reconnect automatically after boot" can be added.

    I think we have a prebuilt pppd binary in our RPi images, but I never used it myself to setup a connection. The chat binary can be found on the internet or built manually, if source is available. For the automation part I'd recommend using our init.d scripts: https://about.emteria.com/knowledgebase/emteria-style-init-d/

  • I've managed to get ppd to start up now, but the pi image is missing the needed chat script. Installing busybox provides chat (and vi and a few other useful things), but either my pppd config or chat script is wrong as I get this in logcat:

    pppd    : LCP: timeout sending Config-Requests
    pppd    : Connection terminated.
    pppd    : Modem hangup
    pppd    : Exit.
    

    If anyone has had recent success with usb modems, I'd be grateful for your experiences.

  • @AndyT can you share your pppd config and chat script, so that people can take a look?

  • I'm slowly resolving the problems, using busybox to fill in the gaps:

    This for my conf-pppd (very conservative)

    ttyUSB0
    115200
    nocrtscts
    debug dump
    noauth
    # modem
    defaultroute
    noipdefault
    
    remotename 3gppp
    ipparam 3gppp
    
    # No ppp compression
    novj
    novjccomp
    noccp
    nopcomp
    noaccomp
    default-asyncmap
    ipcp-accept-local
    ipcp-accept-remote
    local
    
    usepeerdns
    persist
    hide-password
    connect /etc/ppp/peers/ppp-dialer
    

    And this for the ppp-dialer script:

    #!/system/bin/sh                                        
    
    chat \                                                  
      TIMEOUT 3         \                                   
      ABORT   'BUSY'    \                                   
      ABORT   'ERROR'   \                                   
      ''      AT        \                                   
      OK      'ATZ'     \                                   
      OK      'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0'    \      
      OK      'AT+CGDCONT=1,"IP","3internet"'        \      
      OK      ATD*99#   \                                   
      CONNECT ' '                                           
    

    The network is now coming up, so I can ping 8.8.8.8 and nslookup google.com. However, ping google.com returns a cannot find domain error, and the normal browser reports I'm not connected to the internet.

    For some reason, if I getprop | grep dns it tells me that my net1.dns is 4.4.4.4 - which doesn't connect. So there is some sort of problem with the dns resolution and this is being reset when the connection comes up. I'm not clear where this is configured in the Emteria install?

  • One step closer...

    The config command needed to get general dns working from the shell is:

    ndc resolver setnetdns ppp0 8.8.8.8 8.8.4.4
    

    Then it is possible to ping any url.

    However Android still seems to think the device is disconnected, and specifically the browser reports net:ERROR_INTERNET_DISCONNECTED when I try to visit any page.

    This is painful.

Sign In or Register to comment.