Rak811 Tracker Board

:+1: Ok, the I’ll use the XBA Version

I registered my device as an application on TTN and got an TTN-handler-eu.
I put this in Commisioning.h.
That’s all?

Did you see my Device <-> J-Link Connection Chart? Is it correct?

How do I get the bin file in the devices Flash? Is it flashed, when I push the “Debug” Button in CoIDE?

Sorry, but I’m just a beginner…

You can flash the bin file with the demonstrator tool mentioned earlier. You just move the BOOT strap pin one step.

Or you can compile the tool I used,


In directory, stm32flash_src
I put a prebuilt windows version there also.
https://github.com/Ebiroll/RAK811_BreakBoard/blob/master/stm32flash_src/stm32flash.exe

I also compared your connection chart with this,


I think it looks OK, but have never used it. Will probably try later.

2 Likes

Wow.
I’ve got messages over ther serial interface.

Here the string: GPS coordinates match 100% to my location. Therfore I put in some x and y :slight_smile:

[Debug]: tempr: 30
_ _
Not joined
_ _
[Debug]: latitude: 48.xxxxxxx, longitude: 7.yyyyyyy, altitudeGps: 302

1 Like

You’ll see there is now a ttnmapper integration available in the console. It will work with Cayenne messages although a format that also includes hdop is preferred

I’ll have a play with your code later @OlofAst - keep up the great work on the github updates!

Just on TTN side the board connects fine via OTA on SF7, also switches to random frequencies on uplinks etc all fine, but after the SF7 join request it switches to SF12 and stays there - need to sort this out

Is it right to register the device and then put in the values in commissioning.h?

The values in commissioning.h are big-endian. What does that mean for project building?
Do I have to compile all files with big endian? Do I have the choice between little and big or is it fixed for STM32L151?

tracker

:sunglasses:

5 Likes

frml55 Have a look here, https://os.mbed.com/teams/Semtech/code/LoRaWAN-NAMote72-Application-Demo/

1 Like

That was me :slight_smile: also just had my two GPS versions arrive today

1 Like

Ok regards ADR and my first test node being sat on SF12 forever, checked the packet decoder and ADR is not being set for some reason. https://lorawan-packet-decoder-0ta6puiniaut.runkit.sh/

In main.c yes #define LORAWAN_ADR_ON 1 is in place.

Assuming base64-encoded packet
QLYjASYA2gcD6PadZ8biYcROA0el

Message Type = Data
  PHYPayload = 40B623012600DA0703E8F69D67C6E261C44E0347A5

( PHYPayload = MHDR[1] | MACPayload[..] | MIC[4] )
        MHDR = 40
  MACPayload = B623012600DA0703E8F69D67C6E261C4
         MIC = 4E0347A5

( MACPayload = FHDR | FPort | FRMPayload )
        FHDR = B623012600DA07
       FPort = 03
  FRMPayload = E8F69D67C6E261C4

      ( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] )
     DevAddr = 260123B6 (Big Endian)
       FCtrl = 00
        FCnt = 07DA (Big Endian)
       FOpts = 

Message Type = Unconfirmed Data Up
   Direction = up
        FCnt = 2010
   FCtrl.ACK = false
   FCtrl.ADR = false

Just hard coded a ‘dirty’ fix in loramac.c

  * LoRaMac ADR control status
  */
  static bool AdrCtrlOn = true;

Resulting in:

Message Type = Unconfirmed Data Up
   Direction = up
        FCnt = 3
   FCtrl.ACK = false
   FCtrl.ADR = true

I changed to Crossworks and have got the code compiled and linked.
Now I tried to start the OTAA process, but without success.
It was hard to find out (after hours of try) that the two EUI has to implement in little endian, and the key in big endian (I hape that’s right), but that doesn’t help.

Here the output from the board (EUIs and KEY are changed for security reason):

> RAK811 BreakBoard soft version: 1.0.2
> 
> Selected LoraWAN 1.0.2 Region: EU868 
> 
> OTAA: 
> Dev_EUI: 1C 84 A7 D3 F7 D6 ED 00 
> AppEui: 90 D0 00 D0 7E D7 B3 71 
> AppKey: 2D DF 8EC E4 10 E3 D2 B3 7C E9 CC 8C 0F 90 4D 33
> OTAA Join Start...

So its trying OTAA connection, what are you seeing on your gateway console? triple check those parameters in the RAK output with your TTN application too

Yes it’s trying, but not sucessful :sleepy:
I have to admit, that I have no own gateway. I am waiting since months for my ttn gateway.
But I have more than one strong gatways which should receive my data.
I have copied device EUI an Application EUI in hex / lsb and App Key EUI in hex/msb from TTN Website and copied it into Commissioning.h.
No idea why OTAA doesnt work.

Hi.
I have a few rak811 wisnodes that I have working successfully in Australia.
I gather you have the AT modem style firmware running on your device. The AT commands via the serial port should work for you.
Check the AT command documentation.
Make sure you are running the right frequency plan for your region.
You can set the app_eui and app_key via standard AT commands. You might also have to set up the channel mask command to restrict transmission to only the 8 channels supported by your gateway. You do not need to do any conversion of app_eui and app_key. Just cut and paste into your terminal program from ttn console.
The dev_eui should not need changing, it should be set by the hardware.

Thank you for helping.
Sorry I am just beginner, but I don’t think it is an AT command firmware.
I use the CLASS_A project (KEIL)

Hi there, no this is not the AT firmware but the tracker/sensor code with a lorawan stack, you can install the standard 811 AT command firmware to test but that is a different approach - the one here is effectively a stand alone coding the STM32L151 with the LORAMAC library etc

1 Like

You probably need to be 100% you have a reachable gateway first, diagnosing a failed connection is going to be difficult otherwise - does any data appear in the application data tab? these boards have a nice reset button that work well as you monitor the TTN console for activity.

What distance are the other gateways from you?

The RAK 811 docs refer to use of “Uart AssistTool” when using AT commands & I see graphics with title “CommUart Assistant”. Anyone have a link to this specific tool? Google didnt pull anything directly same and quick check on RAK site (+Github) found nothing…feeling a bit dumb here! :wink:

The tracker code that I have installed on my RAK811 WisNode board still uses the AT commands on the USB/serial port.

You should still be able to use the AT commands as I have outlined to set the app-eui and app-key.

Try sending at+version to the 811 and see what comes back.

The guys at RAK are also very helpful.
You could try contacting them directly.