Repair NBIoT changed interfaces
This commit is contained in:
parent
b063120bc5
commit
d155d5e672
|
@ -24,6 +24,8 @@
|
||||||
#include <xs_adapter_manager.h>
|
#include <xs_adapter_manager.h>
|
||||||
#include <xs_adapter_at_nbiot.h>
|
#include <xs_adapter_at_nbiot.h>
|
||||||
|
|
||||||
|
extern void RegisterAdapterNBIoT(void);
|
||||||
|
|
||||||
void NbiotEnable(void)
|
void NbiotEnable(void)
|
||||||
{
|
{
|
||||||
RegisterAdapterNBIoT();
|
RegisterAdapterNBIoT();
|
||||||
|
@ -39,7 +41,7 @@ void NbiotEnable(void)
|
||||||
at_adapter->atdone.ATSocketCreate(at_adapter, 1, SOCKET_TYPE_STREAM, NET_TYPE_AF_INET);
|
at_adapter->atdone.ATSocketCreate(at_adapter, 1, SOCKET_TYPE_STREAM, NET_TYPE_AF_INET);
|
||||||
UserTaskDelay(1000);
|
UserTaskDelay(1000);
|
||||||
|
|
||||||
struct ADDRESS_IPV4 addr;
|
struct AddressIpv4 addr;
|
||||||
addr.ipv4 = IpTint("115.236.53.226");
|
addr.ipv4 = IpTint("115.236.53.226");
|
||||||
at_adapter->atdone.ATSocketConnect(at_adapter, 1, addr, 8989, 0);
|
at_adapter->atdone.ATSocketConnect(at_adapter, 1, addr, 8989, 0);
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ int NbiotOpen(struct Adapter *padapter);
|
||||||
int NbiotSend(struct Adapter *padapter, const char* data, int len, bool block, int time_out, int delay, send_success cb, void* param, void* reserved);
|
int NbiotSend(struct Adapter *padapter, const char* data, int len, bool block, int time_out, int delay, send_success cb, void* param, void* reserved);
|
||||||
int NBIotRecv(struct Adapter *padapter, char *rev_buffer, int buffer_len, int time_out, bool block);
|
int NBIotRecv(struct Adapter *padapter, char *rev_buffer, int buffer_len, int time_out, bool block);
|
||||||
|
|
||||||
int NBIoTSocketConnect(struct AdapterAT *adapterAT , uint8_t socket_fd , struct ADDRESS_IPV4 dst_ip , uint16_t dst_port, uint8 is_client);
|
int NBIoTSocketConnect(struct AdapterAT *adapterAT , uint8_t socket_fd , struct AddressIpv4 dst_ip , uint16_t dst_port, uint8 is_client);
|
||||||
int NBIoTSocketCreate(struct AdapterAT *adapterAT, uint8_t socket_fd, uint8_t type, uint8_t af_type );
|
int NBIoTSocketCreate(struct AdapterAT *adapterAT, uint8_t socket_fd, uint8_t type, uint8_t af_type );
|
||||||
int NBIoTSocketClose(struct AdapterAT *adapterAT, uint8_t socket_fd );
|
int NBIoTSocketClose(struct AdapterAT *adapterAT, uint8_t socket_fd );
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ int NBIoTSocketCreate(struct AdapterAT *adapterAT, uint8_t socket_fd, uint8_t ty
|
||||||
printf("error socket type \n");
|
printf("error socket type \n");
|
||||||
return -1 ;
|
return -1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("cmd : %s\n", at_cmd);
|
printf("cmd : %s\n", at_cmd);
|
||||||
ATOrderSend(adapterAT->agent, REPLY_TIME_OUT, reply, at_cmd);
|
ATOrderSend(adapterAT->agent, REPLY_TIME_OUT, reply, at_cmd);
|
||||||
MdelayKTask(3000);
|
MdelayKTask(3000);
|
||||||
|
@ -180,7 +180,7 @@ __exit:
|
||||||
* @param is_client - whether it is a client
|
* @param is_client - whether it is a client
|
||||||
* @return success: EOK, failure: -ERROR
|
* @return success: EOK, failure: -ERROR
|
||||||
*/
|
*/
|
||||||
int NBIoTSocketConnect(struct AdapterAT *adapterAT , uint8_t socket_fd , struct ADDRESS_IPV4 dst_ip , uint16_t dst_port, uint8 is_client)
|
int NBIoTSocketConnect(struct AdapterAT *adapterAT , uint8_t socket_fd , struct AddressIpv4 dst_ip , uint16_t dst_port, uint8 is_client)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue