TSIM 7670E

Using a T-SIM 7670E

I can’t recommend the LilyGO T-SIM A7670E the reasons being

  • The battery does not seem to work although it delivers the proper voltage
  • The GPS is not very precise, as a result one can not determine if the unit is moving or not.
  • The USB connector to upgrade the A7670 Firmware is flimsy, it goes over the board and as a result it fell off (unsoldered) when taking the unit out of its box (so I can’t update A7670 firmware anymore)

After procrastinating a few weeks with that unit, I came to the conclusion that I can’t use it for my project.

I will try to find out another unit such as the T-SIM A7600 that works a lot better. Maybe give a go at the S3 version.

Checking the validity of the GPS data.

It has been noted that the GPS data can be inaccurate, while the 7600 is fairly accurate, the 7670 is more unstable.

As the trigger for mqtt uplink is based on a Lat/log/Alt difference, when the GPS data is not accurate, a message is sent wheras it should not.

So an additional check has to be made before checking the difference to establish that an mqtt update is to be sent

The PDOP, HDOP, VDOP, have been check to discard the GPS reading out of bound, but that’s stil not enough.

Necessary AT coammands

GPS

|At Cmd|Reason|
|++++++++++++++++|++++++++++++++++++++++++++++++++|
|AT+CGNSSPWR=1,1|turn GPS on (in Hot flash mode)|
|AT+CGNSSPORTSWITCH=1,0|
|AT+CGNSSTST=0|Test mode OFF|
|AT+CGNSSMODE=1|GPS|
|AT+CGNSSPORTSWITCH=1,0|Send NMEA Data to output port|
|AT+CGNSSINFO=30|Report GNSS info every 30 seconds|
|AT+CGPSINFO=30|Report GPS info every 30 seconds|

Mon module: Model: A7670E-FASE Revision: A7670M7_V1.11.1

répond AT+CGNSSMODE=? +CGNSSMODE: (1-4)

Le mode 1 verouille (GPS)

Le mode 3 (GPS+GLONASS+GALILEO+SBAS+QZSS) verouille aussi

[],[],[],[BEIDOU-SVs],[],[<N/S>],[],[<E/W>],[],[],[],[],[],[],[HDOP],[VDOP] +CGNSSINFO: 3,17,,11,02,50.7327652,N,5.6842937,E,111025,121656.00,114.5,0.496,,2.56,0.99,2.37,12

Donc:

3 Fix mode 2=2D fix 3=3D fix 17 GPS satellite visible numbers

  • BEIDOU satellite visible numbers 11 GLONASS satellite visible numbers 02 GALILEO satellite visible numbers 50.732 Latitude of current position.Output format is dd.ddddd N <N/S> N/S Indicator, N=north or S=south. 5.684 Longitude of current position. Output format is ddd.ddddd E <E/W> E/W Indicator, E=east or W=west. 111025 Date. Output format is ddmmyy. 121656 UTC Time. Output format is hhmmss.ss. 114.5 MSL Altitude. Unit is meters. 0.496 Speed Over Ground. Unit is knots.
  • Course. Degrees. 2.56 Position Dilution Of Precision. 0.99 Horizontal Dilution Of Precision. 2.37 Vertical Dilution Of Precision.

AT+CGNSSPORTSWITCH 1,0 AT+CGNSSMODE 3 AT+CGPSWARM AT+CGNSSINFO 30

GPRS

AT+CPIN=pin AT+CREG=1 AT+CNUM returns the phone number (+CNUM: “�”,"+32498691052",145))

Packet domain

register AT+CGREG=1 attach AT+CGATT=1 AT+NETOPEN

Start MQTT

AT+CMQTTSTART AT+CMQTTACCQ=0,“modemtest”,0 //acquire a client define client ID AT+CMQTTCONNECT=0,“tcp://www.jcoenen.com:8883”,60,1,“jcoenen”,“Beatr1ce” // connect to broker

Get IP address AT+CGPADDR

Ping: AT+CPING=“ www.jcoenen.com ”,1,4 returns: 1, IP address, packet size, rtt, TTL (+CPING: 1,213.211.158.130,92,270,55) 2 ping time out 3 ping result

MQTT sequence

CMQTTSTART AT+CMQTTACCQ=0,“modemtest”,0. //acquire client AT+CMQTTCONNECT=0,“tcp://www.jcoenen.com:8883”,60,1,“jcoenen”,“Beatr1ce” //connect client to broker

AT+CMQTTTOPIC=0,length(topic string) topic string

AT+MQTTPAYLOAD=0,length(payload string) payload string

AT+CMQTTPUB=0,1,120,1. (client ID, Send at least once, timeout seconds, retain flag)