JavaComm comes with an simple application to read and write to the
serial port. You might give those a try to communicate manually the AT
commands that SMSlib sends when it is initializing.  BlackBox will let
you modify the flow control and other things on the fly.

java  -classpath .:comm.jar BlackBox -m -p /dev/ttyUSB0

-nxn

On Jan 18, 2:31 am, Bo Visfeldt <[email protected]> wrote:
> I have tried the Javacomm library with the exact same result.
> For using either library I can complete the CommTest, and it gets
> respons from the modem at /dev/ttyUSB0
>
> Also I can open a standard linux serial terminal to /dev/ttyUSB0 and
> communicate with the modem.
> In addition i have tried attatching a modem to /dev/ttyS0 which is a
> standart serial port with the same result.
> ReadMessages always times out.
>
> On Jan 17, 10:23 pm, Pietro <[email protected]> wrote:
>
> > Just my 2 cents. Verify with the command dmesg what device your phone
> > is using.
>
> > I am using Fedora and the trick of create a link to a real device
> > doesn't work. The response was timeout the exception that you are
> > experiencing.
>
> > HTH
>
> > Pietro
>
> > You can try to use Javacomm instead
>
> > On Jan 17, 6:18 pm, Bo Visfeldt <[email protected]> wrote:
>
> > > Tried setting the switch. Still the same timeout error.
>
> > > I have tried two different kind of phones. One connected directly to
> > > the /dev/ttyS1 and one connected to /devUSB0.
> > > Both works perfectly in the commtest.
>
> > > I have tried switching between java.comm and rxtx libraries, and both
> > > works in the commtest but not in the readmessages.
> > > I have also tried the switch -Dsmslib.serial.polling
>
> > > In addition i KNOW that the one of the phones have run under smslib on
> > > a windows2000 computer earlier, but I would really really hate hate to
> > > move my entire server to windows.
> > > Any other advice?
>
> > > On Jan 16, 10:55 pm, Thanasis <[email protected]> wrote:
>
> > > > Hi,
>
> > > > On Jan 16, 11:10 pm, Bo Visfeldt <[email protected]> wrote:
>
> > > > > BUT! That should is not effecting the serviceObject as it is only a
> > > > > return value.
>
> > > > > Would the correct way not be:
> > > > > Settings tempSettings = srv.getSettings();
> > > > > tempSettings.SERIAL_RTSCTS_OUT = false;
> > > > > srv.setSettings(tempSettings);
>
> > > > > ... but unfortunately the setSettings(Settings) is for some reason a
> > > > > private function and can not be accessed.
>
> > > > No, your assumption is not correct. You can directly modify the member
> > > > fields.
>
> > > > > Any other ideas? I am pretty sure the RTSCTS is the problem!
>
> > > > Yes, one more:
> > > > Try to run the ReadMessages with the "-Dsmslib.serial.polling" switch,
> > > > for example:
>
> > > > java -Dsmslib.serial.polling examples.modem.ReadMessages
-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib for Java User Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/smslib?hl=en.


Reply via email to