Example of usage of UDP

Take NBSN95 mod1 as an example

After logging into the interface click '+' to create a flow

image-20220519133634-1.png

Rename the stream

image-20220519134042-2.png

image-20220519134318-3.png

image-20220519134346-4.png

Drag UDP in to the arrow area

image-20220519134533-5.png

Drag the function and debug to the blank area in the same way as above

image-20220519134850-6.png

configure UDP in

image-20220519135402-7.png

Write to the UDP port that the device node sends to the server

Example My UDP device node sends to server port 8585
just write 8585

Note that the port that is already in use cannot be used. If the receiving fails, you need to check whether the port of the server is occupied. The sending port of the device node should not use the default port used by the server, such as a common port such as 8080.

In order to avoid data confusion, different types of nodes do not use the same UDP port, because different nodes have different data formats and different functions.

image-20220519135915-8.png

image-20220519144651-14.png

image-20220519141355-11.png

image-20220519141704-12.png

About function

If you are familiar with JS code, you can write it yourself
If you are not familiar, we have the JS code for each type of node, you just need to copy and paste it into it

image-20220519141833-13.png

image-20220519150455-15.png

Tags:
    
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0