Parsing OTA message
Using the 'test_ppg' program, I have the PPG forwarding a response to an SI PUSH request to an SMSC. I'm trying to understand the details of the response forwarded by Kannel to the SMSC. I have parsed most of the content of the message, but there are several response bytes I've been unable to identify. I've used several WAP PUSH-related standards documents and read through some Kannel source to try and find how/where the bytes are packed. To be more specific, I've parsed the complete SI portion of the response. Does anyone have any suggestions on how I can determine the meaning of the values of the remaining fields? I've replicated some of the data below with some details removed such as portions of text strings such as URI-related information and other text strings. I've also removed portions of the IP header fields. The POS column is the byte number in the output (including TCP/IP header information). HEX is the hex value of the output character. CHAR is the character representation ('.' shows where the hex value is a non-displayable character), Description is provided where I've been able to identify a byte meaning. POS HEX CHARDESCRIPTION 7100. Operation = submit_sm (1 of 4). 7404. Operation = submit_sm (4 of 4). 7500. 7600. 7700. 7800. 7900. Sequence (1 of 4). 8203. Sequence (4 of 4). 8300. 8401. Number Type (Origin) = International 8501. Number Plan Indicator (Origin) = ISDN 86377 Origin Phone (1 of 7). 9300. Origin Phone Terminator 9401. Number Type (Dest) = International 9501. Number Plan Indicator (Dest) = ISDN 96377 Dest Phone (1 of 7). 10300. Dest Phone Terminator. 10443C (0100 0011) Low 2 bits: msg mode (store/fwd); middle 4 bits: Default msg type; 2 high bits: UDHI. 10500. Protocol ID 10600. Priority Level 10700. mclass (?) 10800. mwi(?) 10900. ( ) Low 2 bits (bits 0 and 1): No SMSC delivery Receipt requested; Bits 2-3: Msg Type (no recipient SME ack requested); Bit 4 (intermediate notification): not requested 11000. Low bit (bit 0): Don't replace 11108. Data coding: UCS2 (ISO/IEC-10646) 11200. Pre-defined message 11388. Message Length (136). 11406. Version Number (XBXML 1.2) 11505. SI 1.0 Identifier. 11604. 1170b. 11884. 11923# 120f0. 12100. 12206. 12322" 124ae. 12596. 12664d PPG Port on Kannel (1 of 25). 15100. Terminator for PPG Port on Kannel. 152af. 15380. 1548d. 155dc. 156b4. 15780. 15802. WBXML Version 1.2 15905. Begin SI section 1606aj UTF-8 charset (1 of 2). 16100. UTF-8 charset (2 of 2). 16245E Charlist with content & attributes (1 of 2). 163c6. Charlist with content & attributes (2 of 2). 1640d. href (http://www.) 16503. Inline string follows 16663c URL for request (1 of 7). 17300. Terminator for URL for request. 17485. URL Type (.com). 17503. Inline string follows 1767e~ Path for request (1 of 29). 20500. Terminator for PATH for request. 20607. Action = signal-medium. 2070a. "Created =" 208c3. OPAQUE data follows: 20907. Length of data 21019. Begin creation time (hex). 21710. SI-expires = 218c3. OPAQUE data follows: 21904. Length of data 22020 Begin expiration time (hex). 22102. Continue expiration time. 22401. End Indication attribute list. 22503. Inline string follows 22657W Begin text message for phone (1 of 21). 24700. Terminator for text message for phone. 24801. End Indication Element 24901. End SI Document. Since I was able to identify all the fields in the SI document, I thought the unidentified fields would relate to the push control document, but I've been unable to make these connections using WAP standards documents and Kannel source/headers, primarily in the gw and gwlib directories. I think byte numbers 116 through 125 and 152 through 157 will contain the most important information. In particular, I wonder if these positions represent the values in the "quality-of-service" portion of the Push Control Document. The SI and Push Control documents I've used are provided below: SI DOCUMENT http://www.wapforum.org/DTD/si.dtd";> http://URL_AND_PATH.wml"; action="signal-medium" created="1999-06-25T15:23:15Z" si-expires="2002-07-30T00:00:00Z"> Want to test a fetch? PUSH CONTROL DOCUMENT http://www.wapforum.org/DTD/pap_1.0.dtd";> Thank you for yo
RE : XML
-Message d'origine- De : Oded Arbel [mailto:[EMAIL PROTECTED]] Envoyé : vendredi 12 juillet 2002 20:10 À : nil Cc : [EMAIL PROTECTED] Objet : Re: XML nil wrote: >Hi > >When I receive an sms, I want to post through http a XML message. > >Does anybody knows how I can do this. > >the http url is: > > http://mysms.com/MessageServlet > > >And the xml messages are: > > > > > > MYNAME > .1.12:16ac04:eed9dbe852:-5cc2 > > > > MY Message > +3372584253 > > > > >I need to put the phone number and the message in the XML doc and post it for >each sms that I receive. > >Thank you. > > > Kannel can't do that directly (though you might want to check the XMLRPC interface that does something similar), but you can set the sms-service to call an executable script or a web script to format the XML and POST it to where you need to. How do I do that ?
Re: Patch to turn off CRTSCTS
On Sat, 2002-07-13 at 04:01, Oded Arbel wrote: > Eric Yeo wrote: > > >We have an old Ericsson GM12 with a custom-made serial cable that does > >not have the control signals wired. When running Kannel 1.2.0, no > >communications occurs. Turning off hardware flow control helps. > > > >Attached is a patch against Kannel 1.2.0 that add an extra directive to > >the modems group (disable-crtscts). Might help some people. > > > >Regards, > >Eric Yeo > > > > > > > > > > > >Only in gateway-1.2.0-ttey/doc/alligata: alligata.tex > >Only in gateway-1.2.0-ttey/doc/alligata: alligata.tmp > >diff -r -c gateway-1.2.0/gw/smsc_at2.c gateway-1.2.0-ttey/gw/smsc_at2.c > >*** gateway-1.2.0/gw/smsc_at2.c Tue May 14 09:57:36 2002 > >--- gateway-1.2.0-ttey/gw/smsc_at2.c Fri Jul 12 15:01:54 2002 > >*** > >*** 82,87 > >--- 82,91 > > tios.c_cflag |= CRTSCTS; /* enable hardware flow control */ > > tios.c_cc[VSUSP] = 0; /* otherwhise we can not send CTRL Z */ > > > >+ if (privdata->modem->disable_crtscts) { > >+ tios.c_cflag &= ~CRTSCTS; /* disable hardware flow control */ > >+ } > >+ > > > > > The idea is solid, but the logic is broken - I think you should instead > test for disable_crtscts earlier and only turn on that bit on the > tios.c_cflag if it's turned off (a 'not' test). > or better : have a use_crtscts in the modem data structure, turn the bit > on only if it is set, and on initialization, init the use_crtscts flag > to true and set it to false only if "disable-crtscts" is set in the > configuration. > > -- > Oded Arbel > m-Wise mobile solutions Either I don't understand what you are saying or you should perhaps take another look at the patch. The patch introduces the new directive "disable-crtscts". If this directive is set to "true" for the modem, the CRTSCTS bit is turned off. If the directive is missing or set to "false", the CRTSCTS is set on as per the default. The line "tios.c_cflag &= ~CRTSCTS" effectively turns off the CRTSCTS bit regardless of its previous value. There is no need to "toggle" (so to speak). Regards, Eric Yeo
Re: XML
nil wrote: >Hi > >When I receive an sms, I want to post through http a XML message. > >Does anybody knows how I can do this. > >the http url is: > > http://mysms.com/MessageServlet > > >And the xml messages are: > > > > > > MYNAME > .1.12:16ac04:eed9dbe852:-5cc2 > > > > MY Message > +3372584253 > > > > >I need to put the phone number and the message in the XML doc and post it for >each sms that I receive. > >Thank you. > > > Kannel can't do that directly (though you might want to check the XMLRPC interface that does something similar), but you can set the sms-service to call an executable script or a web script to format the XML and POST it to where you need to. -- Oded Arbel m-Wise mobile solutions
XML
Hi When I receive an sms, I want to post through http a XML message. Does anybody knows how I can do this. the http url is: http://mysms.com/MessageServlet And the xml messages are: MYNAME .1.12:16ac04:eed9dbe852:-5cc2 MY Message +3372584253 I need to put the phone number and the message in the XML doc and post it for each sms that I receive. Thank you.
Re: Patch to turn off CRTSCTS
Eric Yeo wrote: We have an old Ericsson GM12 with a custom-made serial cable that does not have the control signals wired. When running Kannel 1.2.0, no communications occurs. Turning off hardware flow control helps. Attached is a patch against Kannel 1.2.0 that add an extra directive to the modems group (disable-crtscts). Might help some people. Regards, Eric Yeo Only in gateway-1.2.0-ttey/doc/alligata: alligata.tex Only in gateway-1.2.0-ttey/doc/alligata: alligata.tmp diff -r -c gateway-1.2.0/gw/smsc_at2.c gateway-1.2.0-ttey/gw/smsc_at2.c *** gateway-1.2.0/gw/smsc_at2.c Tue May 14 09:57:36 2002 --- gateway-1.2.0-ttey/gw/smsc_at2.c Fri Jul 12 15:01:54 2002 *** *** 82,87 --- 82,91 tios.c_cflag |= CRTSCTS; /* enable hardware flow control */ tios.c_cc[VSUSP] = 0; /* otherwhise we can not send CTRL Z */ + if (privdata->modem->disable_crtscts) { + tios.c_cflag &= ~CRTSCTS; /* disable hardware flow control */ + } + The idea is solid, but the logic is broken - I think you should instead test for disable_crtscts earlier and only turn on that bit on the tios.c_cflag if it's turned off (a 'not' test). or better : have a use_crtscts in the modem data structure, turn the bit on only if it is set, and on initialization, init the use_crtscts flag to true and set it to false only if "disable-crtscts" is set in the configuration. -- Oded Arbel m-Wise mobile solutions
Re: Send SMS Problem
I faced something similar once, Check smsbox.log , look at sender's phone number it should be +436643918269 check if kannel replaced the sign "+" to something else then use unified-prefix to fix it I just fixed my problem like this, i dont know if this is suitable for you Nick --- Oded Arbel <[EMAIL PROTECTED]> wrote: > Tampier Thomas wrote: > > >Hi list > > > >my kannel is unstabke in terms of send sms from php > srcipts.. my scripts > >are called by a sms-service from kannel and i use > "echo" to reply to the > >SMS-Devices... My problem is, that each time i try > to send a sms i get an > >ERROR -> and sometimes the SMS is sent, sometimes > not. I use a Siemens > >TC35 as SMS center. i use cvs-20020618 version of > kannel. > >does anybody know whats the problem? > > > >thx in advance > >T > > > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: <-- > +CMT: ,23 > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: <-- > >069134660405F1040C9134663419289620700112544348044AB55A0D > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: > >Numeric sender (international) <+436643918269> > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: --> > AT+CNMA^M > >2002-07-10 21:51:44 [8] DEBUG: boxc_sender: sent > message to <127.0.0.1> > >2002-07-10 21:51:44 [7] DEBUG: boxc_receiver: got > ack > >2002-07-10 21:51:44 [7] DEBUG: boxc_receiver: sms > received > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: <-- > OK > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: > international starting with + (+436643918269) > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: > TP-Validity-Period: 24.0 hours > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: --> > AT+CMGS=38^M > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: <-- > > > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: > send command status: 1 > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: --> > >0011000C91346634192896A71BC2349D5E06C9CBE7F49C2E4F97E56537689A2E83E6E9311A > >2002-07-10 21:51:44 [5] DEBUG: AT2[/dev/ttyS0]: --> > ^Z > >2002-07-10 21:51:45 [5] DEBUG: AT2[/dev/ttyS0]: <-- > > > >2002-07-10 21:51:45 [5] DEBUG: AT2[/dev/ttyS0]: <-- > ERROR > >2002-07-10 21:51:45 [5] DEBUG: AT2[/dev/ttyS0]: > send command status: -1 > >2002-07-10 21:51:45 [5] DEBUG: AT2[/dev/ttyS0]: --> > AT+CMGS=38^M > >2002-07-10 21:51:45 [5] DEBUG: AT2[/dev/ttyS0]: <-- > > > >2002-07-10 21:51:45 [5] DEBUG: AT2[/dev/ttyS0]: > send command status: 1 > >2002-07-10 21:51:45 [5] DEBUG: AT2[/dev/ttyS0]: --> > >0011000C91346634192896A71BC2349D5E06C9CBE7F49C2E4F97E56537689A2E83E6E9311A > >2002-07-10 21:51:45 [5] DEBUG: AT2[/dev/ttyS0]: --> > ^Z > >2002-07-10 21:51:48 [5] DEBUG: AT2[/dev/ttyS0]: <-- > > > >2002-07-10 21:51:48 [5] DEBUG: AT2[/dev/ttyS0]: <-- > +CMGS: 140 > >2002-07-10 21:51:48 [5] DEBUG: AT2[/dev/ttyS0]: <-- > OK > >2002-07-10 21:51:48 [5] DEBUG: AT2[/dev/ttyS0]: > send command status: 0 > > > >__ > > > > > > > > > > > This looks ok - the message was sent successfuly, > eventually. what > happens is that when you deliver an MT to the AT2 > module, it attempts to > send it to the modem. sometime, for various reasons, > the modem will > reject the MT, in which case the driver will try > again until it either > succeeds or fails 3 times. in the logs here you can > see a message that > was tried once, failed, tried again and sent > successfuly the second time. > > -- > Oded Arbel > m-Wise mobile solutions > > > > __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com