Hi everyone. Since Traccar is so much fun, I got myself a Freematics One+ and installed the telelogger.ino sketch. I keep getting server timeouts on my end in the console and I am not quite sure where to look to fix this.
Steps taken to mitigate:
- Google. Found a forum post where someone misconfigured the port. Made sure the UDP port is 5170.
- Made sure 5170 UDP is open on my server.
- Changed to demo.traccar.org, as well as demo2.traccar.org just to be sure.
- Replaced the server name by its respective IPs (in case something is messed up in the DNS settings)
- Made sure the APN is set correctly and
#define SERVER_PROTOCOL
is indeed PROTOCOL_UDP
All these changes did not lead to any different behaviour. Any idea what I am missing?
Serial log below:
11:24:41.189 -> CPU:240MHz FLASH:4MB
11:24:41.189 -> DEVICE ID:XXXXXXXX
11:24:42.187 -> TYPE:14
11:24:42.187 -> MEMS:ICM-20948
11:24:43.352 -> ACC BIAS:-0.08/-0.37/0.93
11:24:43.485 -> GNSS:OK
11:24:46.480 -> CELL:SIM7600E-H
11:24:47.511 -> IMEI:860147050016128
11:24:49.208 -> OBD:NO
11:24:49.507 -> NO SD CARD
11:24:49.540 -> [GPS] 45.XX 13.XX 0km/h SATS:6 Course:0 2021-03-24T10:24:49.500Z
11:24:49.540 -> [BUF] 12 samples | 80 bytes | 3%
11:24:49.574 -> Operator:TELEMACH Things Mobile
11:24:49.574 -> IP:10.193.XX.XX
11:24:49.607 -> RSSI:-57dBm
11:24:49.607 -> LOGIN(demo.traccar.org:5170)...
11:24:53.266 ->
11:24:53.266 -> +CIPCLOSE: 0,0
11:24:53.266 ->
11:24:53.266 -> OK
11:24:53.266 ->
11:24:53.266 -> Unable to connect
(GPS and BUF information)
11:24:56.261 -> LOGIN(demo.traccar.org:5170)...
11:25:27.027 -> Server timeout
My config.h below
#ifndef CONFIG_H_INCLUDED
#define CONFIG_H_INCLUDED
/**************************************
* Circular Buffer Configuration
**************************************/
#define BUFFER_SLOTS 32 /* max number of buffer */
#define BUFFER_LENGTH 128 /* bytes per slot */
#define SERIALIZE_BUFFER_SIZE 1024 /* bytes */
/**************************************
* Configuration Definitions
**************************************/
#define NET_WIFI 1
#define NET_SIM800 2
#define NET_SIM5360 3
#define NET_SIM7600 4
#define NET_WIFI_MESH 5
#define NET_SERIAL 6
#define STORAGE_NONE 0
#define STORAGE_SPIFFS 1
#define STORAGE_SD 2
#define GNSS_NONE 0
#define GNSS_STANDALONE 1
#define GNSS_CELLULAR 2
#define PROTOCOL_UDP 1
#define PROTOCOL_HTTPS 2
#define PROTOCOL_METHOD_GET 0
#define PROTOCOL_METHOD_POST 1
/**************************************
* OBD-II configurations
**************************************/
#ifndef ENABLE_OBD
#define ENABLE_OBD 1
#endif
// maximum consecutive OBD access errors before entering standby
#define MAX_OBD_ERRORS 3
/**************************************
* Networking configurations
**************************************/
#ifndef NET_DEVICE
// change the following line to change network device
#define NET_DEVICE NET_SIM7600
// WiFi settings
#define WIFI_SSID "SSID"
#define WIFI_PASSWORD "PASSWORD"
// cellular network settings
#define CELL_APN "TM"
// Freematics Hub server settings
#define SERVER_HOST "demo2.traccar.org"
#define SERVER_PROTOCOL PROTOCOL_UDP
#endif
// SIM card setting
#define SIM_CARD_PIN ""
// HTTPS settings
#define SERVER_METHOD PROTOCOL_METHOD_POST
#define SERVER_PATH "/hub/api"
#if !SERVER_PORT
#if SERVER_PROTOCOL == PROTOCOL_UDP
#define SERVER_PORT 5170
#elif SERVER_PROTOCOL == PROTOCOL_HTTPS
#define SERVER_PORT 443
#endif
#endif
// WiFi Mesh settings
#define WIFI_MESH_ID "123456"
#define WIFI_MESH_CHANNEL 13
// WiFi AP settings
#define WIFI_AP_SSID "TELELOGGER"
#define WIFI_AP_PASSWORD "PASSWORD"
// maximum consecutive communication errors before reconnecting
#define MAX_CONN_ERRORS_RECONNECT 3
// maximum allowed connecting time
#define MAX_CONN_TIME 10000 /* ms */
// data receiving timeout
#define DATA_RECEIVING_TIMEOUT 5000 /* ms */
// expected maximum server sync signal interval
#define SERVER_SYNC_INTERVAL 120 /* seconds, 0 to disable */
// data interval settings
#define STATIONARY_TIME_TABLE {30, 60, 180} /* seconds */
#define DATA_INTERVAL_TABLE {1000, 2000, 5000} /* ms */
#define PING_BACK_INTERVAL 900 /* seconds */
/**************************************
* Data storage configurations
**************************************/
#ifndef STORAGE
// change the following line to change storage type
#define STORAGE STORAGE_SD
#endif
/**************************************
* MEMS sensors
**************************************/
#define ENABLE_ORIENTATION 0
#ifndef ENABLE_MEMS
#define ENABLE_MEMS 1
#endif
/**************************************
* GPS
**************************************/
#ifndef GNSS
// change the following line to change GNSS setting
#define GNSS GNSS_STANDALONE
#endif
#define GPS_SERIAL_BAUDRATE 115200L
#define GPS_MOTION_TIMEOUT 180 /* seconds */
/**************************************
* Standby/wakeup
**************************************/
#define RESET_AFTER_WAKEUP 0
// motion threshold for waking up
#define MOTION_THRESHOLD 0.4f /* moving vehicle motion threshold in G */
// engine jumpstart voltage
#define JUMPSTART_VOLTAGE 14 /* V */
/**************************************
* Additional features
**************************************/
#define ENABLE_HTTPD 0
#define ENABLE_OLED 0
#define CONFIG_MODE_TIMEOUT 0
#define PIN_SENSOR1 34
#define PIN_SENSOR2 26
#define COOLING_DOWN_TEMP 65 /* celsius degrees */
#endif // CONFIG_H_INCLUDED
It looks like device doesn't receive a response it's expecting.
So this seems to be more a Freematics issue than a Traccar issue, then?
That would be my guess, but ideally you need access to the server logs to see what's going on.
Found it. Stupid mistake: I am using Traccar in Docker. The default example from the Docker documentation doesn't map port 5170.
Hi everyone. Since Traccar is so much fun, I got myself a Freematics One+ and installed the telelogger.ino sketch. I keep getting server timeouts on my end in the console and I am not quite sure where to look to fix this.
Steps taken to mitigate:
#define SERVER_PROTOCOL
is indeedPROTOCOL_UDP
All these changes did not lead to any different behaviour. Any idea what I am missing?
Serial log below:
My config.h below