Hello there,
I am trying to use the Raspberry Pi GPRS/GPS Tracker HAT with a RaspberryPI 4 model B.
I want to use GPS location.
_________________ PPP ______________________
So far I managed to install the ppp librairies following the instructions provided.
For carrier APN, I put dr.m2m.ch
I am using a sim card from iot.digitec.ch which mentions on their website
“All Digital Republic Flex SIM cards support LTE CAT M1. NB-IoT is currently not supported by either Digital Republic Flex or Digital Republic Flat SIM cards.”
For the serial I put ttyS0.
I chose the option to connect automatically.
I am using UART and did the following “Enable serial_hw and I2C interfaces”
The installation seems to have worked.
However when I type “sudo pon” it says “command can not be find”.
If I type “sudo route add default ppp0” it says “SIOCADDRT : no such device”
“ifconfig” list me no ppp0.
If I disconnect from my wifi network, there is no internet connection.
Not sure if I missed something here.
––––––––––––––––––––Tracker HAT––––––––––––––––––––––––-
I then installed the library for the tracker GitHub - sixfab/Sixfab_RPi_Tracker_HAT
when I run the example basicTracker.py
Sixfab Raspberry Pi Tracker HAT Class initialized!
M95 module disabled!
M95 module enabled!
M95 module powered up!
Trying to connect base station of operator…
AT+CGREG?
AT+CGREG?
AT+CGREG?
AT+CGREG?
AT+CGREG?
+CGREG: 0,1
OK
AT+CSQ
AT+CSQ
+CSQ: 19,0
OK
AT+CSQ
AT+CSQ
+CSQ: 19,0
OK
AT+CGACT=0,1
AT+CGACT=0,1
OK
AT+CGDCONT=1,“IP”,“CMNET”
AT+CGDCONT=1,“IP”,“CMNET”
OK
AT+CGACT=1,1
OK
AT+QICLOSE
AT+QICLOSE
ERROR
AT+QIOPEN=“UDP”,“192.168.1.8”,3000
AT+QIOPEN=“UDP”,“192.168.1.8”,3000
OK
AT+QISTATE
AT+QISTATE
OK
STATE: IP IND
AT+QISEND=27
AT+QISEND=27
Starting sending message!
Starting sending message!
SEND OK
Recieved Message: $PMTK011,MTKGPS08
$PMTK010,0012E
$PMTK011,MTKGPS08
$PMTK010,0022D
$GPRMC,235942.878,V,0.00,0.00,050180,N,V37
$GPVTG,0.00,T,M,0.00,N,0.00,K,N32
$GPGGA,235942.878,0,0,M,M,44
$GPGSA,A,1,103
$GPGSA,A,1,200
$GPGSV,1,1,00,065
$GLGSV,1,1,00,178
$GPGLL,235942.878,V,N76
According to another example I found here https://sixfab.com/gps-tracker-with-3g-4glte-shield/
In the Python code, Line 9 to 12
if data[0:6] == “$GPRMC”:
sdata = data.split(“,”)
if sdata[2] == ‘V’:
print “no satellite data available”
When the GPRMC second info is equal to V, it means that “no satellite data available”
After some time, I tried again and now I get the following
$GNRMC,123444.000,A,4631.0145,N,00638.5851,E,6.55,292.79,220420,A,V*0D
I get a location, but with GNRMC and not GPRMC (not sure about the difference)
Using the same code posted above I was able to parse the data but it gives me a location that is close to my place (so not totally random) but not accurate at all (about 30km difference with my exact location).
So sometimes I get GPRMC but void with no info, sometimes I get GNRMC with data not accurate.
Can you help me solve this ?
How can I have correct satellite data ?
Is it a problem with my sim card ?
Thank you for your time,
Best
Laura