|
|
@@ -0,0 +1,124 @@
|
|
|
+Raspberry Pi GPRS/GPS notes
|
|
|
+===
|
|
|
+
|
|
|
+I'm focusing on a SIM4320(A) chip:
|
|
|
+
|
|
|
+* [Adafruit](https://www.adafruit.com/product/2687)
|
|
|
+ - [simcom](https://cdn-shop.adafruit.com/datasheets/SIMCOM_SIM5320_ATC_EN_V2.02.pdf)
|
|
|
+ - [sim4320 datasheet](https://www.tinyosshop.com/datasheet/SIM5320_Hardware+Design_V1.07.pdf)
|
|
|
+* [DIYmall](https://www.amazon.com/gp/product/B06Y3N1BD6)
|
|
|
+* [Arduino SIM5320A](https://www.amazon.com/gp/product/B01HNV3ZXC)
|
|
|
+
|
|
|
+GPRS
|
|
|
+---
|
|
|
+
|
|
|
+| Raspberry Pi Pin | FONA Pin |
|
|
|
+|---|---|
|
|
|
+| 3.3v (1) | Vio (4) |
|
|
|
+| GND (6) | GND (3) |
|
|
|
+| TXD (8) | RX (6) |
|
|
|
+| RXD (10) | TX (7) |
|
|
|
+
|
|
|
+On the Raspberry Pi (RPi 3B+, Raspbian 2019-07-10 Buster)
|
|
|
+
|
|
|
+```
|
|
|
+sudo bash
|
|
|
+apt-get update
|
|
|
+apt-get install ppp screen minicom
|
|
|
+
|
|
|
+# disable rpi serial interface so we can use it from FONA
|
|
|
+#
|
|
|
+echo 'enable_uart=1' >> /boot/config.txt
|
|
|
+
|
|
|
+# setup ppp configuration
|
|
|
+#
|
|
|
+cat > /etc/ppp/peers/fona <<EOF
|
|
|
+connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs"
|
|
|
+/dev/serial0
|
|
|
+115200
|
|
|
+noipdefault
|
|
|
+usepeerdns
|
|
|
+defaultroute
|
|
|
+persist
|
|
|
+noauth
|
|
|
+nocrtscts
|
|
|
+local
|
|
|
+EOF
|
|
|
+shutdown -r now
|
|
|
+```
|
|
|
+
|
|
|
+At this point, after reboot, I tested to make sure the serial connection was at least responding to `AT` commands:
|
|
|
+
|
|
|
+```
|
|
|
+sudo bash
|
|
|
+minicom -c on -D /dev/serial0
|
|
|
+AT
|
|
|
+```
|
|
|
+
|
|
|
+* The `AT` command should show up because the FONA should echo the commands
|
|
|
+* The FONA should respond with `OK`
|
|
|
+
|
|
|
+I **think** I only had to add the `enable_uart=1` in the `/boot/config.txt` and wire the serial connection
|
|
|
+for this to work...
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+To setup a `ppp` connection, issuing:
|
|
|
+
|
|
|
+```
|
|
|
+pon fona
|
|
|
+```
|
|
|
+
|
|
|
+as root should work.
|
|
|
+
|
|
|
+If there are troubles, look at `dmesg` and `/var/log/syslog` for clues as to what went wrong.
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+* After setup, I'm having trouble with `wwan0`. Doing `ifconfig wwan0 down` and then resetting the `ppp` connection
|
|
|
+ (`poff fona ; pon fona`), I get internet connectivity.
|
|
|
+* I have to physically hold down the 'on' button for 5s to turn on the GPRS and GPS functionality
|
|
|
+
|
|
|
+GPS
|
|
|
+---
|
|
|
+
|
|
|
+I'm using an active antennae.
|
|
|
+
|
|
|
+I've soldered the 'bias' bin on the 3G Fona module.
|
|
|
+
|
|
|
+Note that I couldn't find any reference on Adafruit's site about soldering the 'bias' bridge.
|
|
|
+I only found this information when looking at other users problems ([src](https://forum.core-electronics.com.au/t/adafruit-fona-gps-not-working/644/8)).
|
|
|
+It turns out Adafruit does mention it in one of their PDF guides ([src](https://cdn-learn.adafruit.com/downloads/pdf/adafruit-fona-3g-cellular-gps-breakout.pdf)).
|
|
|
+
|
|
|
+There is a USB connection to the FONA which is how, I believe, the `ttyUSB` interfaces are coming up.
|
|
|
+The USB to serial connection can be used for the GPS information whereas the direct serial connection
|
|
|
+is used for the GPRS modem.
|
|
|
+
|
|
|
+* I was not getting a fix on the satellites until I soldered the 'bias' bridge on the FONA.
|
|
|
+* I had to reseat the small GPS antennae connector
|
|
|
+* Connect to serial interface via `/dev/ttyUSB3`
|
|
|
+ - Note that `/dev/ttyUSB2` looks to be another viable candidate but maybe what goes on in `/dev/ttyUSB3` is mirrored
|
|
|
+ in `/dev/ttyUSB2`
|
|
|
+ - `/dev/ttyUSB0` and `/dev/ttyUSB1` show up when the FONA is powered on but I haven't been able to get any response
|
|
|
+ when connecting via `minicom` to either of those interfaces
|
|
|
+ - to connect from the command line `minicom -c on -D /dev/ttyUSB2` (8N1 115200, hardware flow control off)
|
|
|
+* Turn on the GPS functionality by issuing `AT+CGPS=1`
|
|
|
+* To poll every 3 seconds with full NMEA message output, issue `AT+CGPSINFOCFG=3,31`
|
|
|
+ - Look for the `$GPRMC,...` line as that has the easiest to read lat/lon positions
|
|
|
+
|
|
|
+See [NMEA sentence information](http://aprs.gids.nl/nmea/) and
|
|
|
+
|
|
|
+References
|
|
|
+---
|
|
|
+
|
|
|
+* [Initial State tutorial](https://github.com/initialstate/fona-raspberry-pi-3/wiki)
|
|
|
+* [Adafruit FONA tethering tutorial](https://learn.adafruit.com/fona-tethering-to-raspberry-pi-or-beaglebone-black/overview)
|
|
|
+* [Adafruit FONA 3G tutorial](https://learn.adafruit.com/adafruit-fona-3g-cellular-gps-breakout/overview)
|
|
|
+* [Disabling serial port](https://www.cube-controls.com/2015/11/02/disable-serial-port-terminal-output-on-raspbian/)
|
|
|
+* [Disable WiFi and Bluetooth](https://blog.sleeplessbeastie.eu/2018/12/31/how-to-disable-onboard-wifi-and-bluetooth-on-raspberry-pi-3/)
|
|
|
+* [SO: How do I make serial work on ...](https://raspberrypi.stackexchange.com/questions/45570/how-do-i-make-serial-work-on-the-raspberry-pi3-pi3b-pizerow)
|
|
|
+* [GPS - NMEA sentence information](http://aprs.gids.nl/nmea/)
|
|
|
+* [NMEA-0183 messages: Overview](https://www.trimble.com/OEM_ReceiverHelp/V4.44/en/NMEA-0183messages_MessageOverview.html)
|
|
|
+* [Adafruit picture of FONA (see soldered bridge with active antenaae)](https://cdn-learn.adafruit.com/assets/assets/000/027/349/original/adafruit_products_Fona_America_top_demo_ORIG.jpg?1440189319)
|
|
|
+* [GH: Adafruit FONA Simcom 3G Breakout PCB](https://github.com/adafruit/Adafruit-FONA-SIMCOM-3G-Breakout-PCB)
|
|
|
+* [Simcom SIM5320 AT command set](https://cdn-shop.adafruit.com/datasheets/SIMCOM_SIM5320_ATC_EN_V2.02.pdf)
|