After flashing the code for LoRa-nodes for months flawlessly, I am having problems with this nasty error again (MCU: Atmega1284p, Arduino IDE and newest MCC LoRa library):
I am just trying to reach out for some help :). Both forums combined address a larger audience but TTN is much more specific. Anyways, if you think it is offensive, I can remove my question on the Arduino forum. I didn’t see any problems in the first place.
Remember that both forums are populated by volunteers, so its less wasteful of their time to post in one forum and wait for replies. If you dont get a reply in one forum after a reasonable time, then try another forum.
And, please, DON’T open an issue in the MCCI github repo.
Ask Google, you will find many threads on the same topic.
Solution is always the same: Check your pin mappings and wiring. Your radio cannot be accessed by your CPU for some reason related to your hardware (which you have to figure out).
@LoRaTracker, you are right, I used a wrong pinmapping because old and new code have somhow got messed up. Next time, I see that error, I will know it is a communicatoin problem between CPU and Radio. I’ll also post it on the Arduino forum to save people’s time since I fully agree with your earlier comment.
Just a further note to help future users who find this thread looking to solve similar issues…
My problem was also wiring related: specifically, none of the instructions I found online indicated that the SPI interface needs to be connected in addition to the PIO0/PIO1 pins. Connecting the SPI interface resolved my errors.
Here is my connection layout, and as far as I can tell, the SPI interface (NSS, SCK, MOSI, MISO) are properly connected). Is there any additional connection needed here?
I have to under line, the Arduino sketch is uploaded properly to the Arduino Pro Mini, but the serial console says “~/Arduino/libraries/MCCI_LoRaWAN_LMIC_library/src/lmic/oslmic.c:53”.
Your wiring is OK - it has the required connections. The error occurs because the software doesn’t match the wiring. You need to tell the library what connections you have made as per the detailed instructions AFTER you have upgraded to v3.3.0. You may need to turn off some of the Class B settings to reduce memory usage.
But I still don’t know what is wrong. What do you mean by turning off some class B settings?
---------------------------------------[Update]------------------------------------
I don’t know how, but somehow I’m now getting the following message from the serial console:
Deadlines on new to Arduino & LoRaWAN - rock & roll!
I’ve edited the code block to format it as per guidelines - please use the </> and never ever post text as an image.
The good news is that the original problem has been solved and your device is now transmitting but is not hearing a response to its Join message. If you’re not clear what that is, read all of this: https://www.thethingsnetwork.org/docs/lorawan/. If you haven’t read all of it already, it’s the fundamentals that you should know and if you don’t, you will find the going very difficult as well as many requests for you to read it.
Thanks a lot for your rapid replies. I have an indoor gateway 3m away and originally, nothing appeared on TTN console when I got the errors on the serial monitor.
But I got it all running now. The AppKey I used seemed to be the wrong one, wrong and in the wrong format (msb instead of lsb).
Thanks again, and sorry if I waisted your time with some beginner errors.
We’ve all been there - and for a change from some of the DIY device cries for help, you’ve got yourself sorted in double quick time - bodes well for your LoRaWAN journey.
As Nick says looking good - you might also get better experience and reduce risk of problems if you keep a good distance or an absorber such as a wall between your node and GW, 3m probably ok depending on type of antenna, orientation/alignment, intervening items etc., but give a couple meter more to be sure
I am getting a similar error in one of my nodes.
I work with a heltec esp32 v2 lora , which has lora in the hardware.
The node is flashed with my code, and works without problems for several days/hours, connecting and sending data packages to my application. Then after a certain time elapsed, it stops responding. I am it with deep sleep mode.
With the serial output, i could backtrack the error to this similar. As the LMIC_init, has an assert (0) this stops the code. But unfortunately, and even using the WDT to reset the device, the problem persists until i power cycle (hard-reset) the whole node. Then it starts working again immediately with the same behavior.
In my case the pin mapping is correct, as i can send data for a certain time.
The Heltec stack does not use LMIC and you are describing a hardware issue that manages to lock up even the WDT which normally would reset the MCU so has no bearing on this topic - I appreciate that you wanted to post but you need to either find something that relates to Heltec or read a bit more before you reach a level that allows you to start a topic.
What ever you do, you MUST post the serial output that you got as that will be the single most important piece of information you can provide.