Firmware SDK
twr_at_lora.h
1 #ifndef _TWR_AT_LORA_H
2 #define _TWR_AT_LORA_H
3 
4 #include <twr_common.h>
5 #include <twr_atci.h>
6 #include <twr_cmwx1zzabz.h>
7 
8 #define TWR_AT_LORA_COMMANDS {"$DEVEUI", NULL, twr_at_lora_deveui_set, twr_at_lora_deveui_read, NULL, ""},\
9  {"$DEVADDR", NULL, twr_at_lora_devaddr_set, twr_at_lora_devaddr_read, NULL, ""},\
10  {"$NWKSKEY", NULL, twr_at_lora_nwkskey_set, twr_at_lora_nwkskey_read, NULL, ""},\
11  {"$APPSKEY", NULL, twr_at_lora_appskey_set, twr_at_lora_appskey_read, NULL, ""},\
12  {"$APPKEY", NULL, twr_at_lora_appkey_set, twr_at_lora_appkey_read, NULL, ""},\
13  {"$APPEUI", NULL, twr_at_lora_appeui_set, twr_at_lora_appeui_read, NULL, ""},\
14  {"$BAND", NULL, twr_at_lora_band_set, twr_at_lora_band_read, NULL, "0:AS923, 1:AU915, 5:EU868, 6:KR920, 7:IN865, 8:US915"},\
15  {"$MODE", NULL, twr_at_lora_mode_set, twr_at_lora_mode_read, NULL, "0:ABP, 1:OTAA"},\
16  {"$NWK", NULL, twr_at_lora_nwk_set, twr_at_lora_nwk_read, NULL, "Network type 0:private, 1:public"},\
17  {"$ADR", NULL, twr_at_lora_adr_set, twr_at_lora_adr_read, NULL, "Automatic data rate 0:disabled, 1:enabled"},\
18  {"$DR", NULL, twr_at_lora_dr_set, twr_at_lora_dr_read, NULL, "Data rate 0-15"},\
19  {"$REPU", NULL, twr_at_lora_repu_set, twr_at_lora_repu_read, NULL, "Repeat of unconfirmed transmissions 1-15"},\
20  {"$REPC", NULL, twr_at_lora_repc_set, twr_at_lora_repc_read, NULL, "Repeat of confirmed transmissions 1-8"},\
21  {"$JOIN", twr_at_lora_join, NULL, NULL, NULL, "Send OTAA Join packet"},\
22  {"$FRMCNT", twr_at_lora_frmcnt, NULL, NULL, NULL, "Get frame counters"},\
23  {"$LNCHECK", twr_at_lora_link_check, NULL, NULL, NULL, "MAC Link Check"},\
24  {"$RFQ", twr_at_lora_rfq, NULL, NULL, NULL, "Get RSSI/SNR of last RX packet"},\
25  {"$AT", NULL, twr_at_lora_custom_at_set, NULL, NULL, "Send custom AT command"},\
26  {"$DEBUG", NULL, twr_at_lora_debug_set, NULL, NULL, "Show debug UART communication"},\
27  {"$REBOOT", twr_at_lora_reboot, NULL, NULL, NULL, "Firmware reboot"},\
28  {"$FRESET", twr_at_lora_freset, NULL, NULL, NULL, "LoRa Module factory reset"},\
29  {"$FWVER", twr_at_lora_ver_read, NULL, NULL, NULL, "Show LoRa Module firmware version"}
30 
31 void twr_at_lora_init(twr_cmwx1zzabz_t *lora);
32 
33 bool twr_at_lora_deveui_read(void);
34 bool twr_at_lora_deveui_set(twr_atci_param_t *param);
35 
36 bool twr_at_lora_devaddr_read(void);
37 bool twr_at_lora_devaddr_set(twr_atci_param_t *param);
38 
39 bool twr_at_lora_nwkskey_read(void);
40 bool twr_at_lora_nwkskey_set(twr_atci_param_t *param);
41 
42 bool twr_at_lora_appskey_read(void);
43 bool twr_at_lora_appskey_set(twr_atci_param_t *param);
44 
45 bool twr_at_lora_appkey_read(void);
46 bool twr_at_lora_appkey_set(twr_atci_param_t *param);
47 
48 bool twr_at_lora_appeui_read(void);
49 bool twr_at_lora_appeui_set(twr_atci_param_t *param);
50 
51 bool twr_at_lora_band_read(void);
52 bool twr_at_lora_band_set(twr_atci_param_t *param);
53 
54 bool twr_at_lora_mode_read(void);
55 bool twr_at_lora_mode_set(twr_atci_param_t *param);
56 
57 bool twr_at_lora_nwk_read(void);
58 bool twr_at_lora_nwk_set(twr_atci_param_t *param);
59 
60 bool twr_at_lora_adr_read(void);
61 bool twr_at_lora_adr_set(twr_atci_param_t *param);
62 
63 bool twr_at_lora_dr_read(void);
64 bool twr_at_lora_dr_set(twr_atci_param_t *param);
65 
66 bool twr_at_lora_repu_read(void);
67 bool twr_at_lora_repu_set(twr_atci_param_t *param);
68 
69 bool twr_at_lora_repc_read(void);
70 bool twr_at_lora_repc_set(twr_atci_param_t *param);
71 
72 bool twr_at_lora_ver_read(void);
73 
74 bool twr_at_lora_reboot(void);
75 bool twr_at_lora_freset(void);
76 bool twr_at_lora_frmcnt(void);
77 bool twr_at_lora_link_check(void);
78 bool twr_at_lora_rfq(void);
79 bool twr_at_lora_custom_at_set(twr_atci_param_t *param);
80 
81 bool twr_at_lora_join(void);
82 bool twr_at_lora_debug_set(twr_atci_param_t *param);
83 
84 #endif
struct twr_cmwx1zzabz_t twr_cmwx1zzabz_t
CMWX1ZZABZ instance.