demo wifi application problem

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
pasau
Experienced Member
Posts: 77
Joined: Fri Dec 06, 2013 7:05 pm

demo wifi application problem

Post by pasau »

hi, i tried running the default wifi application on my xk-1A board. I changed the ports to some I/O on this board. I entered my SSID, password, and security type in the configuration file. I tried both with a tiwi-sl (wired up a wifi slice :p) and a cc3000MOD. I also tried changing the SPI speed to something lower. In all cases i get this:

Code: Select all

WARNING: tile[0] - xSCOPE not supported by application, I/O will be via JTAG
**WELCOME TO THE SIMPLE WEBSERVER DEMO**
Switching on Wi-Fi module.... ok!
Scanning available networks.... 
but unfortunately im stuck there; im not getting an IP or anything else after that, so it doesnt seem to be connecting to my network. Does anyone know what could be going wrong? thank you!


pasau
Experienced Member
Posts: 77
Joined: Fri Dec 06, 2013 7:05 pm

Post by pasau »

i did some prints and found out most of the time the code is stuck there, in wifi_tiwisl_server.xc:

Code: Select all

 while(num_networks == 0)
            {
              // Keep getting result until we have a network found
              len = hci_pkg_wlan_get_scan_result(opcode);
//RIGHT HERE
              write_and_wait_for_event(tiwisl_spi, tiwisl_ctrl, len, opcode);
              num_networks = hci_process_wlan_get_scan_result();
            }
more specifically, inside write_and_wait_for_event, then inside read_and_wait_for_event, then inside wifi_tiwisl_spi_read, the first line is an xc event and the code gets stuck there 90% of the time.
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

It is probably not stuck there; it just spends most of its
time there, waiting for a reply. I reckon it's just going
through the loop over and over, searching for a network
that never shows up.
pasau
Experienced Member
Posts: 77
Joined: Fri Dec 06, 2013 7:05 pm

Post by pasau »

im pretty sure it never repeats the while, since i added some prints to verify where the thread goes. I also used the cc3000 with a different API and another microcontroller on the same network and it works fine.