Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

From v 2.3.2 to 3.0.99 issue #500

Closed
mutton74 opened this issue Dec 17, 2019 · 9 comments
Closed

From v 2.3.2 to 3.0.99 issue #500

mutton74 opened this issue Dec 17, 2019 · 9 comments
Assignees

Comments

@mutton74
Copy link

mutton74 commented Dec 17, 2019

Hi,

I am an amateur users of your library but have been storing and retrieving LMIC state parameters in RTC memory while in deep sleep (ESP32 based board)

This is to avoid an OTAA join every wake up from deep sleep, and enabling use of ABP.

With an update from 2.3.2 to 3.0.99 I now get errors calling two of these LMIC states (LMIC.ladrAns and LMIC.devsAns)

'struct lmic_t' has no member named 'ladrAns'
'struct lmic_t' has no member named 'devsAns'

Any idea why that has changed between the versions and if they are required for a successful ABP join after an OTAA join?

thanks in advance
Paul

@terrillmoore
Copy link
Member

Thanks for your note.

They have changed because the LMIC MAC parser was architecturally incorrect, and had to be rewritten. If you check the issues, there's a pretty detailed log. The old architecture didn't maintain the order of responses, and that's needed for LoRaWAN compliance.

They were not long term state; no need to save or restore them. Avoid using any of the LMIC contents that are not explicitly documented as public, as they will change in the future. Although it's possible to do what you're doing, I regret that we can't really guarantee backward compatibility across major versions. The intent is to introduce APIs that you can call to get binary blobs that are opaque to you, and versioned; later you restore them with a different call.

Remember that Semantic Version major change (2 -> 3) means "breaking change".

Best regards,
--Terry

@mutton74
Copy link
Author

mutton74 commented Dec 28, 2019

Thanks for the info

They were not long term state; no need to save or restore them

This is all I need to know, will remove them from the saved state in my code

thanks again

Paul

@mutton74
Copy link
Author

mutton74 commented Jan 4, 2020

Hi Terry,

By not using these two lines of state code, we get an ADR downlink with every uplink forever, not just the usual one or two after joining the first time - any ideas?

@terrillmoore
Copy link
Member

Yes, but in order to comment accurately I need to know:

  1. which version of LMIC are you using? Check ARDUINO_LMIC_VERSION
  2. which network are you using? (The Things Network, ChirpServer, Actility, etc.)
  3. which region are you using?

Thanks,
--Terry

@mutton74
Copy link
Author

mutton74 commented Jan 5, 2020

Thanks Terry, here are some details

  1. Not quite sure how to do that (amateur sorry)

Here is what is in the lmic.h file

// LMIC version -- this is ths IBM LMIC version
#define LMIC_VERSION_MAJOR 1
#define LMIC_VERSION_MINOR 6
#define LMIC_VERSION_BUILD 1468577746

// Arduino LMIC version
#define ARDUINO_LMIC_VERSION_CALC(major, minor, patch, local)	\
	(((major) << 24ul) | ((minor) << 16ul) | ((patch) << 8ul) | ((local) << 0ul))

#define	ARDUINO_LMIC_VERSION	ARDUINO_LMIC_VERSION_CALC(3, 0, 99, 3)	/* v3.0.99.3 */
  1. TTN
  2. AU921 in the project_config file (AU915)

@terrillmoore
Copy link
Member

Yes, that's a known problem in v3.0.99.3. Please update your library to head, which is v3.0.99.10. We made another breaking change, which is CFG_au915 is now (correctly) the magic word for Australia. I tried to make backward compatibility work, but... you may run into an issue.

@mutton74
Copy link
Author

Please update your library to head, which is v3.0.99.10

Sorry Terry, just getting back to this - how do I do the above?

Latest library available within Arduino IDE is v3.0.99.3

thanks in advance

@terrillmoore
Copy link
Member

terrillmoore commented Jan 18, 2020 via email

@terrillmoore
Copy link
Member

Hi @mutton74 -- because of bug #523, #521, #524 I think it's not a good idea to release.

What you should do is follow the procedure for manually installing arduino libraries -- get a zip file using the GitHub web page, and then unzip that over your existing arduino-lmic library. If you installed from the IDE, it will be ..../libraries/MCCI-LoRaWAN-LMIC-library. Replace that library with the file you download. Don't leave the old one lying around, it will confuse the Arduino IDE. Alternately, you may need to wait a day or two until I have a change to correct #524. I'm traveling now, so things are even slower than normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants