Keyboard Shortcuts
ctrl + shift + ? :
Показати всі комбінації клавіш
ctrl + g :
Не доступний для безкоштовних груп.
ctrl + shift + f :
Знайти
ctrl + / :
Сповіщення
esc to dismiss
Лайки
Пошук
UDP 'server' is this possible
In the past when I've been testing modules for kit I don't have in the office, that connect through TCP/IP, I've simply hosted a TCP server on another processor to mimic the device.
I need to do something similar with a device (Novastar H2) that only uses UDP for comms.
Is it possible to host a UDP 'sever' on a processor and if so how?
Also, I'm not a network expert and have little understanding of UDP outside of sending stuff to/from UDP devices. |
That's kinda what I thought, so I just set up a very basic program with only a UDP symbol in CP3-01
IP address is within my subnet, in this case 192.168.10.254 port 6000. 1 on the enable
In the Novastar program on CP3-02, again a UDP symbol with IP of 192.168.10.254:6000
I get nothing between either.
I'm actually using UDP comms inside my s+ module and I thought maybe I'd screwed up but, I'm pretty sure that part of the module is fine.
I can remote into site on Monday, but was hoping to do some pre-testing over the weekend.
I also tried using the IP of CP3-01 on the symbols in both programs, no joy there |
Try using PacketSender -- a multiplatform testing app that lets you create and send packets (including UDP) for troubleshooting purposes like these. You should be able to poke hand-written packets into the system and see them work. I have gotten UDP to work as a server in SIMPL, and to get it to work, I remember it started working when I set the IP ID to reference the single IP address that was going to be sending me the UDP packets, but somebody told me on this forum (probably searchable) that this isn't the only way to do it, and offered up something that should work if there are going to be multiple senders. Since my application only had a single sender, I didn't bother to touch it afterward. Mike
|
To receive UDP traffic the IP address has to match what's set on the UDP/IP client. Set it to 0.0.0.0 to receive from anywhere, 192.168.1.0 to receive from that subnet, or a specific IP to receive from. Same as for a TCP/IP Server device. On Fri, Nov 22, 2024 at 1:11 PM Michael Caldwell-Waller via groups.io <bowser77=gmail.com@groups.io> wrote:
|
I'm doing this now. I have raspberry PIs with temp sensors in each room in my house, and sends data over UDP using Python. I have a Crestron User Module that listens to that data. I could have written it in Simpl+ but i'm just using basic Simpl symbols. To start, add a UDP/IP Communications Ethernet Device. If your network schema is 192.168.1.x, then set your Default Address of that Ethernet Device to 192.168.1.255. Connect the RX$ to anything you want to use to parse the data. In my case, I'm using Serial to Analog because i'm using Hex values for the sensor number and temperature readings.
|
Oh yeah, use a program called PacketSender to test your programming. Makes it much easier to troubleshoot or test functionality of your programming On Sat, Nov 23, 2024 at 10:25 AM Randy Reyes via groups.io <randyreyesny=gmail.com@groups.io> wrote:
|
That’s what I thought I remember too, 0.0.0.0 did not work for me either. This was noteworthy to me because in most other programming environments, creating a socket on 0.0.0.0 means “bind the socket to all interfaces” and is the most universal way to say “receive from anywhere”. It is the singular selection you would expect to work and be the most permissive and yet it does not. Mike
|
Повідомлення
Більше
Додаткові параметри
Більше
to navigate to use esc to dismiss