Hello,
you can find all info about custom firmware in developers documentation in firmware section
https://developers.hardwario.com/firmware/firmware-quick-start
But I created the binary with enabled debug for you, but Iβll cover the steps:
- I have installed toolchain from the link above
- I cloned the repository, you go to the page with project, click on the green download βcodeβ button and copy the URL
git@github.com:hardwario/bcf-lora-climate-monitor.git
. Then you call in the toolchain command line (it has to be toolchain command line, not regular windows command line) git clone git@github.com:hardwario/bcf-lora-climate-monitor.git
- Try to compile the project by
make -j
, it will first download SDK to sdk/
and start building.
- If its ok, then I update SDK to the latest version where the LoRa debug is supported by
make update
, this updtates SDK
- Iβve added in the code in
application_init
function bc_log_init(BC_LOG_LEVEL_DUMP, BC_LOG_TIMESTAMP_ABS);
to enable logging and after the Lora initialization set_class function Iβve enabled debugging bc_cmwx1zzabz_set_debug(&lora, true);
- I compile again with
make -j
(-j
just says βuse paralel compilationβ, its faster)
- Then I flash it to the Core Module by
bcf flash
, choose the right port and flash it.
- After flash is done, I immediatelly open the serial console to see all the commands from the begining.
Here is the firmware, use Playground tool to flash it, or from Toolchain you call bcf flash <filenam_to_flash>.bin
bcf-lora-climate-monitor-with-debug-enabled.bin (87.2 KB)
Here is my output, you have to enable terminal right after flashing to catch everything from the start!
Let me know what your output is.
[10:39:38:696] # 0.52 <D> LoRa TX: βATβββ
[10:39:38:798] # 0.62 <D> LoRa RX: +OKβββ
[10:39:38:801] # 0.62 <D> LoRa TX: AT+VER?βββ
[10:39:38:901] # 0.72 <D> LoRa RX: +OK=1.0.02,Nov 10 2017 10:10:16βββ
[10:39:38:906] # 0.72 <D> LoRa TX: AT+DFORMAT=0βββ
[10:39:39:003] # 0.82 <D> LoRa RX: +OKβββ
[10:39:39:007] # 0.82 <D> LoRa TX: AT+DUTYCYCLE=0βββ
[10:39:39:106] # 0.92 <D> LoRa RX: +OKβββ
[10:39:39:108] # 0.92 <D> LoRa TX: AT+DEVADDR?βββ
[10:39:39:208] # 1.02 <D> LoRa RX: +OK=2601447Fβββ
[10:39:39:215] # 1.02 <D> LoRa TX: AT+DEVEUI?βββ
[10:39:39:311] # 1.12 <D> LoRa RX: +OK=12CF2CD6B121FC55βββ
[10:39:39:315] # 1.12 <D> LoRa TX: AT+APPEUI?βββ
[10:39:39:414] # 1.22 <D> LoRa RX: +OK=70B3D57ED001013Dβββ
[10:39:39:419] # 1.22 <D> LoRa TX: AT+NWKSKEY?βββ
[10:39:39:516] # 1.32 <D> LoRa RX: +OK=BE679D5D1A6BD9C9B7A48DD1FAA0AA1Eβββ
[10:39:39:525] # 1.32 <D> LoRa TX: AT+APPSKEY?βββ
[10:39:39:619] # 1.42 <D> LoRa RX: +OK=086BA36F48AD9E23CBDD0E5C01A558F0βββ
[10:39:39:624] # 1.42 <D> LoRa TX: AT+APPKEY?βββ
[10:39:39:721] # 1.52 <D> LoRa RX: +OK=230067F7A2617C75A9CC0B16EBB7E418βββ
[10:39:39:730] # 1.52 <D> LoRa TX: AT+BAND?βββ
[10:39:39:824] # 1.62 <D> LoRa RX: +OK=5βββ
[10:39:39:826] # 1.62 <D> LoRa TX: AT+MODE?βββ
[10:39:39:926] # 1.72 <D> LoRa RX: +OK=1βββ
[10:39:39:929] # 1.72 <D> LoRa TX: AT+CLASS?βββ
[10:39:40:029] # 1.82 <D> LoRa RX: +OK=0βββ
[10:39:40:031] # 1.82 <D> LoRa TX: AT+RX2?βββ
[10:39:40:131] # 1.92 <D> LoRa RX: +OK=869525000,0βββ
[10:39:40:135] # 1.92 <D> LoRa TX: AT+NWK?βββ
[10:39:40:234] # 2.02 <D> LoRa RX: +OK=1βββ
[10:39:40:239] # 2.02 <D> LoRa TX: AT+DR?βββ
[10:39:40:336] # 2.12 <D> LoRa RX: +OK=1βββ
[10:39:40:339] # 2.12 <D> LoRa TX: AT+MODE=0βββ
[10:39:40:439] # 2.22 <D> LoRa RX: +OKβββ
[10:39:40:445] # 2.22 <D> LoRa TX: AT+CLASS=0βββ
[10:39:40:542] # 2.32 <D> LoRa RX: +OKβββ
[10:39:48:416] $SEND: 001e0100f36fffffc018ββ
[10:39:48:419] # 10.00 <D> LoRa TX: AT+PUTX 2,10βββ
[10:39:51:492] # 13.00 <D> LoRa RX: +OKβββ
// Here I send AT$MODE=1 and this is the command which goes to LoRa Module
[10:42:04:890] # 143.09 <D> LoRa TX: AT+MODE=1βββ
[10:42:04:985] # 143.19 <D> LoRa RX: +OKβββ // And reply from LoRa module
[10:42:09:916] OKββ // This OK is from Core Module AT parser ther it received +OK from LoRa Module
// Now I send AT$JOIN
[10:42:09:917] # 148.00 <D> LoRa TX: AT+JOINβββ
[10:42:18:119] # 156.00 <D> LoRa RX: +OKβββ
[10:42:18:122] # 156.00 <D> LoRa RX: +EVENT=1,1βββ // You should see this event, this is response from LoRa Module whether the JOIN connected to the network
[10:42:18:128] $JOIN_OKββ // This is OK from Core Module that join is ok