Hi, I'm trying to port the weather access code from " CC3000+LM4F232 Wi-Fi Web Server/Client Application " to MSP430FR5739 ( based on the "CC3000+FRAM WiFi Sensor Application (new!)" code)
So , basically I copied the HTTPD file to FR5739 project. Because Google has closed its weather API so I use another site just for test. But every time the software is frozen at recv()
I printed HTTP access status to the serial port as below "
startHttp now....
ler=1
lerr=0
sentLen=87
cRetVal=0
iReadSocks=1
loop=0
before receciving
"
I traced into the recv() api --->simple_link_recv() and then SimpleLinkWaitEvent(opcode, &tSocketReadEvent);
SimpleLinkWaitEvent(unsigned short usOpcode, void *pRetParams)
{
//
// In the blocking implementation the control to caller will be returned only after the
// end of current transaction
//
tSLInformation.usRxEventOpcode = usOpcode;
hci_event_handler(pRetParams, 0, 0);
}
after hci_event_handler(pRetParams, 0, 0) is executed, the software is frozen.
it looks like the CC3000 doesn't return anything back so the whole software is blocked there.
//////////////////////////////////////////////////////////
the web site I chose sends back a file around 1.2K (including the HTTP headers), and I managed to assign 1.4K byte to RX buffer.
#define SPI_BUFFER_SIZE 1400 //changed from 1700 to 1400 by Vincent 2012-10-05
#define RX_SPI_BUFFER_SIZE SPI_BUFFER_SIZE + 30
char pcCC3000_Rx_Buffer[RX_SPI_BUFFER_SIZE];
//char pcCC3000_Tx_Buffer[SPI_BUFFER_SIZE];
char pcCC3000_Tx_Buffer[200];
...................
iBytesReceived = recv(ulClientSocket, pcCC3000_Rx_Buffer,SPI_BUFFER_SIZE, 0);
...................
Does anybody have clue how to fix it? Thanks.
Vincent