I have a Freematics One+ running telelogger as bundled with 'firmware_v5' which is having issues connecting to my locally hosted 'traccar' server. The CELL_APN, SERVER_HOST and SERVER_PORT are correctly configured. I have made not changes to the telelogger code apart from modifying 'config.h'
CELL_APN is 'telstra.internet'
SERVER_PORT is 5170
SERVER_HOST is the DNS name of my private 'traccar' server
'tcpdump' on my 'traccar' server shows incoming UDP packets sent to port 5170 that correspond to the '[CELL] Ping...' messages on the Freematics serial output as follows:
[CELL] Activating...
CELL:SIM7070G
IMEI:xxxxxxxxx
[CELL] Searching...
APN:telstra.internet
Operator:Belong
[CELL] IP:10.153.58.197
[CELL] Ping...
[CELL] Deactivated
The server receives 'Cell:Ping' UDP packets from the Freematics device and both shows the packet in 'tcpdump' and updates the device in 'traccar'- proving that the cellular APN and host name:port is correctly configured in 'config.h' in 'telelogger' just fine and port forwarding and firewalls are correctly configured. This is however intermittent (sometimes there are no [PING] messages at all when I power cycle the Freematics device) or is possibly only occurring after a long period of time.
I also get '[NET] Server timeout' messages in the output when the device appears to be trying to upload data and no UDP packets are received on the 'traccar' host from the Freematics One+ or appear in 'tcpdump'
The Freematics serial output shows 'LOGIN(my server:5170)...' messages but there is never any indication in 'tcpdump' on my 'traccar' server showing any correlation between the 'LOGIN' message and any incoming UDP packet being received.
I am running the latest version (as at October 26) built on Ubuntu Linux 22.04 using VScode and Platformio. The code builds and uploads to the Freematics device without issues. I am using a 'Belong' mobile data SIM (connected to Telstra and using the 'telstra.internet' APN) and the device has a fresh 16GB SD card installed. I am running the Freematics device in my study (not on the car yet) and 4G reception is great (4 out of 5 bars). The device has a new micro-SD card installed.
I have independently tested the Belong SIM in a 4G modem connected to a standalone laptop - sending UDP packets to my 'traccar' server on port 5170 using the Linux 'nc' command works exactly as expected.
At this point I am thinking that there is either an incorrect default setting in 'config.h' or there is some weird bug in the code. Or something else.
Any ideas ?
Sean
Freematics One+ - PING works but nothing else
Re: Freematics One+ - PING works but nothing else
A quick update:
I took the device and plugged it into my car and made sure that the GPS antenna had clear sight of the sky. Connecting a laptop to the USB port the diagnostic messages show the device decoding the VIN via OBD and reporting the correct location and multiple GPS satellites in view.
Looking at 'tcpdump' on the 'traccar' server the 'PING' packets still come throug, however hey now include the vehicle VIN in the payload. There are no UDP packets with location data and no position updates on 'traccar' (still shows as lat=0, lon=0).
The debug messages on the devices UDP port still show attempts to login, and '[NET] Server timeout' messages.
Any ideas out there as to why the Freematics One+ will not upload data to 'traccar' via UDP port 5170 while PING works ?
Sean
I took the device and plugged it into my car and made sure that the GPS antenna had clear sight of the sky. Connecting a laptop to the USB port the diagnostic messages show the device decoding the VIN via OBD and reporting the correct location and multiple GPS satellites in view.
Looking at 'tcpdump' on the 'traccar' server the 'PING' packets still come throug, however hey now include the vehicle VIN in the payload. There are no UDP packets with location data and no position updates on 'traccar' (still shows as lat=0, lon=0).
The debug messages on the devices UDP port still show attempts to login, and '[NET] Server timeout' messages.
Any ideas out there as to why the Freematics One+ will not upload data to 'traccar' via UDP port 5170 while PING works ?
Sean
Re: Freematics One+ - PING works but nothing else
Update - I think I have found out where the issue is.
The file 'libraries/FreematicsPlus/FreematicsNetwork.cpp' defines the function 'CellSIMCOM::sendCommand()' which is used to send and receive commands to the SIM7070G. It appears that there is an overrun ocurring where the AT command used to send the outgoing UDP packet to logon to 'traccar' is being terminated by the subsequent AT command to read the response. This is likely a bug in the SIM7070 firmware.
As a result the initial UDP packet is never sent by the SIM7070 to the server.
'sendCommand()' makes a small allowance for this by including a 10ms delay between the 'xbWrite()' and 'xbRead()' calls. This appears to be insufficient. I have modified my local copy to increase this delay from 10ms to 1000ms (i.e. 1 second) and with this workaround the Freematics Device is now working as expected. The UDP logon works, the device uploads positions and everything does what I would expect.
Any pointers as to how to raise bug reports ?
The file 'libraries/FreematicsPlus/FreematicsNetwork.cpp' defines the function 'CellSIMCOM::sendCommand()' which is used to send and receive commands to the SIM7070G. It appears that there is an overrun ocurring where the AT command used to send the outgoing UDP packet to logon to 'traccar' is being terminated by the subsequent AT command to read the response. This is likely a bug in the SIM7070 firmware.
As a result the initial UDP packet is never sent by the SIM7070 to the server.
'sendCommand()' makes a small allowance for this by including a 10ms delay between the 'xbWrite()' and 'xbRead()' calls. This appears to be insufficient. I have modified my local copy to increase this delay from 10ms to 1000ms (i.e. 1 second) and with this workaround the Freematics Device is now working as expected. The UDP logon works, the device uploads positions and everything does what I would expect.
Any pointers as to how to raise bug reports ?