4

Trying to use this hat to get internet access on a Pi 2. Followed this tutorial. But, I can't seem to get it to work.

What's weird (to me), is if I'm connected to the LAN through ethernet, I get different results.

If I'm connected to the LAN and run sudo pon fona, I get a ppp0 interface, but the Pi doesn't appear to be using this interface. If I disconnect the ethernet cable, ping adafruit.com gives me ping: unknown host adafruit.com. cat /var/log/syslog | grep pppd shows this.

Using a Cricket BYOP SIM in the U.S.

Mar 23 16:31:07 bjn-desktop pppd[2108]: PAP authentication succeeded
Mar 23 16:31:07 bjn-desktop pppd[2108]: sent [CCP ConfReq id=0x9 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Mar 23 16:31:07 bjn-desktop pppd[2108]: sent [IPCP ConfReq id=0x11 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Mar 23 16:31:07 bjn-desktop pppd[2108]: rcvd [IPCP ConfReq id=0x1]
Mar 23 16:31:07 bjn-desktop pppd[2108]: sent [IPCP ConfNak id=0x1 <addr 0.0.0.0>]
Mar 23 16:31:07 bjn-desktop pppd[2108]: rcvd [LCP ProtRej id=0x0 80 fd 01 09 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Mar 23 16:31:07 bjn-desktop pppd[2108]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
Mar 23 16:31:07 bjn-desktop pppd[2108]: rcvd [IPCP ConfRej id=0x11 <compress VJ 0f 01>]
Mar 23 16:31:07 bjn-desktop pppd[2108]: sent [IPCP ConfReq id=0x12 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Mar 23 16:31:07 bjn-desktop pppd[2108]: rcvd [IPCP ConfReq id=0x2 <addr 0.0.0.0>]
Mar 23 16:31:07 bjn-desktop pppd[2108]: sent [IPCP ConfRej id=0x2 <addr 0.0.0.0>]
Mar 23 16:31:07 bjn-desktop pppd[2108]: rcvd [IPCP ConfReq id=0x3]
Mar 23 16:31:07 bjn-desktop pppd[2108]: sent [IPCP ConfAck id=0x3]
Mar 23 16:31:10 bjn-desktop pppd[2108]: sent [IPCP ConfReq id=0x12 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Mar 23 16:31:10 bjn-desktop pppd[2108]: rcvd [IPCP ConfNak id=0x12 <addr 10.119.15.9> <ms-dns1 192.168.194.10> <ms-dns2 192.168.195.10>]
Mar 23 16:31:10 bjn-desktop pppd[2108]: sent [IPCP ConfReq id=0x13 <addr 10.119.15.9> <ms-dns1 192.168.194.10> <ms-dns2 192.168.195.10>]
Mar 23 16:31:11 bjn-desktop pppd[2108]: rcvd [IPCP ConfAck id=0x13 <addr 10.119.15.9> <ms-dns1 192.168.194.10> <ms-dns2 192.168.195.10>]
Mar 23 16:31:11 bjn-desktop pppd[2108]: Could not determine remote IP address: defaulting to 10.64.64.64
Mar 23 16:31:11 bjn-desktop pppd[2108]: not replacing default route to enxb827eb7a014d [192.168.0.1]
Mar 23 16:31:11 bjn-desktop pppd[2108]: local  IP address 10.119.15.9
Mar 23 16:31:11 bjn-desktop pppd[2108]: remote IP address 10.64.64.64
Mar 23 16:31:11 bjn-desktop pppd[2108]: primary   DNS address 192.168.194.10
Mar 23 16:31:11 bjn-desktop pppd[2108]: secondary DNS address 192.168.195.10

If I'm not connected to ethernet, and run sudo pon fona, I get no interface, and the Pi recieves a termination request from peer:

Mar 23 17:21:41 bjn-desktop pppd[1331]: PAP authentication succeeded
Mar 23 17:21:41 bjn-desktop pppd[1331]: sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Mar 23 17:21:41 bjn-desktop pppd[1331]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Mar 23 17:21:41 bjn-desktop pppd[1331]: rcvd [IPCP ConfReq id=0x1]
Mar 23 17:21:41 bjn-desktop pppd[1331]: sent [IPCP ConfNak id=0x1 <addr 0.0.0.0>]
Mar 23 17:21:41 bjn-desktop pppd[1331]: rcvd [LCP ProtRej id=0x0 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Mar 23 17:21:41 bjn-desktop pppd[1331]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
Mar 23 17:21:41 bjn-desktop pppd[1331]: rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
Mar 23 17:21:41 bjn-desktop pppd[1331]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Mar 23 17:21:41 bjn-desktop pppd[1331]: rcvd [IPCP ConfReq id=0x2 <addr 0.0.0.0>]
Mar 23 17:21:41 bjn-desktop pppd[1331]: sent [IPCP ConfRej id=0x2 <addr 0.0.0.0>]
Mar 23 17:21:41 bjn-desktop pppd[1331]: rcvd [LCP TermReq id=0x2]
Mar 23 17:21:41 bjn-desktop pppd[1331]: LCP terminated by peer
Mar 23 17:21:41 bjn-desktop pppd[1331]: sent [LCP TermAck id=0x2]
Mar 23 17:21:44 bjn-desktop pppd[1331]: Connection terminated.
  • Changing the baud rate from 9600 to 460800 fixes the termination problem. And sudo route add default gw 10.64.64.64 gives me internet access. Though not exactly sure why, or how to automate this with pppd. – user43704 Mar 24 '16 at 5:57
2

The link to the tutorial you posted answers your second question for automating the connection.

Edit the /etc/network/interfaces file by executing:

sudo nano /etc/network/interfaces

Then add the following lines to the file:

auto fona
iface fona inet ppp
    provider fona

This configuration will tell your device to bring up the FONA PPP peer automatically on boot. The configuration in /etc/ppp/peers/fona will be used to set up the PPP connection.

Thank you for posting this question and the link to the tutorial. It helped me establish internet connection on startup on my Raspberry Pi B+ (running Raspbian Jessie 2016-05-27) in connection with the Itead SIM800 module.

Edit: For powering on the module on startup you need to add the following lines to a startup script (I added it to /etc/rc.local before the line exit 0)

sudo echo 17 > /sys/class/gpio/export
sudo echo out > /sys/class/gpio/gpio17/direction
sudo echo 1 > /sys/class/gpio/gpio17/value

I found this hint here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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