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.
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.
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?
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.
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?
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.
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
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 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
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
I hope I am not causing you trouble. I am just trying to help
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.
@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
@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