hi,

after googling, the 256 bytes limit for GET was defined in old specifcation,
the max. length of URL is not defined in the new speification any more.


I changed the XML string by inserting the <!DOCTYPE> line. And now the the
unknown attributes are correct.
//"WARNING: OTA compiler: Unknown attribute 'type' in OTA source, with value
'NAPDEF'." //<-ok now!
//"WARNING: OTA compiler: Unknown attribute 'type' in OTA source, with value
'WLAN'."     // <- ok now!

I can receive the config-sms on the device, after open->save, there is no
new Wlan AP inserted(configured)

Now it looks like the problem is on the xml-wbxml->ota(sms).

Regards

Pai



Here is my prov-xml (for a WLAN AP):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE wap-provisioningdoc PUBLIC "-//WAPFORUM//DTD PROV 1.0//EN" "
http://www.wapforum.org/DTD/prov.dtd";>
<wap-provisioningdoc>
<!-- WLAN AP profile settings -->
<characteristic type="NAPDEF">
        <parm name="NAME" value="VSTP"/>
        <parm name="NAPID" value="VSTP"/>
        <parm name="PROVIDER-ID" value="VSTP"/>
        <parm name="BEARER" value="WLAN"/>
        <characteristic type="WLAN">
                <parm name="PRI-SSID" value="VSTP"/>
                <parm name="NETMODE" value="INFRA"/>
                <parm name="SECMODE" value="WPA-PRESHARED-KEY"/>
                <parm name="WPA-PRES-KEY-ASC" value="test123"/>
        </characteristic>
</characteristic>
</wap-provisioningdoc>

as URLXML:
http://127.0.0.1:13003/cgi-bin/sendota?user=pai&password=paipeng&sec=userpin&pin=1234&type=oma-settings&to=0123456789&text=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22+standalone%3D%22yes%22%3F%3E%0D%0A%3C!DOCTYPE+wap-provisioningdoc+PUBLIC+%22-%2F%2FWAPFORUM%2F%2FDTD+PROV+1.0%2F%2FEN%22+%22http%3A%2F%2Fwww.wapforum.org%2FDTD%2Fprov.dtd%22%3E%0D%0A%3Cwap-provisioningdoc%3E%0D%0A%3C!--+WLAN+AP+profile+settings+--%3E%0D%0A%3Ccharacteristic+type%3D%22NAPDEF%22%3E%0D%0A++++++++%3Cparm+name%3D%22NAME%22+value%3D%22VSTP%22%2F%3E%0D%0A++++++++%3Cparm+name%3D%22NAPID%22+value%3D%22VSTP%22%2F%3E%0D%0A++++++++%3Cparm+name%3D%22PROVIDER-ID%22+value%3D%22VSTP%22%2F%3E%0D%0A++++++++%3Cparm+name%3D%22BEARER%22+value%3D%22WLAN%22%2F%3E%0D%0A++++++++%3Ccharacteristic+type%3D%22WLAN%22%3E%0D%0A++++++++++++++++%3Cparm+name%3D%22PRI-SSID%22+value%3D%22VSTP%22%2F%3E%0D%0A++++++++++++++++%3Cparm+name%3D%22NETMODE%22+value%3D%22INFRA%22%2F%3E%0D%0A++++++++++++++++%3Cparm+name%3D%22SECMODE%22+value%3D%22WPA-PRESHARED-KEY%22%2F%3E%0D%0A++++++++++++++++%3Cparm+name%3D%22WPA-PRES-KEY-ASC%22+value%3D%22test123%22%2F%3E%0D%0A++++++++%3C%2Fcharacteristic%3E%0D%0A%3C%2Fcharacteristic%3E%0D%0A%3C%2Fwap-provisioningdoc%3E%0D%0A&SendSMS=


and here is log in SMSBox:

