About WiFi promisc mode promisc_callback function BUG

1.setup wifi in promisc mode.
2.set wifi monitor channel in 5G band,eg:44.
3.wait frame comming.
4.got the frame,and get the frame type(rtw_rx_type_t:is suuported or not) (use userdata parameter,it`s a ieee80211_frame_info_t struct).

but the type field is incorrect,but in the 2.4g band, it`s correct.
// setup code
Code1
// promisc_callback code


// console log

// the buf data analysis

PS:use IAR compiler will happend, changed GCC compiler it`s ok.

It seems that the IAR compiler optimize is causing problems, and the optimization of each version of IAR is not quite the same. What is the version used? As far as I know, Realtek was using version 8.x before. You can use the same IAR version they used at the beginning to solve the problem.

i use IAR 8.40.2
XD

I found that the version of the IAR compiler on github is 8.30 or maybe this version can solved you problem

i have tried all the versions, such as 8.32.1,8.30.1,but all of them were failed to work.
i changed to use GCC dev.

when use gcc ,also has a bug,but not about type field,its about rssi field ,some times the rssi value is zero, but the rssi will not be zero. thats strange.

Thank you @lovex and @Alphi_Jiang . The SDK is under testing at the time you are asking. Now it is released V1.0.0. It is going to be fixed in next version.
We are checking this issue. Any example from the SDK, you are running? So I can re-produce the issue.

the example source code in component\common\api\wifi\wifi_promisc.c

the AT command is ATWM

1 Like

Thanks, will back to you.

Hi @lovex, may I know which SDK are you using?

I believe the gihub released version should be OK for both 2.4 and 5G.

1 Like

i think the bug not fixed.
today i use the lastest version Update README.md · ambiot/ambd_sdk@134fd77 · GitHub.
and use the same code.


you can try to use the code in the release branch of Github: GitHub - ambiot/ambd_sdk at release

the most differenct is lib_user.a ?

You might want to try changing the channel number to 161 in the promisc.c code under the promisc_test_all as I am able to get the rssi value. Just want to mention , we do not recommend making any changes to the code as it an API and also a static function. Even if you can send us the code that you used, we wont be able to assist you in debugging the issue. Thank you

ok.i`ll send the code to you.

has send the code for you .please check the message.

If you want to try 5.8GHz just change the channel to 162 and will get the rssi. Other code cant be changed.

this is the test code . complier and run, see console,will print the dump.