ambiot / ambd_sdk

Release SDK for AmebaD
108 stars 56 forks source link

promisc issue when in 5.8G band #7

Closed lovexoo7 closed 2 years ago

lovexoo7 commented 3 years ago

When set wifi channel in 5.8G band. in the promisc_callback, userdataparameter typefield is not correct,but in 2.4G band is correct.

lovexoo7 commented 3 years ago

detail in https://forum.amebaiot.com/t/about-wifi-promisc-mode-promisc-callback-function-bug/718

lovexoo7 commented 3 years ago

use IAR complier will cause promisc_callback function, the ieee80211_frame_info_t type filed will incorrect. use GCC compiler will not happend.

lovexoo7 commented 3 years ago

after gcc complier, the type filed, alse has another value,but not 0 or 1, it`s a another, not stable. the new isusse is rssi,sometime the rssi is 0,but rssi will not be zero.

how about this.

M-ichae-l commented 3 years ago

Current SDK is under test. Reported issues will be reviewed. Many thanks to @lovexoo7

daphwl commented 2 years ago

Hi @lovexoo7 the current SDK (under the release branch) have been tested and its working, there is no issue with the rssi value. Please refer to the image here: (https://forum.amebaiot.com/t/about-wifi-promisc-mode-promisc-callback-function-bug/718/13?u=daphwl) Making changes to the code is also not recommended. Thanks!

daphwl commented 2 years ago

If you want to check the rssi value in 5.8G band, Under [component/common/api/wifi/wifi_promisc.c] You can change this two line below from ch <=13 to ch <=161, for(ch = 1; ch <= 13; ch ++) for(ch = 1; ch <= 13; ch ++) By default, all this should not be change. If you want to try to modify any WLAN API, you can create a new function but this may affect the performance of the WLAN so it is not recommended.