Hi,
Today I want to talk about how to use cellular api simply. OK, follow our guide of developer website:
https://doc.rakwireless.com/developer-tools/developer-tools/-
In cellular part, the most important api is:
- RUI_RETURN_STATUS rui_cellular_send(uint8_t *cmd)
- RUI_RETURN_STATUS rui_cellular_response(uint8_t *rsp, uint32_t len, uint32_t timeout)
The rui_cellular_send is for sending AT command to BG96 with Quectel format, not send data to any server.You could use like:
rui_cellular_send(ATI)
The rui_cellular_response is for recieving AT response from BG96 with Quectel format. You can use like:
uint8_t tmp[256] = {0};
rui_cellular_send(“AT+CPIN?”);
rui_cellular_response(tmp, 256, 1000);
The timeout depends on different AT response time of BG96. All log about this part will send via uart, usb, RTT log. So do not use rui_uart_send send response to uart anymore.
OK, end here today!!