2009-02-02 15:43:18 [24568] [2] DEBUG: HTTP: Creating HTTPClient for
`127.0.0.1'.
2009-02-02 15:43:18 [24568] [2] DEBUG: HTTP: Created HTTPClient area
0x8153d30.
2009-02-02 15:43:18 [24568] [3] INFO: smsbox: Got HTTP request
</cgi-bin/sendota> from <127.0.0.1>
2009-02-02 15:43:18 [24568] [3] INFO: sendsms used by <pai>
2009-02-02 15:43:18 [24568] [3] DEBUG: OTA service with XML document
2009-02-02 15:43:18 [24568] [3] WARNING: OMA ProvCont
2009-02-02 15:43:18 [24568] [3] DEBUG: Octet string at 0x8160e20:
2009-02-02 15:43:18 [24568] [3] DEBUG:   len:  255
2009-02-02 15:43:18 [24568] [3] DEBUG:   size: 1024
2009-02-02 15:43:18 [24568] [3] DEBUG:   immutable: 0
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 01 06 2f 1f 2d b6 91 81 92 31
45 37 44 38 30 46   ../.-....1E7D80F
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 34 33 36 39 33 39 38 41 33 46
39 34 39 39 33 33   4369398A3F949933
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 45 37 31 42 33 34 34 39 44 34
35 41 46 35 43 34   E71B3449D45AF5C4
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 33 00 03 0b 6a 00 45 c6 50 03
4e 41 50 44 45 46   3...j.E.P.NAPDEF
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 00 01 87 05 03 4e 41 4d 45 00
06 03 56 53 54 50   .....NAME...VSTP
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 00 01 87 05 03 4e 41 50 49 44
00 06 03 56 53 54   .....NAPID...VST
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 50 00 01 87 05 03 50 52 4f 56
49 44 45 52 2d 49   P.....PROVIDER-I
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 44 00 06 03 56 53 54 50 00 01
87 05 03 42 45 41   D...VSTP.....BEA
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 52 45 52 00 06 03 57 4c 41 4e
00 01 c6 50 03 57   RER...WLAN...P.W
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 4c 41 4e 00 01 87 05 03 50 52
49 2d 53 53 49 44   LAN.....PRI-SSID
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 00 06 03 56 53 54 50 00 01 87
05 03 4e 45 54 4d   ...VSTP.....NETM
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 4f 44 45 00 06 03 49 4e 46 52
41 00 01 87 05 03   ODE...INFRA.....
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 53 45 43 4d 4f 44 45 00 06 03
57 50 41 2d 50 52   SECMODE...WPA-PR
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 45 53 48 41 52 45 44 2d 4b 45
59 00 01 87 05 03   ESHARED-KEY.....
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 57 50 41 2d 50 52 45 53 2d 4b
45 59 2d 41 53 43   WPA-PRES-KEY-ASC
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 00 06 03 74 65 73 74 31 32 33
00 01 01 01 01      ...test123.....
2009-02-02 15:43:18 [24568] [3] DEBUG: Octet string dump ends.
2009-02-02 15:43:18 [24568] [3] INFO: /cgi-bin/sendota: XML request for
target <01721672783>
2009-02-02 15:43:18 [24568] [3] DEBUG: Octet string at 0x8160e20:
2009-02-02 15:43:18 [24568] [3] DEBUG:   len:  255
2009-02-02 15:43:18 [24568] [3] DEBUG:   size: 1024
2009-02-02 15:43:18 [24568] [3] DEBUG:   immutable: 0
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 01 06 2f 1f 2d b6 91 81 92 31
45 37 44 38 30 46   ../.-....1E7D80F
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 34 33 36 39 33 39 38 41 33 46
39 34 39 39 33 33   4369398A3F949933
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 45 37 31 42 33 34 34 39 44 34
35 41 46 35 43 34   E71B3449D45AF5C4
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 33 00 03 0b 6a 00 45 c6 50 03
4e 41 50 44 45 46   3...j.E.P.NAPDEF
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 00 01 87 05 03 4e 41 4d 45 00
06 03 56 53 54 50   .....NAME...VSTP
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 00 01 87 05 03 4e 41 50 49 44
00 06 03 56 53 54   .....NAPID...VST
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 50 00 01 87 05 03 50 52 4f 56
49 44 45 52 2d 49   P.....PROVIDER-I
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 44 00 06 03 56 53 54 50 00 01
87 05 03 42 45 41   D...VSTP.....BEA
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 52 45 52 00 06 03 57 4c 41 4e
00 01 c6 50 03 57   RER...WLAN...P.W
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 4c 41 4e 00 01 87 05 03 50 52
49 2d 53 53 49 44   LAN.....PRI-SSID
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 00 06 03 56 53 54 50 00 01 87
05 03 4e 45 54 4d   ...VSTP.....NETM
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 4f 44 45 00 06 03 49 4e 46 52
41 00 01 87 05 03   ODE...INFRA.....
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 53 45 43 4d 4f 44 45 00 06 03
57 50 41 2d 50 52   SECMODE...WPA-PR
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 45 53 48 41 52 45 44 2d 4b 45
59 00 01 87 05 03   ESHARED-KEY.....
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 57 50 41 2d 50 52 45 53 2d 4b
45 59 2d 41 53 43   WPA-PRES-KEY-ASC
2009-02-02 15:43:18 [24568] [3] DEBUG:   data: 00 06 03 74 65 73 74 31 32 33
00 01 01 01 01      ...test123.....
2009-02-02 15:43:18 [24568] [3] DEBUG: Octet string dump ends.
2009-02-02 15:43:18 [24568] [3] INFO: /cgi-bin/sendota <<default>>
<0123456789>
2009-02-02 15:43:18 [24568] [3] DEBUG: Stored UUID
eaeed5da-fc6f-4580-8eb8-e0742158c6e6
2009-02-02 15:43:18 [24568] [3] DEBUG: message length 255, sending 2
messages
2009-02-02 15:43:18 [24568] [0] DEBUG: Got ACK (0) of
eaeed5da-fc6f-4580-8eb8-e0742158c6e6
2009-02-02 15:43:18 [24568] [0] DEBUG: HTTP: Resetting HTTPClient for
`127.0.0.1'.
2009-02-02 15:43:18 [24568] [3] DEBUG: Status: 202 Answer: <Sent.>


