I bought 2 Waveshare CH9121 ethernet-to-uart modules in order to establish this connection.
Each of the modules have 2 channels and that means that they can only listen to 2 ports (they have 2 UARTs each), but the sensor sends data to 3-4 ports.
I tried to establish this connection but I can only send and receive (from/to) my PC only packets from 2 ports but I need all 4 ports.
Is there any workaround to make this work?
It's a sonar. The data has to be converted to serial in order to be fed in a radio tranceiver and then turn to ethernet again.
Arduino is not yet involved, but that depends on the answers. I read that Arduino can listen on multiple ports and this could help, if that's the case.
I'll give some more details. The sensor communicates with a software in the computer and they use NMEA2000 protocol sentences which are just ASCII sentences. Sensor uses one port for acknowledgement, another one for synchronization (I think), and another one for telemetry data.
The maximum length of each sentence is 80 characters. I managed to transfer the payloads of the sensor to the PC using the above topology, but still they can't communicate properly because (I suppose) not every packet reach the software because module only listen to 2 ports.
I will start searching for something with more channels when I'm REALLY sure that the problem is indeed the lack of channels in the converters and not my configuration in them (IP, mode, gateway, ports, etc).
We usually work with Ops who are not engaged in guarded communication about hardware; sonar device in this case. I did some quick searches of pertinent devices available and found that "systems" are generally covered by extensive connectivity hardware and is mostly proprietary and covered by bunches of patents. You are not trying to circumvent a patent are you?
Just to give you a push in a possible direction, read-up on multiplexing tcp ports.
I don't have a bandwidth issue. I have two Yuns actually. Could you elaborate on the "dispense"? Like checking every packet reaching the Arduino from the sensor and decide what port to assign and then send it over ethernet to PC?
What are you actually doing? Sonar and NMEA says something marine. Where does the need for a radio link come in?
As to dispense, you could have an Arduino listening to Ethernet traffic, grab the packets for the four ports you're interested in and send them by radio to another Arduino that can pass them to the PC.
Depending on the library you're using for Ethernet, you might have to hack it a bit to get it into promiscuous mode.
We already tested it, but we need range and omni-directionality. We don't really care about latency and bandwidth, it's a payload of 80 bytes.
So we're thinking turning ethernet into serial and then send it via a protocol like Crossfire.
I thought of that, but I haven't tried it because I supposed that also the ethernet module/shield of the arduino will listen to only 1 or 2 ports. Is that correct?