LoRa climate module ChirpStack

Hi,

I’m running several months LoRa climate module with Mikrotik GW and ChirpStack. Today I have decided to install new playground (finally :slight_smile: ) and to flash new firmware to module (hardwario/bcf-lora-climate-monitor β€œlatest”). Flashing went good so I connected to module and made β€œAT” setting as usual (with parameters that I wrote down lastly):

AT$NWK=0
AT$BAND=5
AT$MODE=1
AT$DEVEUI=< some deveui i have registered on server>
AT$APPKEY=< some appkey i have registered on server>

tested AT$STATUS so I can see temperature, humidity etc… so far so good
now it is time to connect to GW so let’s AT$JOIN … nothing happened no ERROR no JOIN_OK, on console, just OK, but device/module is not connected.
Did it again: reset, reflash, reset parameters … JOIN and nothing just OK. Device is not seen on GW.
Any clue? Till now everything was perfect. Problem with latest firmware?
Appreciate any hint.

best regards
Oskar

Hello Oskariot,
so the older firmware 1.2.0 worked fine and the 1.3.0 has this issue?
Are you using firmware bcf-lora-climate-monitor ?

The OK response means the AT command was correctly received, but no anwer from LoRa Module is weird. We’ll investigate what could be wrong. It seems like the difference was only the SDK version. We changed some branding in text files and SDK.

Did you tried power reset of the whole stack? Disconnect USB and batteries?

Hi Martin,

yes, as I have written in my post, the firmware = hardwario/bcf-lora-climate-monitor β€œlatest” .
I’ll try older version tomorrow and I’ll come back with the result. I didn’t have time to check.
Regarding β€œreset”, sure, I have disconnected the module from batteries and also from USB.

Regards,
Oskar

Hi Martin,

older firmware 1.2 didn’t help, which is very strange.
Behavior is the same, see attached picture.
After JOIN the response is only OK.

Regards,
Oskar

Sorry for late reply, I overlooked this thread :frowning:

A week ago I’ve added debug outputs to the latest SDK which prints the communication between modem and Core Module to the log. Do you know how to build firmware so you can add function bc_cmwx1zzabz_set_debug(true); to the application_init?
https://sdk.hardwario.com/group__bc__cmwx1zzabz.html#ga18ef89d33262fc51a3234f6b5b32d98b

Hi Martin,
no, I don’t know how to build firmware, but I can try it. Please send me a link to description how to build it. Thank you.
Oskar

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

Hi Martin,

thank you very much for description and firmware. I’ll go safest and fastest way and flash firmware prepared by you.
I’ll let you know results.

Regards,
Oskar

Hi Martin,

I have made flash the firmware you provided and put the video on link below. I made the video due to the fact that the output is rolling and I could hardly catch/read the output. It seems that it doesn’t help. For me, the behavior is the same as before…
Here is the link:
https://drive.google.com/file/d/1DT62mVfqrWuOi3G9NUQ_nwPkIeLmn2tK/view?usp=sharing

Best regards,
Oskar

Hi, it seems like the LoRa Module is not responding to the basic AT command.

It could be one of:

  • Firmware was somehow reset to factory defaults which is using 19200 baudrate, we configure them to 9600 baud, this could be tested if you have USB/UART 3V converter and connect RX, TX, GND and VCC (3.3V) and send AT command with LF carriage return. (It could be also tested with Core Module and custom FW)
  • Firmware was corrupted and it is not running anymore - could be reflashed
  • The module is damaged somehow.

Do you feel like you can try the first trick with the converter or Core Module, or would you like to send the module back so we can replace it in warranty?

Martin

Hi Martin,

ok, I’ll send it to you to re-flash it, please send me an address where should I send the module.
Thank you for your patience.

Regards
Oskar

Send it here https://shop.hardwario.com/contact/
Thanks

Module has been sent today.

Hi Martin,

I have received new module and it works like charm again.
Thank you for your help.

Regards
Oskar

1 Like