On Mon, Feb 2, 2009 at 3:50 PM, Cezary Siwek <[email protected]>wrote:

>  Nikos,
>
> I don't think that max HTTP-GET size is limited to 256 bytes. M$ products
> are supporting 2kB in the URL. Also, most of servers can recievie 4kb using
> GET method.
> I was successfully using kannel to send 8-part messages (around 1200 chars)
>
> Regards,
> Cezary
>
>
>
> ----- Original Message -----
> *From:* Nikos Balkanas <[email protected]>
> *To:* Pai Peng <[email protected]> ; [email protected]
> *Sent:* Monday, February 02, 2009 2:38 PM
> *Subject:* Re: problem by sendota Nokia OMA (1.4.2)
>
> Hi,
>
> YOU CANNOT send XML text with a GET. It is limited to 256 chars (including
> URL) and definitely no newlines. This is an HTTP limitation, not kannel's.
>
> Please read the User's guide, there are some excellent POST examples that
> work.
>
> Nikos
>
> ----- Original Message -----
> *From:* Pai Peng <[email protected]>
> *To:* [email protected]
> *Sent:* Monday, February 02, 2009 4:17 PM
> *Subject:* Re: problem by sendota Nokia OMA (1.4.2)
>
> hello Nikos,
>
>
> I have now read the text you reminded. I think XML post and XML get are two
> different protocols, but have the same function. Just GET is easy to use for
> sending requests. (If it readly works ; ) )
>
> The OTA configuration is only usful, if I use the defined configuration
> within Kannel: ota-id & ota bookmark. (but I am trying to use a XML string)
>
>
> Now I checked out to use 'oma-settings', instead of 'settings' for the
> parameter 'type. But I can't receive any SMSs on device any more.
>
>
> Please correct me, where i have done wrong.
>
>
> Regards
>
> Pai
>
>
>
>
>
>
>
> On Fri, Jan 30, 2009 at 9:32 PM, Nikos Balkanas <[email protected]>wrote:
>
>>  Hi,
>>
>> Please download latest CVS user guide. Turn to page 89 and read about XML
>> Post. It is not a good idea to start throwing around variables in a GET
>> operation trying to fish in the blind. A few pages later is the OTA
>> configuration specs that you need in your kannel.conf.
>>
>> BR,
>> Nikos
>>
>> ----- Original Message -----
>> *From:* Pai Peng <[email protected]>
>> *To:* [email protected]
>> *Sent:* Friday, January 30, 2009 9:40 PM
>> *Subject:* problem by sendota Nokia OMA (1.4.2)
>>
>> hello,
>>
>>
>> this is my first day to use kannel. I have heard it monthes ago, but today
>> i have installed it and try to use. My main purpose for using kannel is to
>> send OTA OMA configuration to the devices.
>>
>> But I got errors by sending this following example (AP defining OMA XML):
>>
>> <?xml version="1.0" encoding="UTF-8" standalone = "yes" ?>
>> <wap-provisioningdoc>
>> <!-- WLAN AP profile settings -->
>> <characteristic type="NAPDEF">
>>     <parm name="NAME" value="wlanapname"></parm>
>>     <parm name="NAPID" value="wlanapname"></parm>
>>     <parm name="PROVIDER-ID" value="wlanapname"></parm>
>>     <parm name="BEARER" value="WLAN"></parm>
>>     <characteristic type="WLAN">
>>         <parm name="PRI-SSID" value="wlanapssid"></parm>
>>         <parm name="NETMODE" value="INFRA"></parm>
>>         <parm name="SECMODE" value="WPA-PRESHARED-KEY"></parm>
>>         <parm name="WPA-PRES-KEY-ASC" value="mypassword"></parm>
>>     </characteristic>
>> </characteristic>
>> </wap-provisioningdoc>
>>
>> It is used to define a new wlan access point. this xml works with the
>> other SMS gateway 'NowSMS'.
>>
>> my Nokia E71 can receive the SMS sent by kannel, but can not open it:
>> "Unable to open, message format not supported."
>>
>> in  the log file of smsbox:
>>
>> WARNING: OTA compiler: Unknown attribute 'type' in OTA source, with value
>> 'NAPDEF'.
>> WARNING: OTA compiler: Unknown attribute 'type' in OTA source, with value
>> 'WLAN'.
>>
>> DEBUG (in hex): *application/x-wap-prov.browser-settings........
>>
>>
>> It seems like that the smsbox converts the Access Point XML into
>> WebBrowser XML format. At least it doesn't know the access point xml
>> protocol.
>>
>>
>> I am using the GET method for the OTA HTTP interface with
>> text=MyURLEncodedXMLdocument.
>>
>> I don't know the OTA settings and bookmark documents defined in the user
>> guite. where should I define my own bookmark documents? how does Kannel find
>> it?
>>
>>
>> So, I need help to find out a solution to make it work.
>>
>>
>> Thanks for reading and your helps.
>>
>>
>> Regards
>>
>> Pai
>>
>>
>>
>

Reply via email to