tessel / t1-firmware

[UNMAINTAINED] Tessel 1 Firmware
Other
68 stars 20 forks source link

Listing Wifi networks in an infinite loop #46

Open johnnyman727 opened 10 years ago

johnnyman727 commented 10 years ago

I don't have a repro test case yet, but sometimes when running tessel wifi -l, Tessel will output the names of the same networks in a loop, forever.

jiahuang commented 10 years ago

I found this to be more likely to happen if there are a lot of wifi networks around.

johnnyman727 commented 9 years ago

It's pretty obvious that the problem here is the while(true) loop.

Our current process continues to call wlan_ioctl_get_scan_results to fetch information about each network "while they are available". When a Tessel is in an area with a bunch of WiFi networks, I think it's possible, that the CC3000 updates the scan results faster than we print them out, leading to an infinite loop. Instead, we should use the number of results as the range of a for loop that prints out the available networks.