Android, wifi active scans

后端 未结 2 1350
醉梦人生
醉梦人生 2021-01-16 00:37

I need a frequent wifi scan on my android application (I\'m trying to build a local indoor positioning system based on wifi RSSI values). IF I call wifi.startScan() I have o

相关标签:
2条回答
  • 2021-01-16 00:55

    I don't think you can. It is a device and/or OS version dependend setting. On the Nexus One for example it takes roughly a second to scan whereas on the G1 it takes significantly longer (or get fresh results after a few scans). If I recall correctly, some Android Version (< 2.0) did not issue a fresh scan everytime startScan() was called but might have reused the old result. But I might be mistaken on that one.

    0 讨论(0)
  • 2021-01-16 01:00

    I've been trying the same thing and I came to the following conclusion. It's not possible on 2.1 and higher. I've got no clue on lower versions because my app had to run on 2.1 and higher.

    -Changed stuff inside the Android SDK so it will enable active scanning

    -Traced it back to the driver resulting in the following conclusion: The driver will set the wifi module in passive mode every time. I've been looking to change this inside the driver but there was no setting inside the drive to achieve this.

    Bottom line: Not possible.

    0 讨论(0)
提交回复
热议问题