int check_sim_signal(ttyusb_ctx_t *ttyusb_ctx)
{
int send_rv = -1;
char return_buf[256] = {0};
char separator[] = " ,";
int signal = -1;
char *token = NULL;
int i = 1;
if (!ttyusb_ctx)
{
printf("[%s]Invalid argument!\n", __func__);
return -1;
}
send_rv = send_at_cmd(ttyusb_ctx, "AT+CSQ\r", "+CSQ", return_buf, sizeof(return_buf));
if (send_rv < 0)
{
printf("[%s]Not found SIM signal!\n", __func__);
return -2;
}