So, I grabbed the logs that show the AT commands being sent to and
from the modem. First I send a message from the SMSLib connected modem
to a google voice number (+19876543210) that says "hello google
voice". Then I send a message from that google voice number back to
the SMSLib modem that says "Hello SMSLib" which is when the exception
is thrown. Obviously, I changed the numbers for privacy's sake. There
are other messages on the phone sent from another number
(+10123456789) which are irrelevant. I know there are snippets of a
message that say "refill your account", but the account has credit in
it.

SEND :AT+CMMS=2(cr)
BUFFER: OK
RECV :OK(cr)
SEND :AT+CMGS="+19876543210"(cr)
SEND :Hello google voice
OKFFER: +CMGS: 77
RECV :+CMGS: 77(cr)OK(cr)
SEND :AT(cr)
BUFFER: OK
RECV :OK(cr)
SEND :AT(cr)
BUFFER: OK
RECV :OK(cr)
SEND :AT(cr)
BUFFER: OK
RECV :OK(cr)
SEND :AT(cr)
BUFFER: +CMTI: "MT",136
BUFFER: OK
RECV :OK(cr)
SEND :AT+CPMS="IM"(cr)
OKFFER: +CPMS: 6,254
RECV :+CPMS: 6,254(cr)OK(cr)
SEND :AT+CMGL="ALL"(cr)
OK this works, im gonna be very surprised  ount. Go to att.com/
mygophone or dial 611 now to refill & carry over your balance.
RECV :+CMGL: 136,"REC UNREAD","+19876543210"(cr)Hello SMSLib(cr)+CMGL:
135,"REC READ","+19876543210"(cr)Hello SMS modem. I hope that
receiving works.(cr)+CMGL: 134,"REC READ","3711"(cr)AT&T Free msg:
It's time to refill your account. Go to att.com/mygophone or dial 611
now to refill & carry over your balance.(cr)+CMGL: 133,"REC
READ","+10123456789"(cr)And hopefully this works as well.(cr)+CMGL:
132,"REC READ","+10123456789"(cr)Will this work?(cr)+CMGL: 131,"REC
READ","+10123456789"(cr)If this works, im gonna be very surprised
(cr)OK(cr)
Exception in thread "SMSLib-AsyncMessageProcessor : /dev/ttyS0"
java.util.NoSuchElementException
        at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
        at org.smslib.modem.ModemGateway.readMessagesTEXT(ModemGateway.java:
420)
        at org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:211)
        at org.smslib.modem.AModemDriver
$AsyncMessageProcessor.run(AModemDriver.java:880)

On Jul 28, 2:33 pm, Dieterich L <[email protected]> wrote:
> Hey everyone,
>
> I am set up using a Motorola Razr connected to a laptop running Ubuntu
> 10 via USB. I'm able to send SMS perfectly fine, but I'm having some
> errors when receiving. The way that I 'receive' messages is that I set
> my service's InboundMessageNotification to an anonymous inner class
> like this:
>
> service.setInboundMessageNotification(new
> IInboundMessageNotification() {
>
>     public void process(AGateway gateway, MessageTypes messageType,
> InboundMessage message) {
>         ... code to save message to the DB....
>     }
>
> });
>
> Unfortunately, I get this error whenever I receive a message:
>
> Exception in thread "SMSLib-AsyncMessageProcessor : /dev/ttyS0"
> java.util.NoSuchElementException
>         at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
>         at org.smslib.modem.ModemGateway.readMessagesTEXT(ModemGateway.java:
> 418)
>         at org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:209)
>         at org.smslib.modem.AModemDriver
> $AsyncMessageProcessor.run(AModemDriver.java:878)
>
> Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib 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