Send hex data over UDP connection

In nRF Connect SDK 1.7.1, how to send hex data over the connection by AT#UDPSEND?

I use AT#XUDPCLI to create UDP client and connect to server.

For the AT#UDPSEND, it seems like CAN NOT assign datatype for the data.

Any suggestion?

Parents Reply
  • TC said:

    How to receive the data after #XUDPSEND and "+++"?

    The behavior is waitting or what command I need to send?

    Can I send other AT command brfore receive the data?

    When using the #XUDPCLI and #XUDPSEND commands, you do not need to do anything to receive data.

    When not using data mode, you will get the received data in #XUDPSEND URCs. In data mode, the received data will just be sent over the UART.

    TC said:

    Afte  #XUDPSEND and "+++" I can't see following message:

    #XUDPSEND: XX
    OK


    Is that means I didn't send out any data?

    No, the data is sent. But, in data mode, you will not get any confirmations.

    E.g. in this screenshot from RealTerm, I first send at#xudpsend= command (in green) (I have already "connected" to a UDP echo server with #XUDPCLI).

    I then send "at#xudpcli=" to the server, and the server replies with "at#xudpcli=" (in yellow). I then send "foo" twice, and get "foo" back twice, before I send another "at#xudpsend=", and get the same in return. Finally, I send "dflir", and get the echo back before I exit data mode with "+++".

    I then send "foo" without using data mode, also here I get the response without having to send any other AT commands.

    If you want more control over when you are sending and receiving, you must use the socket AT commands instead.

Children
No Data
Related