2024-05-31
This commit is contained in:
1 parent
f8591b8b99
commit
4a963bd78c
27 files changed
+2956
-229
No files matched your search
+29
-1
@@ -165,7 +165,7 @@ static CommRet_T cat1_sendcmd_and_responce (int time, char * tx, int size, char
|
||||
{
|
||||
if (RT_EOK == rt_event_recv (gUartEvents, EVENT_UART_GSM_RX, RT_EVENT_FLAG_AND | RT_EVENT_FLAG_CLEAR, 0, RT_NULL))
|
||||
{
|
||||
// rt_kprintf ("[%.*s]", g_GSMDrv.rx_size, g_GSMDrv.rx_buffer) ;
|
||||
//rt_kprintf ("[%.*s]", g_GSMDrv.rx_size, g_GSMDrv.rx_buffer) ;
|
||||
if (NULL != rt_strstr ( (char *) g_GSMDrv.rx_buffer, ack))
|
||||
{
|
||||
if (call != NULL)
|
||||
@@ -278,6 +278,26 @@ CAT1RST:
|
||||
rt_kprintf ("NET:+CME:ERROR QIRD\r\n");
|
||||
goto CAT1RST;
|
||||
}
|
||||
// // 通过通道2上报数据
|
||||
// if (RT_EOK == rt_event_recv (gTrigEvents, EVENT_TRIG_NETMODE_TX2, RT_EVENT_FLAG_AND | RT_EVENT_FLAG_CLEAR, RT_WAITING_NO, RT_NULL)) // 需要发送数据
|
||||
// {
|
||||
// if (g_cat1Drv.txbuff != NULL)
|
||||
// {
|
||||
// rt_sprintf (at_cmd, "AT+QISEND=0,%d\r\n", g_cat1Drv.tx_size);
|
||||
// rt_thread_mdelay (10);
|
||||
// if (cat1_sendcmd_and_responce (1000, at_cmd, strlen (at_cmd), ">", NULL) != RetSucc)
|
||||
// {
|
||||
// rt_kprintf ("NET:+CME:ERROR QISEND\r\n");
|
||||
// goto CAT1RST;
|
||||
// }
|
||||
// if (cat1_sendcmd_and_responce (3000, g_cat1Drv.txbuff, g_cat1Drv.tx_size, "SEND OK", NULL) != RetSucc)
|
||||
// {
|
||||
// rt_kprintf ("NET:+CME:ERROR QPUSH\r\n");
|
||||
// goto CAT1RST;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
rt_thread_mdelay (3000);
|
||||
}
|
||||
@@ -292,6 +312,14 @@ void cat1_service_tx (char * buff, int size)
|
||||
rt_event_send (gTrigEvents, EVENT_TRIG_NETMODE_TX1) ;
|
||||
}
|
||||
|
||||
// 通过网络通道2发送数据
|
||||
void cat1_service2_tx (char * buff, int size)
|
||||
{
|
||||
rt_memcpy (g_cat1Drv.txbuff, buff, size);
|
||||
g_cat1Drv.tx_size = size;
|
||||
rt_event_send (gTrigEvents, EVENT_TRIG_NETMODE_TX2) ;
|
||||
}
|
||||
|
||||
|
||||
void CAT1ThreadStart (void)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user