Thanasis,
Thanks for all your help the problem is when the modem is disconnected from
GPRS it is in a state of AT+CGATT=1 Attach GPRS service.
I need to set the modem in AT+CGATT= 0 Detach GPRS service so the modem can
send SMS. I can do this in ZTerm but how can I add this to the SMSServer?
Should I add to the modem1.init_string? Or is there a better place to add
this?

Thanks
Stan


On Tue, Mar 3, 2009 at 2:40 PM, Thanasis <[email protected]> wrote:

>
> Hi,
>
> I cannot reproduce this...
>
> I can give some hints however, as this problem may be linked to GPRS
> mode switching:
>
> 1) I think that the way you restart the core service is not very
> "nice". Maybe you should find a way to break SMSServer's run() method
> in order to shutdown SMSServer's threads as well.
> 2) When you do the restart, give some idle time to the modem before
> you try to start the service again.
> 3) Is the procedure of switching-to and switching-from GPRS mode the
> correct one? Have you missed anything that could leave the modem in a
> "strange" state?
>
> On Mar 3, 2:56 pm, Stan Byrdsell <[email protected]> wrote:
> > I'm using version
> > smslib 3.3.3
> > JRE 1.5.0_16
> > OS: Mac OS X / i386 / 10.5.6
> > Modem: Multitech MTCBA-G-U-F4
> > Modem Info:
> > Manufacturer: WAVECOME MODEM
> > Model: MUTIBAND G850 1900
> > Signal Level: 90%
> > Battery Leverl: 0%
> >
> > SMSServer modem settings
> > # Lets add a modem
> > gateway.0=modem1, SerialModem
> > modem1.port=/dev/tty.MTCBA-U-G1a20
> > modem1.baudrate=115000
> > modem1.manufacturer=
> > modem1.model=
> > modem1.protocol=PDU
> > modem1.pin=0000
> > modem1.inbound=yes
> > modem1.outbound=yes
> > modem1.init_string=ATZ\rATZ\rATZ\r
> >
> > The only whay I could get it to work was to delete the
> modem1.manufacturer
> > and modem1.model and it work grate but I get :+CMS ERROR: 1 when
> restarting
> > the Server.
> >
> > Thanks
> > Stan
> >
> > On Tue, Mar 3, 2009 at 2:17 AM, Thanasis <[email protected]> wrote:
> >
> > > Hi,
> >
> > > Is this done with the latest smslib version?
> >
> > > I think this is the very first request of someone trying to
> > > programmatically restart SMSServer. Maybe something has been
> > > forgotten. I'll try to trace it and see where is this coming from and
> > > let you know.
> >
> > > On Mar 2, 11:43 pm, Stan Byrdsell <[email protected]> wrote:
> > > > To All:
> > > > When I Stop the SMSServer with SMSServer.this.srv.stopService() and
> > > > restart it with SMSServer.this.srv.startService() the modem errors
> > > > with :+CMS ERROR: 1.
> > > > Here are my Setps.
> > > > 1) Start Server SMSServer app = new SMSServer(); app.run();
> > > > 2) Stop  Server SMSServer.this.srv.stopService()
> > > > 3) Start GPRS connecting
> > > > 4) Do something over GPRS
> > > > 5) Add rec in smssvr_out
> > > > 6) Stop GPRS
> > > > 7) Start Server SMSServer.this.srv.startService()
> > > > Then I get an error :+CMS ERROR: 1
> > > > Thanks Stan
> >
> > > > See DEBUG log below:
> >
> > > > 14403 DEBUG [SMSServer - InboundPollingThread] SMSLib - GTW: modem1:
> > > > BUFFER: +CPMS: 0,30,0,30,0,30
> > > > OK
> >
> > > > 14405 DEBUG [SMSServer - InboundPollingThread] SMSLib - GTW: modem1:
> > > > RECV :+CPMS: 0,30,0,30,0,30(cr)OK(cr)
> > > > 14405 DEBUG [SMSServer - InboundPollingThread] SMSLib - GTW: modem1:
> > > > SEND :AT+CMGL=4(cr)
> > > > 14415 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 13 /
> >
> > > > 14415 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 10 /
> >
> > > > 14416 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 79 / O
> > > > 14416 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 75 / K
> > > > 14416 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 13 /
> >
> > > > 14416 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 10 /
> >
> > > > 14416 DEBUG [SMSServer - InboundPollingThread] SMSLib - GTW: modem1:
> > > > OUT READER QUEUE : 79 / O
> > > > 14416 DEBUG [SMSServer - InboundPollingThread] SMSLib - GTW: modem1:
> > > > OUT READER QUEUE : 75 / K
> > > > 14421 DEBUG [SMSServer - InboundPollingThread] SMSLib - GTW: modem1:
> > > > OUT READER QUEUE : 13 /
> >
> > > > 14421 DEBUG [SMSServer - InboundPollingThread] SMSLib - GTW: modem1:
> > > > OUT READER QUEUE : 10 /
> >
> > > > 14421 DEBUG [SMSServer - InboundPollingThread] SMSLib - GTW: modem1:
> > > > BUFFER: OK
> >
> > > > 14421 DEBUG [SMSServer - InboundPollingThread] SMSLib - GTW: modem1:
> > > > RECV :OK(cr)
> > > > 14424 DEBUG [SMSServer - InboundPollingThread] SMSLib - GTW: modem1:
> > > > CheckMpMsgList(): MAINLIST: 0
> > > > 14525 INFO  [SMSServer - OutboundPollingThread] SMSLib - Message
> > > > Queued in DB on 2009-02-28 20:53:35.0
> > > > 14540 INFO  [SMSServer - OutboundPollingThread] SMSLib -
> >
> > >
> ===========================================================================
> > > ====
> > > > << OutboundMessage >>
> >
> > >
> ---------------------------------------------------------------------------
> > > ----
> > > >  Gateway Id: *
> > > >  Encoding: 7-bit
> > > >  Date: Sat Feb 28 20:56:55 EST 2009
> > > >  SMSC Ref No:
> > > >  Recipient: 16097757566
> > > >  Dispatch Date: null
> > > >  Message Status: UNSENT
> > > >  Validity Period (Hours): -1
> > > >  Status Report: false
> > > >  Source / Destination Ports: -1 / -1
> > > >  Flash SMS: false
> > > >  Text: Your message was received by CPC.
> > > >  PDU data: D9775D0E6A97E7F3F0B90CBA87E72079795C4EDBCB6490380F1A42872E
> >
> > >
> ===========================================================================
> > > ====
> >
> > > > 14542 INFO  [SMSServer - OutboundPollingThread] SMSLib - Message
> > > > Queued in DB on 2009-02-28 20:53:35.0
> > > > 14543 INFO  [SMSServer - OutboundPollingThread] SMSLib -
> >
> > >
> ===========================================================================
> > > ====
> > > > << OutboundMessage >>
> >
> > >
> ---------------------------------------------------------------------------
> > > ----
> > > >  Gateway Id: *
> > > >  Encoding: 7-bit
> > > >  Date: Sat Feb 28 20:56:55 EST 2009
> > > >  SMSC Ref No:
> > > >  Recipient: 14079148604
> > > >  Dispatch Date: null
> > > >  Message Status: UNSENT
> > > >  Validity Period (Hours): -1
> > > >  Status Report: false
> > > >  Source / Destination Ports: -1 / -1
> > > >  Flash SMS: false
> > > >  Text: On call ck Modem New Msg
> > > > Subject: Modem Incoming
> > > >  PDU data:
> >
> > >
> 4F37681C66B341E335A8F92697DB2067F90E6ACECF20C5B42E5697C7741DA8F92697DBA0A47
> > > BFC6EA7DD67
> >
> > >
> ===========================================================================
> > > ====
> >
> > > > 14545 INFO  [SMSServer - OutboundPollingThread] SMSLib - Message
> > > > Queued in DB on 2009-02-28 20:53:35.0
> > > > 14548 INFO  [SMSServer - OutboundPollingThread] SMSLib -
> >
> > >
> ===========================================================================
> > > ====
> > > > << OutboundMessage >>
> >
> > >
> ---------------------------------------------------------------------------
> > > ----
> > > >  Gateway Id: *
> > > >  Encoding: 7-bit
> > > >  Date: Sat Feb 28 20:56:55 EST 2009
> > > >  SMSC Ref No:
> > > >  Recipient: 14074962044
> > > >  Dispatch Date: null
> > > >  Message Status: UNSENT
> > > >  Validity Period (Hours): -1
> > > >  Status Report: false
> > > >  Source / Destination Ports: -1 / -1
> > > >  Flash SMS: false
> > > >  Text: On call ck Modem New Msg
> > > > Subject: Modem Incoming
> > > >  PDU data:
> >
> > >
> 4F37681C66B341E335A8F92697DB2067F90E6ACECF20C5B42E5697C7741DA8F92697DBA0A47
> > > BFC6EA7DD67
> >
> > >
> ===========================================================================
> > > ====
> >
> > > > 14548 INFO  [SMSServer - OutboundPollingThread] SMSLib - SMSServer:
> > > > sending asynchronously...
> > > > 14551 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1:
> > > > =================================================
> > > > << SmsSubmitPdu >>
> > > > Raw Pdu:
> >
> > >
> 0011000B816190777565F60000FF21D9775D0E6A97E7F3F0B90CBA87E72079795C4EDBCB649
> > > 0380F1A42872E
> >
> > > > SMSC Address: [Length: 0 octets]
> > > > First Octet: 11 [TP-MTI: (SMS-SUBMIT), TP-RD: (allow duplicates), TP-
> > > > VPF: (validity format, integer, TP-SRR: (No Status Report), TP-UDHI:
> > > > (no UDH)]
> > > > Message Reference: 00
> > > > Destination Address: [Length: 11 (0B), Type: 81 (10000001), Address:
> > > > 16097757566]
> > > > TP-PID: 00 (00000000)
> > > > TP-DCS: 00 (7-bit GSM Alphabet) (00000000)
> > > > TP-VPF: 10584 hours
> >
> > > > User Data Length: 33 (21) septets
> > > > User Data (pdu) :
> > > > D9775D0E6A97E7F3F0B90CBA87E72079795C4EDBCB6490380F1A42872E
> > > > User Data (decoded): [Your message was received by CPC.]
> > > > =================================================
> >
> > > > 14551 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: Sending Pdu:
> >
> > >
> 0011000B816190777565F60000FF21D9775D0E6A97E7F3F0B90CBA87E72079795C4EDBCB649
> > > 0380F1A42872E
> > > > 14551 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: SEND :AT
> > > > +CMGS=43(cr)
> > > > 14559 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 13 /
> >
> > > > 14559 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 10 /
> >
> > > > 14560 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 62 / >
> > > > 14560 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 32 /
> > > > 14752 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: clearBuffer()
> > > > called.
> > > > 15753 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: SEND :
> >
> > >
> 0011000B816190777565F60000FF21D9775D0E6A97E7F3F0B90CBA87E72079795C4EDBCB649
> > > 0380F1A42872E
> > > > 16612 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 13 /
> >
> > > > 16613 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 10 /
> >
> > > > 16613 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 43 / +
> > > > 16613 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 67 / C
> > > > 16613 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: OUT READER
> > > > QUEUE : 43 / +
> > > > 16615 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 77 / M
> > > > 16615 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: OUT READER
> > > > QUEUE : 67 / C
> > > > 16615 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 83 / S
> > > > 16616 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: OUT READER
> > > > QUEUE : 77 / M
> > > > 16616 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 32 /
> > > > 16616 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: OUT READER
> > > > QUEUE : 83 / S
> > > > 16616 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 69 / E
> > > > 16616 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: OUT READER
> > > > QUEUE : 32 /
> > > > 16616 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 82 / R
> > > > 16616 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: OUT READER
> > > > QUEUE : 69 / E
> > > > 16616 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 82 / R
> > > > 16617 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: OUT READER
> > > > QUEUE : 82 / R
> > > > 16617 DEBUG [SMSlib-ModemReader-modem1] SMSLib - GTW: modem1: IN
> > > > READER QUEUE : 79 / O
> > > > 16617 DEBUG [SMSLib-QueueManager] SMSLib - GTW: modem1: OUT READER
> > > > QUEUE : 82 / R
> > > > 16617 DEBUG
> >
> > ...
> >
> > read more ยป
> >
>

--~--~---------~--~----~------------~-------~--~----~
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