I don't know exactly how to troubleshoot the issue I'm having, so I'll ask here.I have a USB 3G modem attached to a physical machine server4 running ProxMox OS based on Debian Wheezy, and I can send SMS with it just fine using gsmsendsms.echo Message | gsmsendsms -d /dev/ttyUSB0 -b 19200 <phone number>This works well. Now I have a virtual machine (Ubuntu Server 14.04) installed on a different physical server server1 also running Proxmox based on Debian Wheezy, and I want this virtual machine to access the USB modem on server4.  So far I've tried using ser2net on server4 to 'share' the USB modem trough the network using this line in config:2000:raw:0:/dev/ttyUSB0:19200 8DATABITS NONE 1STOPBIT bannerwhich should do the job from what I've managed to understand about ser2net.On the virtual machine I tried using socat to add a virtual device linked to shared USB modem:socat pty,link=/dev/virtualcom0,raw tcp:server4:2000which seems to do the job, as the device virtualcom0 appears in /dev. However, if I try to send an SMS using virtualcom0, I get a funny error:user@vm:~$ echo SMS Test Message! | sudo gsmsendsms -d /dev/virtualcom0 -b 19200 <phone number>gsmsendsms[ERROR]: clearing DTR failed (errno: 22/Invalid argument)I use the exact same command as on physical server where USB modem is connected, but it fails, and googling 'gsmsendsms errno 22' wasn't very productive.In the end, I'd like to make a USB modem plugged into the physical server4 accessible for Zabbix, which runs in a virtual machine on server1. If there is a better way of doing this than using ser2net and socat, I'm ready to try something else.
Sending SMS trough a modem attached to another server using ser2net and socat
usb;modem;mobile;socat;sms