Hi there,
On my custom CC3120 board, instead of using the SDK provided by TI, I try to redesign a small library for communicate with CC3120. My purpose is to keep thing simple so that I can reuse the code for smaller MCU.
So far, the MCU can get INIT-COMPOETE message from CC3120. After that, it can get the acquired IP and also the leased IP when a STA is added (CC3120 is AP role). All these are RX only. To test TX, I try to send a command to get device version. It works as shown in the following log.
NWP::init() UART::open(UART2) 115200 8-N-1 CC3X20::onRxMsg() AP role NetApp::onRxMsg() IP acquired=10.123.45.1, Gateway=10.123.45.1 CC3X20::getVersion() CC3120 Chip: 0x31000000 CC3120 FW: 2.0.0.0 CC3120 PHY: 2.2.0.7 CC3120 NWP: 3.16.0.1 CC3120 ROM: 0 WLAN::onRxMsg() STA added, BSSID=fa:ca:00:00:00:00 NetApp::onRxMsg() IP leased=10.123.45.2
I can send the command to get version multiple times and they all return the same results. That means the host program is okay to deal with sending command and receiving response.
Now, I want to try HTTP POST/GET... because my first project needs to use RESTful APIs. According to the programmer guide, CC3120 should send the GET/POST request to MCU if it doesn't know how to handle the requests. For example, if I enter "10.123.45.1/myapi/test?x=5" in the browser, then the MCU should get a GET notification. But when I set a breakpoint at the interrupt handler, there is nothing. There is also no data at UART.RX.
So, my question is: do I need to send any particular command from MCU to CC310 so that CC3120 will send the POST/GET requests to MCU?