RAK 811 arduino programming

Hello i am trying to program my rak using this code :Evaluation_Boards/RAK811 at master · RAKWireless/Evaluation_Boards · GitHub

Im having trouble connecting to Thingsnetwork…i might be doing something wrong while providing the dev, APPEUI or APPKey since it implies being BIG or Little endian sensitive.

Anyone has it working?

hi @bioshock2k ,

Can you share more details:

  1. What is your hardware setup?
  2. What error replies you saw on serial logs?
  3. Have you tried OTAA and ABP? No success on both?
  4. Gateway connection to TTN ok?
1 Like

Sorry i have excluded those details because everythin, in my eyes is working fine. I program the RAK 811 in another way and everything is fine.

  1. RAK 811 in a Wisnode nreakout board for programming.
    2 Unknown event: 20
    3: the code i presented only uses OTA (for what i read about it)
    4 Yes everything is fine using other methods of programming, using thar sketch is the only issue i have.

So i must discard that it must be really how i put the information in.
Could you give me an example on a TTN APPEUI and how i should put it in the code array?

What other way?

Just because one way works doesn’t mean the Arduino code base should work and it is just the settings.

Well, using RAK base code and running AT commands, programming a custom HEX to do what i want with it joining also the same TTN registered device.

Note that i am using the code that is in the RAKWireless GIT repository…therfore tested and SHOULD work. have you seen the link i posted?

I am just saying that maybe i am not putting the credentials the right way in the arduino Sketch. That is my humble conclusion and asking for some example i can guide to correct or take that chance out off the map.

Hi @bioshock2k ,

I was able to validate your issue. I am also getting Unknown event: 20

I will try to duplicate your setup. What Gateway and LoRaWAN Network Server are you using? Are the EUIs you set on little endian? What MCCI Lmic library version are you using?

1 Like

Except that there have been further releases of the MCCI LMiC library since the docs were created, something isn’t provided by RAK but everyone tends to use on Arduino to varying levels of success. All these builds are a moving target no one could possibly keep up with.

Which version of LMiC are you using? Latest of 3.3 is working for me on other devices.

Can you tell us what the debug output is?

Which TTN version are you using?

As it’s LMiC, of OTAA you have to ensure you are little-endian with the DevEUI and AppEUI.

1 Like

I believe this may be a left over issue from a previous version - I use v3.3 on Adafruit Feather M0 + RFM95 which works wonderfully.

I personally use the defines to disable the Class B pings and the Class C support to keep the code size down. I also turn on the logging to 1 and turn on the error sprintf so I can see more of the detail whilst debugging.

I can have a go at the latest build later on today. For now the laser cutter is on and making a lot of noise so best finish the job at hand :grinning:

2 Likes

I will reply to both comments in this post :sweat_smile:

But to summarize i found out the bad “config” on my part.
It was yes the Big endian on the APP key, AND the config file for the frequencies…the example if for 965 i have the 868 version :sweat_smile: PROBLEM SOLVED

Now i have another that is to figure out how to put this in sleep mode and get those sweet under 1mA consumptions on hold hehehe

This is a nice suggestion i will look into it!

Thank you for the trouble! Did you check the frequencies?
Yes! the AppEUI and dev EUI in little and teh ApP key in BIG.

If you want low power device, the WisDuino(WisNode Lora) RAK811 Evaluation Board might not be the best choice since it has other components like linear regulator and USB to uart converter. You can try the RAK811 breakout board since it is just the RAK811 :+1:

I hope I am not causing you trouble. I am just trying to help :sweat_smile:

Btw, my EUIs are little endian and my App Key is in big. I still got the errors. I actually added #define CFG_eu868 1 to force it on EU868 since that is my Gateway. But no good on my part. I will explore it and add improvements on Github.

That is the correct way round for OTAA - as it says in the bit where they are put in the code.

The library’s docs are good but a bit of a long read so you won’t be the first to be caught out by the fact MCCI think it’s a good idea to go and make a change in the library code base itself rather than allow the developer to configure it from the sketch. In the library there is a project_config folder with lmic_project_config.h where this is set. At some point I’ll figure out how to set this from the sketch. It may be you just need to add a message in to the RAK instructions.

The other standard gotcha is that people don’t set the pins!

I cut my teeth on LMiC when I learnt LoRaWAN as I migrated from simple LoRa for High Altitude Ballooning and didn’t know better. As I’ve got it to work well I still keep up with it for very simple devices but I don’t recommend it for low-resource hardware not supported by the library like an Arduino Pro Mini.

1 Like

@bioshock2k By default, MCCI LMIC is for US915. So when you changed the region on lmic_project_config.h and the Endianess of your EUIs, it instantly work?

I am still on the same situation of Unknown event: 20. I tried TTN V2, V3 and Chirpstack.

I got all the same situion: join request is received by the Network Server then join accept is sent by the Network Server, but it seems it never got accepted by the device :thinking:

@nmcc I think this is related to the STM32duino on MCCI LMIC, timing issues, etc. I’ve used ATMEL (arduino) chips with bare SX1276 couple of times before and I am not having issues with it. STM32duino has proper BSP for RAK811 so the pin mapping are handled by default. Still I do not know what I am missing :neutral_face:

I already asked support from our MCCI friends.

1 Like

No you are not! i first started using it to program the RAK811 and getting used to it. Now it is off the board and standalone :kissing_smiling_eyes:

That is weird! i did only that and it solve…you are in range of your gateway riight? idk but rssi lower that -100 did also errors to me.

I really don´t know i used the default code and only changed the config for the frequencies…

Can I get more details on your setup like are you EU868 or US915? Also, what is your gateway and network server?

1 Like

Yes sure.
I am using a RAK 7254 EU868 and i am using TTN.
The Gateway is configured to connect to TTN.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.