Comments (5)
@dmartauz I am very happy it worked as expected.
A proper example code for ESP32 was within our plans, so this change that you suggested is a good opportunity to proceed on doing.
My estimation is that within this week we will have a first version. We will keep you updated.
from microcoapy.
Hello @dmartauz
to my understanding you suggest to decouple the CoAP logic from the socket operations. Correct?
Indeed it is a good idea and future-proof. The initial version was implemented as is because on Pycom devices, the sockets are already encapsulated by the micropython API. So in case of WiFi, it is a typical UDP socket, whereas on NBIoT it is AT commands sent to the modem to handle the UDP socket on the modem.
Do you have any specific example of a user case where the network interface is not mapped to the internal IP stack? If yes, it would be a good input for us to use it as test scenario.
Eitherway, during next week we will proceed to the decoupling and we will keep you updated.
from microcoapy.
@ftylitak yes your understanding is correct.
My setup is ESP32 (WROVER module) with Quectel BC66 NB-IoT modem on a custom board. I already performed some testing of your lib against Thingsboard. First time without any modifications over WiFi connection, second time I passed content of "buffer" bytearray from sendPacket method to the NB-IoT modem via AT command. Worked as expected in both cases.
from microcoapy.
in branch IN-209-esp32-example there is a proposed solution to your suggestion through Pull Request #2 .
The branch also contains an example for ESP32 that show how to use a custom socket.
The custom dummy socket that has been used is:
microCoAPy/examples/esp32_wifi_coap_client_custom_socket.py
Lines 67 to 83 in a884270
and is set in microCoAPy instance as:
microCoAPy/examples/esp32_wifi_coap_client_custom_socket.py
Lines 91 to 95 in a884270
Could you give this branch a try?
Does this fullfil your requirements?
from microcoapy.
Closing the issue due to inactivity.
If there is any suggestion of a different approach on this subject, please open an new issue.
from microcoapy.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microcoapy.