Suppose two ESP chips are connected (over WIFI or BT). Both have predetermined SSID and Passwords at compile time. One device is powered as Access Point (master) while second (which connects to AP) is a slave. Once they establish connection, they stay permanently connected until power is down.
Is there a library (or some example) which would provide wireless-uart over such connection?
Or, even better, is there a library or example which would provide wireless-memoryshared blocks among those two devices which refresh on some predetermined interval?
For example, both devices devA and devB have two memory regions regR and regW. RegR is a read only and represents a copy of regW block from other device and regW is write only and represents block which has to be sent to other device on next time interval.
Doesn't matter if WIFI or BT is chosen, they should provide only "carrier like" behavior, even doing automatic encryption of data "in the air" but that should be completely automatic and completely transparent for top-level component like Memory_Shared_Regions. For example, when you install a driver of such component you pass some structure like
volatile struct Mem_Shared_config {
pchar* SSID;
pchar* password;
DevType {access point or Slave);
uint8_t* SendingBuffer;
uint8_t* ReceivingBuffer;
bool doEncryption;
uint32_t TimeIntervalForExchange;
bool ExclusiveConnection;
}
... and such a driver provides all necessary configurations, esstablishing connection on power up, and providing those block exchanges
on each time interval, assuming that wifi/bt will not be used for any other device connection if exclusive connection is true etc.
Any similar example?
Example or library which covers some of standard concepts in between two permanently connected devices
-
- Posts: 1708
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Example or library which covers some of standard concepts in between two permanently connected devices
Usually people use send(socket,...) to write a copy of some local memory to another device's local memory, and recv(socket,...) to duplicate a piece of remote memory to local; see e.g. https://github.com/espressif/esp-idf/tr ... ls/sockets
Re: Example or library which covers some of standard concepts in between two permanently connected devices
Thx for the advice. I adapted it to my needs and made it usable in my app.
Who is online
Users browsing this forum: Bing [Bot] and 124 guests