This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Connectivity problems - wlan_disconnect(): No response.

Expert 2260 points


Hello,

I'm running into some issues currently which I cannot explain.

Firstly, I am not getting the expected callbacks after calling wlan_connect(). This could be an issue with my setup, but since my phone can connect to the AP OK, I am not sure this is the case. In addition to this, it often seems like by briefly removing the power from the device, things improve.

The main concern I have at the moment it wlan_disconnect() is not providing a reply.

My code behaves as follows:

  • wlan_connect()
  • wait for callbacks
    • callbacks OK:
      • continue
    • callbacks not received:
      • wlan_disconnect()
      • wlan_stop()

I am still using 1.11.1. I have attached a Saleae trace of this problem. It can be seen that after calling disconnect there is no more activity on the SPI line.

Any reason as to why this might be failing? Are there any internal states for connectivity that continue to exist between wlan_stop() calls?

Saleae: https://dl.dropboxusercontent.com/u/2866686/wlan_disconnect.logicdata

  • Hi Alan,

    The wlan_disconnect will provide a event only if you are connected to an AP (i.e, if you have received a 'HCI_EVNT_WLAN_UNSOL_CONNECT' event).

    But from your description above, it looks like CC3000 is not connected to your AP. Hence any further attempts of a wlan_disconnect() will not yield a 'HCI_EVNT_WLAN_UNSOL_DISCONNECT' event.

    Thanks & Regards,
    Raghavendra

  • Sorry for any confusion - its not the event but the reply for wlan_disconnect() which is missing, i.e. the data that will get the code out of the event handler loop.

    I'm guessing that you have not seen any behaviour such as this?

  • Hi Alan,

    Is it the command complete event that you are missing from the chip? Are you able to see the WLAN disconnect command being written to the CC3000. And does the IRQ go low in response?

    If yes, then can you please check the " evnt_buff" inside 'SpiReadDataCont'?

    I have not seen this behavior so far.

    Thanks & Regards,
    Raghavendra

  • I am not sure if you can open the Saleae trace above, but after the command from the Host is transmitted to the CC3000, all is quiet on the line. IRQ stays high. 

    If I don't get back the two events after a wlan_connect() call this error seems to be fairly common. I wasn't sure if this was my environment or not. Was hoping someone else had experienced it.