Initial setup of 3g/4g base hat with Twilio

So I follow the instructions here: Setting up the PPP connection

Below is what I am getting after I run the following command: sudo systemctl status reconnect.service

What do you make of this and how can I resolve?

Jun 13 00:18:54 hostnamexxxx sudo[1252]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 13 00:18:54 hostnamexxxx sh[655]: /usr/sbin/pppd: In file /etc/ppp/peers/provider: unrecognized option '/dev
Jun 13 00:18:54 hostnamexxxx sudo[1252]: pam_unix(sudo:session): session closed for user root
Jun 13 00:19:04 hostnamexxxx sh[655]: ping: SO_BINDTODEVICE: No such device
Jun 13 00:19:04 hostnamexxxx sh[655]: Connection down, reconnecting…
Jun 13 00:19:04 hostnamexxxx sudo[1287]: pi : TTY=unknown ; PWD=/usr/src ; USER=root ; COMMAND=/usr/bin/po
Jun 13 00:19:04 hostnamexxxx sudo[1287]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 13 00:19:04 hostnamexxxx sh[655]: /usr/sbin/pppd: In file /etc/ppp/peers/provider: unrecognized option '/dev
Jun 13 00:19:04 hostnamexxxx pppd[1292]: In file /etc/ppp/peers/provider: unrecognized option ‘/dev/ttyUSB3’
Jun 13 00:19:04 hostnamexxxx sudo[1287]: pam_unix(sudo:session): session closed for user root

I was looking at this article: Raspberry Pi + LTE Base HAT : ttyUSB3 not found and have replaced the USB cable. Still not working. After the PI reboots, I get the red list and blue blinking light until the PI fully boots and then the card/hat shuts down.

Hi Gerald,
when you ran ‘install.sh’ and it asked for a communications port you what did you enter? It should only be ‘ttyXXXX’ and not the whole path.
after a clean boot run these commands and save the output:
ls /dev/tty[A,S,U]*
lsusb -t

hope this helps.
Thanks

for the first command, here is the output:
pi@hostnameXXXX:~ $ ls /dev/tty[A,S,U]*
/dev/ttyAMA0
pi@ostnameXXXX:~ $

For the second command, here is the output:
pi@shostnameXXXX:~ $ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M

what is your build?
e.g. RPi 4, Buster or Stretch
what’s the output of ‘uname -a’
is the hat recognized during boot? ‘dmesg -T | grep tty*’
if you’re not using bluetooth can you unload it for now - /boot/config.txt . add line ‘dtoverlay=pi3-disable-bt’
if you’re not seeing it then the following commands will be useless but good to have them:
ls -l /sys/bus/usb-serial/devices >> gives you the FULL path to each recognized usb device
then you can use -
udevadm info -a -p (device path from above command) >> crawls ALL attributes & subs for the device. Very handy if you want to build symlinks in the rules.d directory.

Need to see the hat recognized before anything else.

Thanks

I do believe i am on buster.

command “uname -a” output: Linux hostnameXXXX 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux

command “dmesg -T | grep tty” : output: $ dmesg -T | grep tty
[Sat Jun 13 21:16:59 2020] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 cma=64M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835. enable_headphones=1 cma=256M smsc95xx.macaddr=DC:A6:32:96:55:51 vc_mem.mem_base =0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,11520 0 console=tty1 root=PARTUUID=1bbb7c13-02 rootfstype=ext4 elevator=deadline fsck. repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[Sat Jun 13 21:16:59 2020] console [tty1] enabled
[Sat Jun 13 21:16:59 2020] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 34 , base_baud = 0) is a PL011 rev2
[Sat Jun 13 21:17:03 2020] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0
[Sat Jun 13 21:17:03 2020] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1
[Sat Jun 13 21:17:03 2020] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2
[Sat Jun 13 21:17:03 2020] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB3
[Sat Jun 13 21:17:54 2020] option1 ttyUSB0: GSM modem (1-port) converter now dis connected from ttyUSB0
[Sat Jun 13 21:17:54 2020] option1 ttyUSB1: GSM modem (1-port) converter now dis connected from ttyUSB1
[Sat Jun 13 21:17:54 2020] option1 ttyUSB2: GSM modem (1-port) converter now dis connected from ttyUSB2
[Sat Jun 13 21:17:54 2020] option1 ttyUSB3: GSM modem (1-port) converter now dis connected from ttyUSB3

