I'm new here and have a few questions

Hi!

I’m new here and I have a few questions. A Raspberry Pi 4G/LTE Cellular Modem Kit is on the way to me and I am trying to get a head start on working with it.

I am sure some of these questions are silly. My apologies.

  1. I am going to need both cellular data and GPS functionality. From the documentation and examples it isn’t clear if you can do both at the same time. On the other hand, multiple serial ports seem to be enabled so I’d imagine you could. So can you use both the GPS and cellular functions simultaneously?
  2. Is there any way to get a PPS from the GPS so I can get really good time sync?
  3. I plan on using Pexpect to automate setup and initialization and to grab any debug and logging output I need. Has anyone done that? Are there any problems I should look out for?
  4. Power budget. One point of concern I have with these parts is the Pi’s very limited power budget. I need to run a Pi Camera, a USB thermal Camera, and this gadget as well as a Pi 4. Is that too close to the line and how might I mitigate that?

Ok, got the part today and got at least some things working.

I’m able to read from the device and happily get GPS coordinates from it that appear to be correct. It seems to connect pretty quickly (within a few minutes).

Pexpect works as, um, expected. However, cu is a much better choice than minicom (and you can install it with sudo apt-get install cu).

With some experimentation, I determined that both /dev/ttyUSB2 and /dev/ttyUSB3 accept “AT” commands but the other ports do not. No idea why.

Sample (sanitized) output:

pi@raspberrypi(ro):/tmp$ python3 ./gpstest.py --verbose --device /dev/ttyUSB3
Trying to send 'AT', try #1
Saw OK!
Sending AT$GPSP=1 to power on GPS
Saw OK
Sending AT$GPSACP to get current position
Found stuff:  b'005411.000,4800.0000N,12000.0000W,0.8,877.4,3,348.1,0.0,0.0,050821,04,06'
Saw OK
{'COG': '348.1',
 'DATE': '050821',
 'GMTIME': '005411.000',
 'HDOP': '0.8',
 'LATITUDE': '4800.0000N',
 'LONGITUDE': '12000.0000W',
 'NSAT_GLONASS': '06',
 'NSAT_GPS': '04',
 'SPKM': '0.0',
 'SPKN': '0.0',
 'altitude': '877.4',
 'fix': '3',
 'latitude': 48.0,
 'longitude': -120.0,
 'whence': datetime.datetime(21, 8, 5, 0, 54, 11, tzinfo=datetime.timezone.utc)}
Sending AT$GPSP=0 to power off GPS
Saw OK

No idea why the GMTIME field in the results isn’t updating. It would be nice if it would but it isn’t strictly necessary.

Seems to get a fix pretty quickly from power up.

More explorations ongoing.

Ok, mysterious results here.

I am trying to bring up the internet using ECM Mode and it does not seem to work. I suspect that my Sixfab SIM is not properly activated. I would really, really like to get the device working this way, and not through Sixfab core.

I am getting output like this:

AT#USBCFG?
#USBCFG: 0

OK

#STN: 01,00

#STN: 01,00

#STN: 01,00
AT#USBCFG=4
OK
AT+CGDCONT=1,"IP","super"
OK
AT#REBOOT
OK
AT
OK
AT#ECM=1,0
ERROR
AT#ECM=1,0
ERROR
AT#ECM=1,0
ERROR

#STN: 01,00
AT#USBCFG?
#USBCFG: 4

OK
AT#ECM?
#ECM: 0,0

OK
AT+CPIN?
+CPIN: READY

OK
AT+CREG?
+CREG: 0,2

OK
AT+CGDCONT?
+CGDCONT: 1,"IP","super","",0,0,0,0
+CGDCONT: 2,"IPV4V6","ims","",0,0,0,0
+CGDCONT: 3,"IPV4V6","sos","",0,0,0,1
+CGDCONT: 4,"IPV4V6","attm2mglobal","",0,0,0,0

OK
AT#ECM=1,0,"","",0
ERROR

#STN: 01,00

I again suspect that the SIM card is not properly registered and I do not see a way to register a Sixfab SIM without using Sixfab core

Okay, a quick look at the Sixfab connect SIM List and I figured out how to activate the card.

Good news is I turned Internet on the card no problem.

Bad news is I need to figure out how to turn it off now. Then make it reproducible.

Nice that it does a right thing with /sbin/route, I didn’t expect that.