LGT-92: Difference between revisions
m (→Flashing) |
|||
Line 42: | Line 42: | ||
ST-LINK v2 SWCLK <--> Dupont green pin | ST-LINK v2 SWCLK <--> Dupont green pin | ||
ST-LINK v2 SWDIO <--> Dupont white pin | ST-LINK v2 SWDIO <--> Dupont white pin | ||
Official firmware binaries are available [https://www.dragino.com/downloads/downloads/LGT_92/firmware/ here] | |||
For example: | For example: |
Revision as of 15:24, 23 November 2020
Project LGT-92 | |
---|---|
Improving LGT-92 LoRaWAN tracker software | |
Status | Initializing |
Contact | bertrik |
Last Update | 2020-11-23 |
What
This page is about the Dragino LGT-92, a GPS-enabled LoRaWAN tracker node.
The plan is to investigate if the firmware can be improved, e.g.:
- fix minor existing bugs
- see the Issues page on github
- add Cayenne encoding
- collect information on how to interface with it (over the "USB" port)
- perhaps write a replacement firmware, that can be easily compiled with platformio
Hardware
As far as I understand:
- STM32L151 microcontroller, could also be STM32L072 I can't get this really clear
- GPS
- accelerometer, MPU9250?
- button, 3 LEDs (R, G, B)
- 1000 mAh battery + charging circuit
Information provided by Dragino: https://github.com/dragino/Lora/tree/master/LGT-92
Software
Dragino binary firmware downloads: https://www.dragino.com/downloads/downloads/LGT_92/firmware/
My fork of the Dragino firmware: https://github.com/bertrik/LGT-92_-LoRa_GPS_Tracker
Work in progress for an Arduino firmware: https://github.com/bertrik/lgt92
Flashing
When holding the reset pin (e.g. push a dupont-pin in the hole next to the USB connector), you can communicate over SWCLK/SWDIO debug pins.
ST-Link pin connections (from: https://github.com/dragino/LGT-92_-LoRa_GPS_Tracker/issues/10):
ST-LINK v2 5.0v <--> Dupont red pin ST-LINK v2 GND <--> Dupont black pin ST-LINK v2 SWCLK <--> Dupont green pin ST-LINK v2 SWDIO <--> Dupont white pin
Official firmware binaries are available here
For example:
openocd -s /usr/share/openocd/scripts -f interface/stlink.cfg -f target/stm32l0.cfg
To program a HEX file:
openocd -s /usr/share/openocd/scripts -f interface/stlink.cfg -f target/stm32l0.cfg -c init -c "program LGT92-EU868-v1.6.2.hex verify reset exit"
This takes only a few seconds.
TTN mapper configuration
Run these commands to set it up with ABP keys, ADR off, uplink at SF7 every 15 seconds:
AT+NJM=0 AT+ADR=0 AT+CFM=0 AT+DR=5 AT+LON=1 AT+MD=0 AT+DADDR=26 01 1A 30 AT+NWKSKEY=FB 09 6B 85 86 AF 47 12 E8 AE 67 CB 7F A9 CB 51 AT+APPSKEY=CB 9B 8F F5 E6 2C 8E 87 9E 0B 6B 1F 4B 69 14 FA AT+TDC=15000 AT+NMEA886=2 AT+PORT=1 AT+FTIME=0 AT+PDOP=10.0