0
Not a bug
Custom UDP Broadcast
Francesco Zangara 8 years ago
in Server Solutions
•
updated by Aleksandr Romanov (CTO) 7 years ago •
25
On i2 i do a custom udp driver for connect an our gateway.
the driver send packet to gateway in singlecast (from 192.168.0.100 to 192.168.0.150).
the gateway send packet to client in broadcast (from 192.168.0.150 to 192.168.0.255).
on i3 this driver can send packet from server to gateway, but it not receive packet from gateway.
i try set multicast options on driver, but it not work.
more, i try configure gateway for send packet directly on server ip, but i not see it on server (i use EVENT_RECEIVE_TEXT event).
Customer support service by UserEcho
Hello!
If I understand you correctly, you are using our server to receive packets from your UDP device. Do you tried your scenario without using the server? I.e. control panel directly connected to your gateway
Hi Dmitry,
yes, both server and panel not receive packets.
I use a "Custom Driver (UDP)" with Host: <IPGateway>, Multicast: True, Group: <IPBroadcast>
Next i create a new script with EVENT_RECEIVE_TEXT event on driver and insert a simple IR.Log
Can you send your project to us by e-mail? support@iridiummobile.ru
I can't send my project, but i create a new simple project for test.
Wireshark_Packet_Broadcast
Wireshark_Packet_Singlecast
Test_Project
Why you do not specify Local port?
This port receiving data from the equipment.
Ah!
On iRidium 2.2, it's have a default value (0) and i never change it...
On iRidium 3, I think if it is not declare, the driver use same port for send and receive packet.
Ok, now work. I fix my driver.
Thank you Dmitry
Hello Dmitry,
with last update (Studio and Client 1.1.2), i have still the problem.
I use same "Test_Project" that you can find on old post, but i insert the Local Port (same of Port).
Can you check if UDP Driver work correctly on new version?
Yes, this driver working properly. To test, I used the program "Hercules".
On my screenshot you can see that commands normally sends in both ways.
Here are the driver settings in the Iridium.
Hi Dmitry,
i try with "Hercules" on same pc with emulator and it work, but I can't see packet on network (with wireshark).
But when i use "Hercules" on different pc on the network, i can see packet with wireshark but not on emulator.
i try disable windows firewall, but nothing change.
What IP addresses did you use?
Remember that in Hercules you must use the IP address of the computer where you run the i3Pro.
And in Iridium you must use the IP address of the computer where you run the Hercules.
PC with i3Pro: 192.168.0.11
PC with Hercules: 192.168.0.20
Also I try with broadcast address 192.168.0.255
Hello!
Please send a screenshots of the settings in the Hercules and the Iridium.
On Same PC: I send "test" from Hercules to i3Pro with success, but Wireshark not captured it (same with broadcast address).
With Two PC: I send "22/03/2017 - 08:43 > test" from "Hercules PC" to "i3Pro PC" without success, but Wireshark captured it (same with broadcast address).
More, on old i3Pro (and i2 Control) I can use same port as remote and local port (in my case 49080) to send and receive packet. With new version of i3Pro, i can't.
On your second screenshot I see that you are using the same IP address in the Iridium and Hercules. But I wrote to you before that you must use different IP addresses.
Because iridium running on the computer with the IP address 192.168.0.11, in Hercules you've entered a correct IP address. Ie Hercules must connect to this computer.
In Iridium you should specify the IP address of the computer where you running Hercules. As i understand it's IP address 192.168.0.39
yes, "Hercules PC" have ip 192.168.0.39 and "i3Pro PC" have 192.168.0.11.
I try only comunication from "Hercules PC" and "i3Pro PC".
i not send command from "i3Pro PC" in this test, so I think that ip address on driver is not important.
Now i change the address on driver (in any case i use the broadcast address to send command from Hercules to i3Pro) and work.
I check the parameter on customer project and now I wait the result of him test.
Hi Dmitry,
My Customer try new project on your system. Nothing is change.
He can send command but can't receive the feedback.
I do more test on office and I find a possible cause.
Hercules send packet from local port (11080) to remote port (11081) and it work (same iridium).
My application send packet from free port (dinamically) to remote port (11081) and iridium not recieve it.
(see wireshark packet UDPServer.pcapng).
I can't understand: how can I send an packet from same port that I need open with listener socket?
Why iRidium not receive packet from different port?
Hello!
Could you send a screenshot of the network settings in Iridium and in your program? What kind of port is changed in your program? As i understand the local port is changing?
PC with My Program and Hercules:
IP: 192.168.0.38
Listen port: 11080
IP Host: 192.168.0.11 ("i3Pro" PC)
Port Host: 11081
Communication: from _Dinamic Port_ (My program open a free random port each time i send a packet, after send the program close it) to _Port Host_
PC with i3Pro:
IP: 192.168.0.11
Listen port: 11081
IP Host: 192.168.0.38 ("My Program" PC)
Port Host: 11080
Communication: from _Listen port_ to _Port Host_
As You can see on Wireshark File, i3Pro PC recevie all 2 packet (from my program and from Hercules), but iRidium Driver receive only packet sended from Hercules.
The difference is only one: Sender Port, random on my program and Listen port on Hercules.
So...Why now I can't use an different sender port to communicate with iRidium Driver?
Hello, is your problem still unresolved?
Hello Aleksandr,
No, the problem isn't solved on iRidium.
But I change my program for work same iRidium driver.
This is due to the fact that Iridium only works with fixed ports. In order for Iridium to receive a response from your program, you must constantly change the port in its settings. This can be done using the SetParameters method.
But for this you need to transfer the new port to Iridium.
Have you tried to connect your program to Hercules?
I think that Hercules will not be able to receive an answer from your program either,
because it will also need a fixed port, which it will listen to.
Sorry Dmitry,
you not understand.
the server port not change, but change the sender port.
for example:
iridium listner on port X
iridium send from port X to port Y
MyProgram listner on port Y
MyProgram send from random port _TO_ port X
My program _not_ send to random port on iridium.
And, yes, my program work with hercules.
iRidium ignore all packet received on listen port that client sender port is different of sender port set on iridium driver.
As I said, unfortunately, Iridium works only with a fixed port and it does not can work with dynamic ports.