Noob contributer's question: where is the line of API compatibility?

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Adam5Wu
Posts: 6
Joined: Wed Dec 28, 2016 3:30 am

Noob contributer's question: where is the line of API compatibility?

Postby Adam5Wu » Wed Dec 28, 2016 4:07 am

Happy holidays everyone! :D

I have a long time interest in IoT and recently just got some free time and some ESP8266 on my hands. And without much difficulty, I found MicroPython, which I think is a perfect platform for IoT development.

I discovered some lacking feature bindings on ESP8266, specifically, to do with hidden ssid.
1. When scanning for AP, ESP8266 native SDK provides a choice of whether hidden SSID is scanned or not
2. When connecting to an AP, the native SDK again allows specifying binding to BSSID

I intend to make PR to enable these bindings to MP on ESP8266.

However, I quickly run into some delima/confusion, particularly on how to draw the line of API compatibility.

Choice #1. compat. wrt. ESP8266 port.
I can extend the current API with the new functions, without considering other ports.
For example, the wlan scan() function can have an optional parameter, which specifies whether hidden SSID should be reported.

This seems to be the easiest, however, it will break compatibility wrt. other ports.
(Imagine someone writing a universal wlan controlling library aims to work on all MP ports, probably will get very upset at me... :D)


Choice #2. compat. wrt. all ports.
This means that I probably should not touch the scan() function.
Instead, I should write a configuration toggle in port specific module (esp), which toggles the AP scaning behavior.

This requires more work, and in addition, makes "user level" coding more complex by having to make detour.
As a current ESP8266 developer, I would rather not to do that.


So, my question is, what level of compatibility is acceptable for contributors? Whether the developers and maintainers of MP had intention or policy to achieve cross port compatibility? Or they believe best-effort based contribution is good enough? :P

Return to “Development of MicroPython”

Who is online

Users browsing this forum: No registered users and 2 guests