Friday 24 June 2011

Use "IP Modem" in Deepnet DualShield

With DualShield, you try to use GPRS Modem to send SMS and may face one of the following situations.



  • You installed a 64bit version DualShield, and it is hard for you to find a 64bit driver of your modem working on a 64bit OS.

  • You installed DualShield on a virtual machine, and the host (like ESXi) can’t pass though your modem device.


Fortunately, there is a workaround, assume you have a physical machine which can install the modem driver.


On the above image, we label the PC to which the modem is physically connected as “Remote PC [Server]”. After installing the modem driver on this PC, check “Device Manager” to see if the modem device is available.


Also check what the COM port is.


Now run “Pira CZ Remote COM Port” (a freeware application which can be downloaded from http://www.pira.cz/eng/piracom.htm, not sure if it has service version. If not, you can use some utility to turn it to a service anyway), make sure select the correct COM port. You can use the default “Server Port” (=23).


Now your modem is converted to an IP modem which can be accessed from another machine (Local PC [Client] labelled in the first image), then how?
You need another software “HW VSP3 - Virtual Serial Port” which can be downloaded from http://www.hw-group.com/products/hw_vsp/index_en.html, it has 64 bit support.


It will create a virtual COM port on this PC which maps to IP and port provided by piracom we set it at the first stage.


Once connected, DualShield can use this like a local COM port.


What if you are using linux OS? You can use remserial or socat.


For your convenience, here are the commands respectively,



Give access to a RS232 device over a network.
// remserial command
remserial -d -p 23 -s "9600 raw" /dev/ttyS0 &
// socat command
socat tcp-l:23,reuseaddr,fork file:/dev/ttyS0,nonblock,raw,echo=0,waitlock=/var/run/tty

Connect a Linux program that needs a serial port to a remote serial port.
// remserial command
remserial -d -r 192.168.222.124 -p 23 -l /dev/remserial1 /dev/ptmx &
// socat command
socat pty,link=/dev/netcom0,raw tcp: 192.168.222.124:23 &

The PDF version can be accessed from here.


Reference


Pira CZ Remote COM Port

HW VSP3 - Virtual Serial Port

Remserial
Socat

No comments: