1

I would like to establish a TCP to UART (and back the other way) connection on a Raspberry Pi. This is to connect and establish communication from a computer to an XBee radio. I have accomplished this in about 3 ways but have never been able to establish multiple TCP connections properly. If I do the UART data will get split between the two (or more) connections. If anyone has any experience with this please let me know if you have any ideas.

I would also like to have a configuration webpage served up by the PI. I have gone through some tutorials but just have to put in more work. If anyone has a full working example I can tweak that would be nice too.

Any help will be greatly appreciated.

Thank you, Rob

Rob
  • 21
  • 1
  • 1
    What have you tried so far? Do you expect all your connections to be read/write or just read-only? If read/write, how do you expect to handle simultaneous input from multiple sources? – larsks Jun 25 '18 at 18:12
  • socat is what I first tried. I also tried a couple of python scripts I have found online and none worked very well. I would want all connections to be read/write but just as a serial pass through. So what comes over serial gets sent out to every TCP connection and the data coming over any TCP connection should be sent out the serial (most second connections would just be listing but still). The problem with anything I have tried that can make multiple TCP connections is the serial data isnt buffered right and will get split up. i.e. part of the data goes to one connection, then the other – Rob Jun 26 '18 at 13:49

0 Answers0