Error: MCCI_LoRaWAN_LMIC_library-3.0.99\src\lmic\oslmic.c:53

Dear TTN-fellows,

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):

MCCI_LoRaWAN_LMIC_library-3.0.99\src\lmic\oslmic.c:53

The complete error msg looks as follows:

10:09:41.148 -> Starting...
10:09:41.183 -> Scanning...
10:09:41.183 -> I2C device found at address 0x23  !
10:09:41.183 -> I2C device found at address 0x76  !
10:09:46.218 -> FAILURE 
10:09:46.218 -> C:\Users\bobin\OneDrive\Dokumente\Arduino\libraries\MCCI_LoRaWAN_LMIC_library-3.0.99\src\lmic\oslmic.c:53

And occurs already in the setup function while calling os_init(); (verified with Serial.println after os_init):

void setup() {
  Serial.begin(115200);
  Wire.begin();
  Serial.println(F("Starting..."));
  pinMode(5, OUTPUT);
  pinMode(A3, INPUT);
  os_init();
  Serial.println("os_init successful");
  LMIC_reset();
  LMIC_setSession (0x1, DEVADDR, NWKSKEY, APPSKEY);
  LMIC_setLinkCheckMode(0);
  LMIC.dn2Dr = DR_SF9;
  LMIC_setDrTxpow(DR_SF9, 14);
  do_send(&sendjob);
}

Conttent of oslmic.c at line 53 is ASSERT(0);:

void os_init() {
    if (os_init_ex((const void *)&lmic_pins))
        return;
    ASSERT(0);
}

Thank you for your help!

Do you want answers posted here or in the Arduino forum, where the same question has been asked ?

2 Likes

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.

2 Likes

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).

You used to have the error, solved it in some way, then had no problems for months and suddenly the problem is back again …

So tell us, what changed ?

1 Like

@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.

1 Like