• HI2115软件开发板V150版本AT+NSOST指令


    1. 在HI2115里面,由于内存空间比较大,所以支持UDP发送指令AT+NSOST的分包

    ret = sendto(socket, seq_num, data_string, length, msg_flags, (struct sockaddr *) &sock_address, sizeof(sock_address));

    其中上面第2个参数,是分包的序号,从1-255

    2. AT指令部分,看下面说的是6个参数可选,但是实际看代码发现,第6个参数不写的话,会报错

    AT+NSOST=<socket>,<remote_addr>,<remote_port>,<length>,data>[,<sequence>]
    
    AT+NSOST=1,192.158.5.1,1024,2,AB30,1
    1,2
    O

    AT指令的参数,第6个参数sequence就是函数里面的seq_num

    <socket> Socket number returned by +NSOCR
    <remote addr> IP address
    <remote port> A number in the range 0-65535. This is the remote port that messages will be received on
    <length> Decimal length of data to be sent.
    <data> Data to be transmitted in hexstring format, or quoted string format.
    <sequence> Sequence of data, range 1-255.If omit, will not report data sent status.
    <status> The status of datagram.
    0 Error
    1 Sent

    3. 第6个参数不写的话,会报错

        cause = at_get_uint8_param(AT_PARSE_SIXTH_PARAM_POS + num_of_flags, &seq_num, true);
        if (cause == AT_RET_PARAM_MISSING)
        {
            seq_num = NEUL_DATA_SENT_DATA_SEQ_INVALID;
        }
        else if ((cause != AT_RET_OK) || (seq_num == NEUL_DATA_SENT_DATA_SEQ_INVALID))
        {
            return AT_RET_SYNTAX_ERROR;
        }
  • 相关阅读:
    二叉树的存储结构
    面试Java需要的知识总结
    EJB总结
    WEB 容器、WEB服务和应用服务器的区别与联系
    Linux安装JBOSS
    JBOSS和WebLogic区别
    深入浅出JMS(一)--JMS基本概念
    Java缓冲流细节
    xor和路径(codevs 2412)
    外星千足虫(bzoj 1923)
  • 原文地址:https://www.cnblogs.com/429512065qhq/p/8950116.html
Copyright © 2020-2023  润新知