Rak811 Tracker Board

(Jezd) #142

I agree, its been a learning curve this RAK device, and turned out a whole lot of new skills are needed (I dont have most :slight_smile: ) - I just don’t think there is a easy answer, download the tools and start playing and testing, there is some good support on here for using MS Visual code + PlatformIO, plus others seem to have success with Keli5, I found CoIDE to be a pain to use as the site was down for weeks on end.

(Amartini) #143

Thank you for answering, I have seen that many have uploaded parts, and many have succeeded but have not put a detailed explanation.


I’m currently working towards rebuilding this entire codebase from the development tree here: https://github.com/Lora-net/LoRaMac-node/tree/develop

This is the original reference provided by Semtech and has a whole load of bugfixes. It also supports class B and Class C operation and will support newer versions of LoraWAN.

The team responsible are also supporting CMake in their dev branch which makes building so much easier than having to struggle with individual toolchains.

So far, got the code and using the SensorNode code as a base, I’ve got basic builds up and running. Will continue the merge and get it up on github soon

(Kalon33) #147

I got that error with RAK811 trackerboard:

stm32flash 0.5


Using Parser : Raw BINARY
Interface serial_posix: 57600 8E1
Version      : 0x31
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0429 (STM32L1xxx6(8/B)A)
- RAM        : 32KiB  (4096b reserved by bootloader)
- Flash      : 128KiB (size first sector: 16x256)
- Option RAM : 32b
- System RAM : 4KiB
Write to memory
Erasing memory
Mass erase failed. Try specifying the number of pages to be erased.
Failed to erase memory

Any idea how to fix that?

(Frml55) #148

I need again help.
I work with CrossStudio and got the sw working (exept mapping with cayenne or ttn-mapper, but this could be a gateway problem).
Now I tried to get 32kB Flash instead of 16kB by changing from STM32L151xB to STM32L151xBA.

Result: Failures while compiling stm32l1xx_hal_rtc_ex.c

#if defined(STM32L100xBA) || defined (STM32L151xBA) || defined (STM32L152xBA) || defined(STM32L100xC) || defined (STM32L151xC) || defined (STM32L152xC) || defined (STM32L162xC) || defined(STM32L151xCA) || defined (STM32L151xD) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L162xCA) || defined (STM32L162xD) || defined(STM32L151xE) || defined(STM32L151xDX) || defined (STM32L152xE) || defined (STM32L152xDX) || defined (STM32L162xE) || defined (STM32L162xDX)
hrtc->Instance->SHIFTR = (uint32_t)0x00000000;
hrtc->Instance->CALR = (uint32_t)0x00000000;
hrtc->Instance->ALRMASSR = (uint32_t)0x00000000;
hrtc->Instance->ALRMBSSR = (uint32_t)0x00000000;

‘RTC_TypeDef {aka struct }’ has no member named ‘SHIFTR’
‘RTC_TypeDef {aka struct }’ has no member named ‘CALR’
‘RTC_TypeDef {aka struct }’ has no member named ‘ALRMASSR’;
‘RTC_TypeDef {aka struct }’ has no member named ‘ALRMBSSR’;

Has anyone an idea?

(Olof Ast) #149

The device does not support mass erase…
Check my repository for necessary changes. https://github.com/Ebiroll/RAK811_BreakBoard/tree/master/stm32flash_src

(Goran Mahovlic) #150

I know that for flashing I did change something to 255
Probably number of pages to erase …

(Frml55) #151

I’ve solved the compiling problem. I used the old version of STM32 package in CrossStudio Packagemanager.
With V3.20 it works well.

Now I have build the elf/bin files, but when start debugging the program runs in Hard Fault Handler after some printf’s. The failure doesn’t appear every time exactly at the same point. It seems that an adressout of ranged is called?!

Here is a complete screenshot. In the lower right screen there is the HFSR (Hard Failure
The value is 0x4000000. What does that mean?


Tried to play with this device, what a pain
plugged setup DEV_EUI, APP_EUI, APP_KEY from AT command, then start otaa

saw 1st join request, on TTN then 1st frame and now it’s over can’t receive anything,

Here are the serial Log of module

[Debug]: latitude: 46.624835, longitude: 0.435327 , altitudeGps: 120 
Not joined
[Debug]: tempr: 29
Not joined

device still not joined. and I have exactly the same problem with RAK Lora Button,
check this issue
I don’t see any firmware update on RAK site, or any .bin, does this mean there is no update?

Anyone succeded to get this module or any RAK811 join TTN and works?

(Goran Mahovlic) #153

This is the way I manage to flash it from linux with repo that I have send.
sudo stm32flash -w Debug/classA.bin -v -g 0x0 -e 255 /dev/ttyUSB0

(Goran Mahovlic) #154

You cannot use bin file, you need to change keys inside Commissioning.h to be the same keys you have on TTN.

I have tested this node and it works.
And If you see join request you need to see join accept.

If you do not see join accept then you maybe have some problems with keys.

If you see join accept and node is not joining then maybe you have some problem code.

If you use linux try with repo I have shared just change keys and uplaod it from console (you need to set flash jumper first and reboot board)…

(Frml55) #156

Problem is solved. Wrong memory map file selected in properties :+1:

(Jezd) #157

I’m not sure of there is some newer code that RAK has for the RAK811 tracker/sensors, the latest GPS modules supplied now are preloaded for ABP so that has changed - one thing worth doing when you get your new board is checking the serial output and recording the DEV_EUI, otherwise you will need to burn the AT firmware and use AT commands to get the DEV_EUI - also noted that the temperature values are about 10’c higher on the new code - I know these arent true temp sensors but relative temps but still I wonder if they have changed more code.

Sadly I am going to reburn them, may ask RAK if new code is pending? (software version says still 1.02)


Latest code is the LoraMAC project linked above but it needs adapted for this board

(Coeus) #159

I just came back to the fold and played a little bit more with RAK811.
I tried to use the AT Commands and read the official documentations but I seem to miss out something obvious.
I can confirm the CP210x UART serial USB driver is installed properly but when I use the screen command, I get the echo from the board (such as the feedback of MEMS sensor etc.) but I cannot send any AT command. Am I missing anything? I am on a Mac.

(Kalon33) #160

Any news from your latest LoraMAC port to RAK811 trackerboard?

(Coeus) #161

Are there a bit more details for me to read regarding using RAK811 with ttnmapper?


The LoraMAC port is going slower than I thought as a) the new development branch of LoraMAC doesn’t have a porting guide yet and b) Rak have used an older version and done some odd things with it where they rotate LoraWAN ports to pack more data (among others). The build chain is up though which is a start

In terms of TTN, the base code can be used if you compile with new device and application IDs however it won’t be very data efficient as it doesn’t send data packets often

On that, I’m thinking the best thing to do in LoraMAC is to ignore the cayenne example and start with a simple gps example as most people want to map with this node

(Coeus) #163

Anyone successfully send AT Commands to this board in Mac? I thought it would be simple enough but what I get is like a serial monitor - I cannot send any command over to the board. I can see all the debug messages.

I tried to follow the instructions of the official guide but no luck.

I have never dealt with AT commands before so please bear with me.


@coeus Yes. I used the Arduino serial console for that.