Hello everyone I need to establish a communication between my PC and a climate chamber.
It requires Modbus TCP, but first I have to detect my chamber in the network with UDP datagrams.
In the manufacturer documentation, they say that for the chamber detection I have to send a UDP broadcast (255.255.255.255) and "GetConfigDirect" (ASCII). The UDP port is 9001.
And I'm supposed to receive an answer with chamber information, but I don't receive anything.
I'm using Scapy and I wrote this :
packet = IP(dst="255.255.255.255") / UDP (dport = 9001) / Raw(load="GetConfigDirect")
I also tried this:
packet = IP(dst="255.255.255.255") / UDP (dport = 9001) / Raw(load="GetConfigDirectCRLF")
because it is written that telegrams must end with CRLF.
packet = IP(dst="255.255.255.255") / UDP (dport = 9001, sport=1900) / Raw(load="GetConfigDirect")
because it is one of the five UDP port of my computer when I do netstat -a with cmd.
When I send a packet with send(packet), I have this:
WARNING: Mac address to reach destination not found. Using broadcast.
and I can see my datagram sent on Wireshark with the DNS protocol.
With sendp(packet), nothing.
If I do srp(packet), I have this:
INFO: DNS RR prematured end (ofs=9, len=9)
many times. All packets are received and I get no answer.
Finally I can also see Destination unreachable (Port unreachable) with the ICMP protocol on Wireshark.
My question is : Why do I have these errors and How can I solve my problem / How can I receive the chamber information as presented in the documentation.