Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 54
Registered: ‎02-28-2014
My Device: Z30
My Carrier: MTS Russia

Is it possible to request new wifi scan?

Hi!

Does anybody know how to request a new wifi scan?

 

That is what I am doing:

first,   wifi_service_initialize() and wifi_service_get_fd().

Second, I am using select() to wait for new wifi event and

third, determining type of event and if it is a scan event, retreiveng information using wifi_get_scan_results() and wifi_get_scan_result_xxx().

 

But I get only one wifi scan event with report WIFI_SCAN_REPORT_CONNECTION and then no any new events.

Is there any way to request a new scan (it seems that report will be WIFI_SCAN_REPORT_UNKOWN)?

 

The only way I find to do it is to registering new wifi aggregator, waiting for a scan results then unregistering and reregistring aggregator again to initiate new scan, but I think that it is not the best solution.

 

Thank you.

Sorry for some possible mistakes in my posts. English is not my native language. Irritated by it? Welcome to private messages.
Anyway, I hope we will understand each other.
Developer
Posts: 26
Registered: ‎07-21-2013
My Device: BB Z10 LE, BB DAC, BB PlayBook
My Carrier: Vodafone NL

Re: Is it possible to request new wifi scan?

have you  tried to free the results from your first scan before you try to rescan?
you can use this to achieve that:
wifi_free_scan_results()

---
http://www.heris.nl OR Check out my apps in appworld:
http://appworld.blackberry.com/webstore/vendor/22561/
New Developer
Posts: 54
Registered: ‎02-28-2014
My Device: Z30
My Carrier: MTS Russia

Re: Is it possible to request new wifi scan?

Yes, just after retrieving required information from scan results. But there is no new wifi events.

 

You wrote: "...before you try to rescan". So, the question is: how to rescan?

Sorry for some possible mistakes in my posts. English is not my native language. Irritated by it? Welcome to private messages.
Anyway, I hope we will understand each other.