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.

wlan_connect process and Smart Config (PIC18 MCU)

Hello!

I finally managed to get my CC3000 to communicate with my PIC18f4520 microcontroller via SPI.

I still can't connect to my wifi AP neither with wlan_connect nor smart config. I have followed http://processors.wiki.ti.com/index.php/CC3000_Protocol instructions.

So is there some more initialization routines needed after simple_link_start and buffer size methods and before the wlan_connect function? I downloaded Smart Config application for Android, but it was an exe file and couldn't open. Java applet (html page) didin't work. Other functions do work, such get_sp_version, and get_status.

My cc3000 version is 1.24. Is there any major differences in code level between the most new version?

Many thanks! 

  • Hi,

    If you are using SP version 1.24, then please make sure that you use the host driver from SDK 1.11.1.

    Apart from that, where exactly are you getting stuck with the wlan_connect? Can you please check if you receive  the HCI_EVNT_WLAN_UNSOL_CONNECT event in the callback function in your application CC3000_UsynchCallback?

    For smart config, after you install the executable, you would get a .apk file. Please install that on your Android phone and run the smartConfig.

    Regards,
    Raghavendra

  • Thanks for response! I am not sure about my code, but i only get (profile saved) with four zeros, and not the unsolicited connection response. Also when i started smartconfig,  i don't get the unsolicited response message. I  read from the guide that before connecting, connection policy should be set. (ie. Connect automatically to any APs and so on). But is it necessary? 

    My write function is so that i set cs down and wait for the irq low, then i write the message. Finally cs up and wait for irq high. (also interrupts disabled between that) 

    Reading happens when irq goes low, when an interrupt happens and then i set cs down and start writing 0x03 and so on. Then i read the message size from the header and continue reading the data. Finally cs up and wait for irq going high.

    So is there something wrong with the procedure, if i have misunderstood the guides?  Thanks

  • So it seems that I don't get any unsol messages. After the HCI_EVNT_WLAN_CONNECT message I only keep getting keep_alive messages. Any ideas what would be the problem? 

    Are unsolicited messages somehow different than normal response messages? I am writing drivers on my own.

    Best regards Risto

  • A little bit more details about my configuration.

    SPI-bus
    input data is sampled at middle of data output time
    transmit occurs on transition from idle to active clock state
    idle state for clock is a low level
    clock frequency is 1MHz and clock = Fosc/4

    Can anybody say if they are right?

    So I can succesfully read eg. firmware version and I get keepalive (unsolicited) events.
    But when I try wlanConnect, I only get a response that the profile has saved succesfully, but never the connected-message. Then just keepalive messages keep coming. The same is when I try smartconfig start.