Hi
Our device needs to have it’s time set, so that the timestamps of events are recorded properly.
The manufacture’s instructions are:
3.Packet with time correction request, sent every seven days on LoRaWAN port 4
Size in bytes Field description
1 byte Packet type, this packet == 255
4 bytes Time of the modem at the moment of the packet transmission
(unixtime UTC)
After receiving this type of package, the application can send to modem the packet with time correction.
So I have been trying to send the necessary message to the device.
So far, from reading the documentation, I have changed the lora-app-server.toml file to accept mqtt integration using the config file shown in the documentation (we are running Lora Server OS on a Lorix One).
I then sent a mqtt message from the command line as follows:
mosquitto_pub -t application/4/device/303138336D385301/tx -f time_update.json -d
where the time_update.json file has this internal data:
{“confirmed”: true,“fPort”: 4,"data:“w78=XYDnSg==”}
The message seems to be accepted when I subscribe via mosquitto_sub -v -t “application/#” as per the feedback below:
application/4/device/303138336D385301/tx {
?“confirmed”: true,
?“fPort”: 4,
?"data::?“w78=XYDnSg==”
}
application/4/device/303138336D385301/tx {“confirmed”: true,“fPort”: 4,"data:“w78=XYDnSg==”}
but when monitoring the lora-app-server using /opt/lora-app-server/lora-app-server
I see the following error
ERRO[0487] integration/mqtt: tx payload unmarshal error: invalid character ‘w’ after object key data_base64=“eyJjb25maXJtZWQiOiB0cnVlLCJmUG9ydCI6IDQsImRhdGE6Inc3OD1YWURuU2c9PSJ9Cg==”
Can anyone point out what I am doing wrong?