-
-
Notifications
You must be signed in to change notification settings - Fork 70
[lightning-ln882h] Add support for Lightning LN882H family #312
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
Conversation
… it will never be linked. fixed by redefining prototypes inside families
have you tested this on LN882x? LN882H is a newer family with a different SDK. |
no, i've only tested on ln882h, but ln882h is from the ln822x family , so it's worth testing. |
hmm. I thought that too. I have flashed OpenBeken LN882H builds to LN8825B quite a number of times without success. Are you building separate LN882X binaries or is the output a single LN882 fw? |
Hey, I've had a look to the vector table of the 2 chips and they are different, so these chips are definitely not fully compatible. |
…into feature/ln882x merge remote changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many files updated.
Please see my comments on boardgen generated files.
@lamauny The SDK (on GitHub) will have to modified to rename the two header files (possibly more?). For instance, they could be prefixed with |
Could it be fixed by changing include path order ? |
I don't think so. In that case LibreTiny would then pick up wrong headers. |
and if we add a dummy fixup WiFi.h with something like
modify SDK is maybe the easiest way but it's a bit of a shame, it will make sdk updates more difficult |
This solution would only work for the SDK .c files, but LibreTiny files would not be able to include the SDK's wifi.h when they are needed (in sdk_private.h). EDIT: ...unless you use the wifi_lib_export in sdk_private as well - then it might work. I can test this on Windows later. SDK updates are rarely needed. Because the SDK commits are usually poorly described, updating might break existing LibreTiny functions (we've seen something like this with Realtek). So I think it shouldn't be a concern that updates won't be possible easily. |
maybe libretiny files could include |
I tested your idea, it won't work - LibreTiny's WiFi library is before fixups in the include path. The best solution (and the only possible one, I think) will be to rename the headers.
|
Is it wanted that fixups include paths are after common path ? just asking. |
Not necessarily - but fixups are intended to replace SDK headers/code, not to solve complex problems with duplicated header names. In the Beken SDK there was a similar issue, where FreeRTOS's |
EDIT: I've done the modification on SDK by simply adding dummy header files, no file modification ;-) |
…ders on case insensitive systems
ltchiptool updated too |
I'm happy to contribute to this excellent project by adding basic support for Lightning Ln882h family.
Supported features
Wifi AP is only working in Open Auth mode, and Mixed mode (AP+STA) is not supported
More supported features will be added in the future, but this support is sufficient to pilot the relay and handle button of my aliexpress smart light module (kind-of) based on a LN-02 module.
Links to the PR on other repos adding this feature :