Command: ls -l /sys/bus/usb-serial/devices
Output: total 0

yes, buster, RPi3B+ or 4?
the hat is being recognized on boot then being removed.
would you be comfortable uploading your config.txt file & a fresh dmesg boot log?
config.txt location == /boot/config.txt
for dmesg >

  1. sudo dmesg -C, then reboot.
  2. at terminal session: sudo su
  3. dmesg -T > /var/log/dmesglog.txt (or whatever path & file name you like)
  4. exit (gets you out of root)

Thanks

We are on Raspberry PI 4. Here are the files you requested: https://drive.google.com/drive/folders/1bkgE6MwXe5nE3h1AhkHM-Iek1xSNPFu2?usp=sharing

Were you ever able to look at the files I uploaded? Any help would be greatly appreciated.

Can anyone help me with this?

Hi Gerald,
my apologies, “life” got in the way …
in /boot/config.txt - enable / uncomment / remove ‘#’ from
dtparam=spi=on
dtparam=i2c_arm=on

reboot.
rerun previous list (ls) commands.

apologies again for the delayed response.

thanks,
Mark

Gerald,
one other thought you’ve got 2 distinct USB buses now on the RPi4.
just confirm you’re plugged in to bus #1 - USB2.0
also the log shows 2 other devices on that bus. If true, can you remove for troubleshooting and reboot?
Thanks again,
Mark

USB2.0 was a barcode scanner that I just now removed. The “base hat” is plugged into the USB3.0 port. No other USB devices are connected at this time.

pi@squadhwood:~ $ ls -l /sys/bus/usb-serial/devices
total 0
lrwxrwxrwx 1 root root 0 Jun 19 16:49 ttyUSB0 -> …/…/…/devices/platform/scb/f d500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUS B0
lrwxrwxrwx 1 root root 0 Jun 19 16:49 ttyUSB1 -> …/…/…/devices/platform/scb/f d500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/ttyUS B1
lrwxrwxrwx 1 root root 0 Jun 19 16:49 ttyUSB2 -> …/…/…/devices/platform/scb/f d500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.2/ttyUS B2
lrwxrwxrwx 1 root root 0 Jun 19 16:49 ttyUSB3 -> …/…/…/devices/platform/scb/f d500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.3/ttyUS B3
pi@squadhwood:~ $


pi@squadhwood:~ $ ls /dev/tty[A,S,U]*
/dev/ttyAMA0 /dev/ttyS0 /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3
pi@squadhwood:~ $


pi@squadhwood:~ $ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 1: Dev 3, If 1, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 1: Dev 3, If 2, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 1: Dev 3, If 3, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 1: Dev 3, If 4, Class=Vendor Specific Class, Driver=qmi_wwan, 480M

progress!
are the hat & cable rated/compatible with 3.0 or is consuming one of these ports a waste of resources?
i don’t have an RPi4 in my shop but I thought Bus 1 was 2.0 and Bus 2 was highspeed/3.0?
regardless you’ve got your tty ports assigned now on to connectivity.
Best of luck, post back so we know how you made out.
Thanks

So disconnected my eth0, rebooted the PI4, and now I have internet using the “base hat.”

Downside is, this PI is being used for a door system. I use the GPIO pins 2, 6, and 37. PIN 2 is 5v. PIN 6 is ground. PIN 37 is to send a signal to a 5v relay to open or close a circuit. As soon as we got this working, now the 5V relay is getting zero power.

Before, when the device would boot up and we would get power to the 5v relay, the base hat would disconnect. Now the base hat is connecting, the 5v relay isn’t getting power.

just migrated the base hat back to a USB2.0 port and its still working. Still not getting power across the GPIO now though.

powered off the PI4. removed the “base hat” and booted it back up. Now I am getting power to the 5v relay.

Even using a separate power source for “base hat” the base hat powers off as soon as the 5v relay powers up. Which is very odd.

Pin 37 (GPIO 26) is used to power off the LTE hat.
can you use another, spare GPIO for your relay?
check out the schematics for the board here:


Thanks
1 Like