In the ESP8266 Non-OS SDK API Reference, under wifi_send_pkt_freedom method it states,
Only after the previous packet was sent, and the sent callback is entered, the next packet is allowed to send. Otherwise, wifi_send_pkt_freedom will return “fail”.
How does one setup the sent callback? - I have set up espconn_regist_sentcb() before for TCP, but there does not seem to be such a method dedicated to promiscuous mode and the required espconn_regist_sentcb method requires an espconn structure that can only be configured with a TCP or UDP object. Since promiscuous mode is neither, what do I do? All examples that I have found on the Internet just brute force the wifi_send_pkt_freedom and let it fail... sometime trying multiple times immediately after each other expecting a different answer. I would rather check it being ready and only then create the message to be sent.
Thanks for your help.
How to setup sent callback for promiscuous mode
-
- Posts: 22
- Joined: Thu Dec 14, 2017 10:53 am
- Contact:
How to setup sent callback for promiscuous mode
Postby Inquisitor » Tue Oct 01, 2019 8:07 pm
3 lines of code = App/Web Server w/ GUI Admin, File Mngr, OTA, AP Mgr, Perf Metrics, WebSocket Comms, App API, All running on ESP8266... Even usable on ESP-01S
https://www.esp8266.com/viewtopic.php?f=11&t=23535
https://InqOnThat.com
https://www.esp8266.com/viewtopic.php?f=11&t=23535
https://InqOnThat.com
-
- Posts: 22
- Joined: Thu Dec 14, 2017 10:53 am
- Contact:
Re: How to setup sent callback for promiscuous mode
Postby Inquisitor » Tue Oct 01, 2019 8:33 pm
My bad - I was trying to set it up on the receiving logic side...
wifi_set_promiscuous_rx_cb(callbackListen);
wifi_promiscuous_enable(1);
... when obviously, I should have seen:
int wifi_register_send_pkt_freedom_cb(freedom_outside_cb_t cb);
wifi_set_promiscuous_rx_cb(callbackListen);
wifi_promiscuous_enable(1);
... when obviously, I should have seen:
int wifi_register_send_pkt_freedom_cb(freedom_outside_cb_t cb);
3 lines of code = App/Web Server w/ GUI Admin, File Mngr, OTA, AP Mgr, Perf Metrics, WebSocket Comms, App API, All running on ESP8266... Even usable on ESP-01S
https://www.esp8266.com/viewtopic.php?f=11&t=23535
https://InqOnThat.com
https://www.esp8266.com/viewtopic.php?f=11&t=23535
https://InqOnThat.com
Who is online
Users browsing this forum: No registered users and 267 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.