Got that, however it does not have the Lora related definitions.
Mouser in the UK have stock of the dev board. However the little sods have increased the price from ÂŁ52 to ÂŁ71 in a week. But they do have stock and theyâve put a lot of thought into the board and the documentation. Rather than just stick the module on a board and thatâs it. Got one delivered yesterday. Time to play. Tiling the bathroom can wait.
Stuart
yes Stuart, Iâm very impressed to ⌠fun to play with, havenât got to the LoRa specific instructions yet, but he⌠so many new things to discover and learn.
trying to delete a file from the flash file system with AT+DEL âxxxxâ
It didnât work, finally I used AT&F * , what went wrong here ?
I really donât know why at+del didnât work in there.
I usually keep my filenames without spaces because then I can run them by just typing the name, however Iâve just tried your example and in my case at+del had no issues with it.
That said because at+del doesnât really free anything - itâs rather pointless other than for cosmetic reasons - I tend to go for the:
atz
at&f 1
which is just a bit more precise than nuking everything with at&f *
The disadvantage of having to use at&f 1 to clear the flash is it zaps the LoRa keys as well. Suggestion for Laird (@BWhitten): store the keys somewhere else. I love not having to include them in the software but having to reload them every time flash is cleared after updating the software will be a pain once deployed.
I was hoping to be able to update the code running on the device using bluetooth but the lora keys being zapped every few updates kills that option.
How are you planning to program the module over Bluetooth?
Is it using the Virtual Serial Port (VSP) service mentioned on the manual (page 247)? If so I think you could send the keys as well as itâs essentially a virtual terminal so should accept the relevant AT commands.
I havenât tried this due to the difficulty in finding a VSP implementation where the Laird device is actually a BLE central (all the apps expect the BL600, a peripheral). The manual mentions an iOS app âRM1xx Serialâ and a Windows application for BLE enabled PCs but I donât think theyâre available yet.
I am hoping the mechanism works like it does for the BT900 and BL600 as outlined in this application note.
Being able to set the LoRa keys that way would be nice, however I do not particularly want to have to set the keys after each software update.
true, an external mem maybe ?
Thatâs fancy I was just probing by trying a read from reg 0x0:
I thought about using an external memory to store the LoRaWAN configuration, and the ultra-cheap ($0.50) DS3231 RTC module Iâm using conveniently also has an Atmel I2C EEPROM but unfortunately those configurations need to be set from interactive (ie AT) mode.
I donât see a way to tell the RM186 to read the settings from an external EEPROM and set the keys from that.
The setup on the picture with the mem module, I used to test the I2C scanner.
But off course I will try to write a âshadowâ register to it.
And after a coldstart this shadowregister is red and written to the RM186⌠in theory
I donât see why it canât be done⌠the only trick is to sync your RTC, which can be done
with your system clock when connected.
Sure but the problem is the only way to set the keys on the RM186 seems to be via interactive mode, ie:
at+cfgex 1000 âYour App EUIâ
at+cfgex 1002 âYour App Keyâ
atz
So how can you read the register from the external mem via I2C - which needs to be done inside smartBASIC - and then change to interactive mode to set the keys - but still be under the control of your script?
Unless of course you hook up an external micro and issue those commands via the UART, but that kind of defeats the purpose of the RM186âŚ
That said I hope Iâm completely in the wrong here and there is way
yes youâre right ( smartBASIC Extensions v1.0 page 260 )
@jmarcelino @BoRRoZ: Have a look at LORAMACSetOption with the define LORAMAC_OPT_APP_EUI and LORAMAC_OPT_APP_KEY you should be able to set both (you cant read back the APP_KEY for security)
These settings may need a reboot to take effect.
Please let me know how you get on.
Yes, it worked! Thanks so much for the tip.
Can set EUI and KEY from smartBASIC with just:
result = LORAMACSetOption(LORAMAC_OPT_APP_EUI, eui$)
result = LORAMACSetOption(LORAMAC_OPT_APP_KEY, key$)
Didnât even need a reboot in my case. It was able to join and send to TTN right away. but maybe a restart is safer.
A world of possibilities now cc @BoRRoZ
thank you for bringing this good news.
as @jmarcelino says⌠this opens many more possibilities.
ready for gps test
Mouser had some stock, but they donât dispach my order, WTF, I called them yesterday they told me they have module and it will dispatched by the end of the day, but nothing done !!!
How are your mouser orders here ?