0

I have a communication diagram like

enter image description here

In this project, there is a udp communication between python code in linux os and teensy.Different sensors connected to teensy and teensy send the sensor datas to linux with udp.

I must send udp request to teensy to get sensor datas.

The person who wrote the code to run on Teensy wrote such a line for request and receive operations. Then there is information about the parameters. E.g;

Request

Start_Packet/Size_of_Packet/Communication_Type/Message_ID/Message/CRC16/End_Packet

Response

Start_Packet/Size_of_Packet/Communication_Type/Message_ID/Message/CRC16/End_Packet

Start_Packet: $

Size_of_Packet: Only message bytes length.

Communication_Types:

UNKNOWN_COMMUNICATION 0

CAN0 1

..

Message_ID: Packet number. Max: 100 if not response data message id = 0xFF

Message: Data to be send. Max: 18 bytes

CRC16: Before the CRC16 bytes will be calculated. CRC16_CCIT_ZERO http://www.sunshine2k.de/coding/javascript/crc/crc_js.html

End_Packet: #

I can not understand this request response lines. For example in python client, I sent the data as a string and server received. But in there, how should be request ?

hardillb
  • 54,545
  • 11
  • 67
  • 105
noobinmath
  • 175
  • 2
  • 12
  • 1
    I'm sorry it's really not clear what you are asking here. Edit the question to add more details and explain what you've tried – hardillb Apr 16 '21 at 16:01
  • 1
    @hardillb Thank you for the answer. I tried to fix the question. I hope it was clearer. I do not know what will I do. I only need to send udp request and receive udp data, but I could not understand the format of the data to be sent. – noobinmath Apr 19 '21 at 10:15
  • I'm sorry, but I still don't see enough information here to help from a Node-RED perspective – hardillb Apr 19 '21 at 15:37
  • Actually, in node-red there will be udp request and response. The coder said that request will be like ```Start_Packet/Size_of_Packet/Communication_Type/Message_ID/Message/CRC16/End_Packet``` and I don't understand this format – noobinmath Apr 19 '21 at 17:05
  • @hardillb , normal udp request or response can be string for example. But, what is this ? There are many /, should I use these ? – noobinmath Apr 19 '21 at 17:06
  • 1
    We can't help you with that, the only person that can is the person that created that code. – hardillb Apr 19 '21 at 17:38
  • @hardillb thank you – noobinmath Apr 19 '21 at 19:41

0 Answers0