Open mehdilauters opened 7 years ago
After several tests the problem was from another part of code. Sorry for the issue
Actually it was working with the non os sdk, but still not with the rtos sdk:
the callback is never called, as when the promiscuous mode is initialized within the user_init function
and not in the system_init_done_cb callback
in the non rtos sdk
This is because sdk_wifi_set_promiscuous_rx_cb
does not work. I think it's in a blob somewhere.
As a work-around, you can put
extern sdk_wifi_promiscuous_cb_t sdk_promiscuous_cb
in your code and then set sdk_promiscuous_cb
manually.
Been mucking around with this for the last day or so, but unable to get promiscuous mode to work - My ESP appears to do one of two things randomly as soon as I make a call to sdk_wifi_promiscuous_enable(1)
. It either:
Interestingly enough, running similar code in Arduino/PlatformIO environment does not exhibit this problem. I was really looking forward to using esp-open-rtos
for this project.
Exactly as @andrewclink quoted.
extern sdk_wifi_promiscuous_cb_t sdk_promiscuous_cb; sdk_promiscuous_cb=my_promiscuous_rx_callback;
For me the callback worked.
But it locks the system and generates several reset when enabling promiscuous mode. If anyone has a solution I'll listen.
Yep would love to know if there's a solution for this. I'm sad I had to go back to Arduino/PIO for my project.
Unfortunately these paths appear to call back into the C library, such as malloc()
which is not safe in that context, so promiscuous mode is not expected to work without some significant work-arounds. The main code path goes to some length to store packets in a safe pool in the NMI contect and then later safely moves them to another pool, and that might be necessary.
Hi, I already done one project using the promiscuous mode of the esp based on the official espressif sdk, but I cannot make it working using the rtos sdk. I cannot find any information on the wiki nor web. The result is that the
promisc_cb
is never calledThank you for any information
Mehdi