7 years, 10 months ago.

CC3000 with STM32

Hello Does anybody have a working code of CC3000 with STM32 nucleo? (mine is F401)

There are many libraries and examples in the site but they don't work for me so far.. Usually the program gets stucked in the initialization part

Please help,.

Question relating to:

cc3000 development group

Same problem here. Program control is not coming out of wifi.init();. I think we should write some init(); code for our boards.

posted by Mohan gandhi Vinnakota 23 May 2016

Finally my STM32 connected (or well it seems to :~ ). I am still trying to correct some other errors I am getting . I will give you what worked for me:

I used Martin Kojtal 's cc3000_http_client_demo https://developer.mbed.org/users/Kojto/code/cc3000_http_client_demo/file/149ce47889e9/HTTPClient.lib

but very important Make sure to Update all libraries There must not be a rounded green arrow in the project panel (this usually appear after you import the libraries or the programs and it indicates that the library needs updating). I updated all of them and finally it seems that it is connecting -unless I am most mistaken. It returns an ip address Hope it helps you

posted by Cristian Fuentes 23 May 2016

Stll I'm getting error. cc3000 HTTP client demo. Failed to connect. Please verify connection details and try again. Can you tell me which pins you used? My configuration is cc3000 wifi(D3, D5, D10, SPI(D11,D12,D13), "ssid", "key", WPA2, false); I updated all libraries. Did you modify the init(9; function?. Thank you.

posted by Mohan gandhi Vinnakota 23 May 2016

Hi! What is exactly the error you are getting? In my case it was not failed to connect but just went dead in wifi.init(). In the code failed to connect is just the reply of wifi.connect when it cant find the network I think.

I am no expert by any means on this, so I will tell you what seems to work for me so far. I hope it continues to work though lol First, I am using a STM32F401RE. I have no experience with the L053R8. I have been trying several different libraries and even got one off line but that was so huge that couldnt compile it in my limited version of Keil.

Finally, I discarded all of that and started again with the library I indicated above. (Martin Kojtal 's cc3000_http_client_demo) Then I modified main.cpp

#elif (MY_BOARD == MBED_BOARD_EXAMPLE)
cc3000 wifi(PC_4, PB_1, PB_2, SPI(PB_15, PB_14, PB_13), "SSID", "password", WPA2, false);

(I am using the CC3000 breakout so I could connect with this pins- I was desperated and wanted to try something new- For the CC3000 shield I think you should stick with the pins designated in the arduino like connector)

Then I changed main.h

#define MY_BOARD MBED_BOARD_EXAMPLE

Different to what I thought before I didnt write anything on the init function (init.cpp)

The key thing is that after you upload the example program to the compiler (or the library) you HAVE to update each and every library... including cc300_hostdriver_mbedsocket, HTTPClient, NVIC_set_all_priorities and mbed

and that is it. After that it could connect to my Wifi. Hope it helps

posted by Cristian Fuentes 24 May 2016

I hope you could connect your device. Advancing a little bit... after you get to connect it, you have to modify the library a little. Just as it is, the POST PUT ERASE fail. The GET gives a redirect address.

So, you have to modify HTTPClient.cpp a little. For the arrays

char key[32];
char value[32];

Change the value of 32 to 35 or something like that. Also later there is a

if(strlen(buf)<32)

change there as well. 32 is not enough to handle the response of the test site.

posted by Cristian Fuentes 24 May 2016
Be the first to answer this question.