Soo, it seems that the SmsLib attached itself to the Modem (20) and not the com port (19) (as reported by windows device manager.) Putty was connecting to the com port. I looked at the ports that the enumeration returned and the com port was missing (even if putty was not running.) I rebooted, SmsLib connected to port 19, and now everything seems like it is working fine.
Now for another question - does SmsLib provide a way to convert the returned 7-bit ASCII to a readable string? I am digging but have not found anything yet. On Feb 8, 12:08 pm, JordanThompson <[email protected]> wrote: > I happened to have a putty terminal open to the modem (turns out it > was on a different port) when I sent the message and I got the correct > response in the putty window. SOOoo how do I get SMSLib to listen on > the other port? Is this the right way to handle this problem? > > thanks, > Jordan > > On Feb 8, 11:40 am, JordanThompson <[email protected]> wrote: > > > > > > > > > Hi all, > > I have set up a class that implements IUSSDNotification: > > > public class ModemStatusUpdater > > extends Thread > > implements IUSSDNotification > > { > > > @Override > > public void process(AGateway gateway, GatewayStatuses oldStatus, > > GatewayStatuses newStatus) > > { > > System.out.println("ModemStatusUpdater.process(AGateway, > > GatewayStatus):" > > + gateway.getGatewayId() + " " + oldStatus + "->" + > > newStatus); > > } > > > @Override > > public void run() > > { > > keepRunning = true; > > Service.getInstance().setUSSDNotification(this); > > > while (keepRunning) > > { > > // do stuff > > } > > } > > > @Override > > public void process(AGateway gateway, USSDResponse ussdResponse) > > { > > > System.out.println("ModemStatusUpdater.processs(AGateway,USSDResponse):" > > + gateway.getGatewayId() + " " + > > ussdResponse.getContent()); > > } > > > Here's how I send the request for minutes left on an AT&T network: > > > public void askForMinutesLeft() > > { > > cmd = "*777#"; > > // cmd = "AADBED3602"; // also tried 7 bit hex > > > boolean val = Service.getInstance().sendUSSDRequest( > > new USSDRequest(cmd), > > theSerialModemGateway.getGatewayId()); > > } > > > From the log, it looks like SMSLib is formatting it and sending > > correctly: > > 9703 2012-02-07 18:08:36,844 [main] DEBUG > > org.smslib.modem.AModemDriver - GTW: Ruby.COM: SEND :AT > > +CUSD=1,"*777#",15(cr) > > > But the callback is never called. What am I doing wrong? > > > thanks in advance, > > Jordan -- You received this message because you are subscribed to the Google Groups "SMSLib Discussion 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.
