Your description of the problem is not especially clear for me, but I see that you're accessing single serial port from multiple threads without any synchronization, so I'm not surprised you have a problem. Only one client may write into serial port at a time, so I'd recommend you rewrite this script without threads, it would be much less code to debug then. Also, if you would add error checks after IO operations, it could help to find the problem too. E.g. instead of:
you can write
print $lclient "$lpeer -> Welcome\n\r" or die "Send failed because: $! +";
In reply to Re: TCP Socket and Serial Port
by zwon
in thread TCP Socket and Serial Port
by FlyingEagle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |