Skip to content

Instantly share code, notes, and snippets.

@iceberg1369
Created August 17, 2021 05:03
Show Gist options
  • Save iceberg1369/868b2d72b7eccd26084798c9a22231ec to your computer and use it in GitHub Desktop.
Save iceberg1369/868b2d72b7eccd26084798c9a22231ec to your computer and use it in GitHub Desktop.
Configurator connection

The goal is to develope program like this

https://wiki.teltonika-gps.com/view/Special:Redirect/file/Teltonika.Configurator_1.6.4_B.3.25_R.8.zip

git repository

https://gitlab.com/iceberg1369/configurator

UI Sketch

https://www.figma.com/proto/Fuh5hWgIvkfCsOK9wi1eBR/Figma-Material-Design-UI-Kit-(Desktop-Dashboard)-(Community)?node-id=127%3A153&scaling=min-zoom&page-id=0%3A1

Connecting

1. when connected to serial device

the app sends cfg_getstatus command to device every 5 seconds

[APP --> Device] >

cfg_getstatus

[Device --> App] >

`<START_STATUS>{"device_name":"S900","firmware":"1.7.1","imei":"86986455324855","rtc":1609321569}<END_STATUS>`

then when first "get_status" is received then send cfg_getparams to device and device replies the stored parameters // only once

[APP --> Device] >

cfg_getparams

[Device --> App] >

<START_PARAMS>[{"id":2004,"val":"hiro-tracker.com"},{"id":138,"val":2}]<END_PARAMS>

2. Save config

[APP --> Device] >

   cfg_setparams:<START_PARAMS>[{"id":2004,"val":"hiro-tracker.com"},{"id":138,"val":2}]<END_PARAMS>

[Device --> App] > <SAVECONFIG>OK<SAVECONFIG>

[Device --> App] > <SAVECONFIG>FAILED:blahblah<SAVECONFIG>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment