I am using the smslib library in java to connect a HSDPA dongle to my computer. I then use this dongle to send SMS messages.
Previously I used a USB modem; that I then mapped as a Serial port. I could connect to it as such:
gateway = new SerialModemGateway("SMSSERVER",
config.getProperty("COMPORT"),
Integer.parseInt(config.getProperty("BAUDRATE")),
config.getProperty("MANUFACTURER"),
config.getProperty("MODEL"));
And that would work. Now I have an IP Modem and I'm trying to connect to it the same way, using the IPModemGateway class:
gateway = new IPModemGateway("SMSSERVER",
config.getProperty("IP"),
Integer.parseInt(config.getProperty("IPPORT")),
config.getProperty("MANUFACTURER"),
config.getProperty("MODEL"));
From the smslib documentation I read:
An IP Modem gateway is initialized like this:
Modem gateway = new Modem("modem2", "192.168.1.100", "5000", "0000", "0000", "306942190000");
I am however not sure how I can find the port number (that is 5000 in the example). The dongle I'm using is the Vodafone K5160. When I plug it in, it boots up as a local website on 192.168.9.100 (its default gateway) and when I check ipconfig the network adapter has an ip of 192.168.9.100.
I assume I have to connect to 192.168.9.100, with a certain port. I can't get it to work.
I tried to use netstat -a:
TCP 192.168.9.100:139 D12WITA:0 LISTENING
TCP 192.168.9.100:58305 VodafoneMobile:http TIME_WAIT
TCP 192.168.9.100:58311 VodafoneMobile:http TIME_WAIT
TCP 192.168.9.100:58318 VodafoneMobile:http TIME_WAIT
TCP 192.168.9.100:58349 VodafoneMobile:http ESTABLISHED
TCP 192.168.9.100:58350 VodafoneMobile:http TIME_WAIT
TCP 192.168.9.100:58358 VodafoneMobile:http TIME_WAIT
But I'm not sure if this info is usable