How to setup sent callback for promiscuous mode
Posted: Tue Oct 01, 2019 7:11 am
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.
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.