I ported cc3000 host driver and basic wifi application for pic32 as per porting guide. I turned the cc3000 in smart config mode by typing 01 on console and LED2 started blinking. But it is not connected to network. On debugging i found that pic32 host driver receives 0x8080 HCI_EVNT_WLAN_UNSOL_SMART_CONFIG_DONE packet but
STREAM_TO_UINT16(event_hdr, HCI_EVENT_OPCODE_OFFSET,event_type); statement of function long hci_unsol_event_handler(char *event_hdr) in the event_handler.c is interpreting as 0x7F80.
when i tried this on msp430 5529 board this function correctly interpret as 0x8080.
My understanding is that casting from signed char to unsigned short is different in pic32 and msp430 especially when signed char is negative number such as 0x80.
I changed the function argument from
unsigned short STREAM_TO_UINT16_f(char* p, unsigned short offset)
to
unsigned short STREAM_TO_UINT16_f(unsigned char* p, unsigned short offset)
and smart config is done and my pic32 hostdriver is connected to network.
Anyone else experienced these type of issues?
Any comments from Ti?
This type of porting bugs may happens in any part of the cc3000 host driver code, am i right?
If i am on the right way, this post will be helpful to others.
Regards,
Shihab