Changes

80 bytes added ,  12:59, 10 February 2023
no edit summary
Line 1: Line 1: −
===Codec JSON Description===
+
==='''Codec JSON Description'''===
    
JSON (JavaScript Object Notation) is a light data exchange format, that due to its simplicity to be written and fast interpretation and generation for machines.
 
JSON (JavaScript Object Notation) is a light data exchange format, that due to its simplicity to be written and fast interpretation and generation for machines.
Line 22: Line 22:     
==='''AWS Shadow'''===
 
==='''AWS Shadow'''===
AWS shadow allows to retain device state, this service reports only the latest Shadow state data. Using this mode does not allow sending commands to device or receiving responses.<br>
+
AWS shadow allows to retain device state, this service reports only the latest Shadow state data. Using this mode does not allow sending commands to device or receiving responses.<br>When using this mode JSON format must be enabled, otherwise, data sending will not begin.
 +
Using this service device uses x509 certificates to authenticate. No other method is possible. https://docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html<br>Doc: https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html
   −
When using this mode JSON format must be enabled, otherwise, data sending will not begin.
+
==='''AWS Custom'''===
Using this service device uses x509 certificates to authenticate. No other method is possible. https://docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html<br>
     −
Doc: https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html<br><br>
+
This mode allows configuring custom topic names, where data will be published and commands received.
 +
When using this mode all Codec protocols are supported (Codec8, Codec8E (E-Extended), Codec JSON).  
   −
==='''AWS Custom'''===
+
Full Codec description can be found [[Codec#Codec 8|'''here''']].
   −
This mode allows configuring custom topic names, where data will be published and commands received.
  −
When using this mode all Codec protocols are supported (Codec8, Codec8ext, Codec JSON).
   
Authentication is the same as AWS Shadow.
 
Authentication is the same as AWS Shadow.
   Line 38: Line 37:       −
Codec JSON is available as a transmission codec now ('''since the fw 03.27.05.Rev.250'''''), this parameter can be selected in the '''Teltonika’s Configurator>> System>> System Settings>> Data Protocol>> and selecting Codec JSON'''<br>''
+
 
 +
Codec JSON is available as a transmission Codec,  ''this parameter can be selected in:''
 +
 
 +
'''''Teltonika Configurator >> System >> System Settings >> Data Protocol >> and selecting Codec JSON'''<br>''
 
[[File:MQTT Server.png|center|frameless|300x300px]]  
 
[[File:MQTT Server.png|center|frameless|300x300px]]  
   −
Additionally, to develop the full configuration in the Teltonika device, make sure to use the '''MQTT protocol''', this can be done in the '''''teltonika's configurator>>GPRS Server Settings>> and in protocol selecting MQTT.'''''
+
Additionally, to develop the full configuration in the Teltonika device, make sure to use the '''MQTT protocol'''.
 +
 
 +
This can be done in '''''Teltonika configurator >> GPRS Server Settings >> and in protocol selecting MQTT.'''''
 
   
 
   
It is important to note that the communication to the AWS IoT Service uses a TLS certificate to authenticate, please follow this link where is explained how to obtain it:
+
'''Note.''' communication to the AWS IoT Service uses a TLS certificate to authenticate, please follow this link where is explained how to obtain it:
[[https://wiki.teltonika-gps.com/view/Getting_Started_with_AWS_IoT_Core#Provision_the_Device_with_credentials]]  
+
 
 +
[https://wiki.teltonika-gps.com/view/Getting_Started_with_AWS_IoT_Core#Provision_the_Device_with_credentials '''MQTT Start with our devices''']
    
==='''Codec JSON Structure'''===
 
==='''Codec JSON Structure'''===
Line 72: Line 77:  
     "240": 0
 
     "240": 0
 
   }                                                                                                                                                }
 
   }                                                                                                                                                }
==='''Sending commands from AWS to device'''===
+
==='''Sending commands from AWS to the device'''===
Any SMS command, which is interpretable by the device‘s firmware, can be used to control the device that was setup in AWS.
+
Any SMS command, which is interpretable by the device‘s firmware, can be used to control the device that was set up in AWS.
 
SMS/GPRS commands:<br>
 
SMS/GPRS commands:<br>
   −
https://wiki.teltonika-gps.com/view/FMB_SMS/GPRS_Commands <br>
+
[https://wiki.teltonika-gps.com/view/FMB_SMS/GPRS_Commands '''SMS commands List''']<br>
    
The structure for the JSON:<br>
 
The structure for the JSON:<br>
Line 82: Line 87:  
'''{ "CMD": "<SMS_Command> <Input>" }'''<br>
 
'''{ "CMD": "<SMS_Command> <Input>" }'''<br>
   −
An example for using the setdigout command:<br>
+
An example of using the '''setdigout''' command:<br>
    
'''{ "CMD": "setdigout 111" }'''
 
'''{ "CMD": "setdigout 111" }'''