gsender icon indicating copy to clipboard operation
gsender copied to clipboard

connect via network connection

Open tcurdt opened this issue 2 years ago • 2 comments

ioSender allows to connect via network.

Screenshot 2022-09-26 at 00 13 17

Would be great to connect to some boards that feature an ethernet connection (that is often more reliable than USB).

Are there any plans to also support a network connection?

tcurdt avatar Sep 25 '22 22:09 tcurdt

It's something we've discussed and have in the backlog, but no immediate plans to implement. We'll make sure to comment when we revisit this.

kglovern avatar Sep 26 '22 13:09 kglovern

Native support would certainly be nice. But maybe socat could be used as work around in the meantime.

https://stackoverflow.com/questions/29207980/bridge-serial-ports-over-network

Maybe worth giving a try.

tcurdt avatar Sep 26 '22 13:09 tcurdt

Have you tried socat finally?

We can't use headless gsender on raspberry pi so I was looking for a work around to communicate to my raspberry through network connection with socat ...

Franckapik avatar Nov 28 '22 08:11 Franckapik

I probably try over xmas. Whether it works or not - I still wish there was native support.

tcurdt avatar Nov 28 '22 11:11 tcurdt

I never use socat but i tried this :

On rpi with arduino and drivers on ttyS0 : sudo socat -d -d tcp-listen:9000 pty,link=/dev/ttyS0,raw,echo=0

On my desktop computer : sudo socat pty,link=/dev/virtualcom0 tcp:192.168.1.71:9000

Then i tried to connect with UGS or bCNC to the virtualcom0 port . It seems to connect but i have no communication back :/

Franckapik avatar Dec 19 '22 19:12 Franckapik

@Franckapik did you make any progress on this?

TBH I am not even sure what protocol this is so this could maybe be tested without hardware. Maybe it works to create a local double socat and try with a null modem.

tcurdt avatar Apr 23 '23 20:04 tcurdt

I got this working in a null-modem setup. I will provide the details once I have confirmed it's also working in the real world. (should be in about 3 weeks)

tcurdt avatar Apr 25 '23 11:04 tcurdt

I am also interested in this. I tried using ser2net on the pi side, and com2tcp on my windows machine (com2tcp is an ancient program, but seems to still work ok). I can connect to the virtual com port using other tools like putty, but gSender doesn't even enumerate it's virtual com port, even after giving it a normal name like COM7.

grantemsley avatar May 11 '23 01:05 grantemsley

I tried using ser2net on the pi side, and com2tcp on my windows machine (com2tcp is an ancient program, but seems to still work ok). I can connect to the virtual com port using other tools like putty, but gSender doesn't even enumerate it's virtual com port, even after giving it a normal name like COM7.

That sounds like a very platform specific problem. On macOS/Linux this isn't a problem. I would try and see if socat (or some other tool) on windows created a com port that gets found.

Also checkout https://serialport.io/ which seems to be the library that is being used by gSender. Maybe they have windows specific infos.

tcurdt avatar May 11 '23 07:05 tcurdt

OK, so the big problem here SIP on macOS.

While with socat I can create a virtual serial port that bridges over tcp, the system protection prevents me to create the port under /dev where gsender is looking for it. And I haven't found a way to make gsender look for it somewhere else.

So it would be great to either allow to configure a path to a serial port instead of just searching under /dev. ...or have native support port serial over tcp.

tcurdt avatar May 30 '23 19:05 tcurdt

I found this

https://github.com/Sienci-Labs/gsender/blob/ad47239f8146f602e30e847a5a35f8e991392712/src/server/services/cncengine/CNCEngine.js#L229

and by adding

"ports":[{
	"path": "/Users/tcurdt/foo",
	"productId": "6015",
	"vendorId": "1D50",
	"manufacturer": "manufacturer"
}]

to the ~/.edge_rc.

I managed to sneak in a port!

tcurdt avatar May 30 '23 21:05 tcurdt

Just an update on this issue - we have an early implementation of sending over telnet in the latest Edge build.

kglovern avatar Oct 14 '23 15:10 kglovern

Fantastic news! That's v1.3.6-EDGE

tcurdt avatar Oct 14 '23 15:10 tcurdt