TC65i-X: AT^SJOTAP - Download of Jad fails | Telit Cinterion IoT Developer Community
February 27, 2015 - 12:34pm, 4253 views
Hi there!
it seems to me that AT^SJOTAP fails if the Web-Servers Response for downloading the Jad-File doesn't contain a Content-Length (but contains "Transfer-Encoding": chunked instead) .
Error-Code 906 or AT^SJOTAP blocks after connecting:
[OTAP] GPRS connection established.
[OTAP] Try to get http://dtag.cumulocity.com/inventory/binaries/418589501 ...
[OTAP] Connected.
^SYSSTART
have a look a the Webserver-Header:
$ curl -v --proxy <IP>:8080 --header "Authorization: Basic <authstring>" <URL-to-Jad> -O
* Trying <IP>...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to <IP>(<IP>) port 8080 (#0)
> GET <URL-to-Jad> HTTP/1.1
> User-Agent: curl/7.40.0
> Host: <Host>
> Accept: */*
> Proxy-Connection: Keep-Alive
> Authorization: Basic <authstring>
>
< HTTP/1.1 200 OK
< Server: nginx
< Date: Fri, 27 Feb 2015 09:51:15 GMT
< Content-Type: text/plain; charset=UTF-8
< Transfer-Encoding: chunked
< Content-Disposition: attachment; filename="S6C8Y.jad"
< Cache-Control: proxy-revalidate
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
< Age: 0
Am I right in assuming that might be the reason for the failing Download?
(on other webservers the AT^SJOTAP works well for the same Jad/Jar-File
here the server-response looks a tad different:
==================== Jad - Apache-Coyote/1.1 ===================
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: x-requested-with
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Frame-Options: DENY
Cache-Control: no-store
Content-Disposition: attachment; filename=S6C8Y.jad
Content-Type: text/plain;charset=UTF-8
Content-Length: 503
Connection: close 16:21)
How can I solve this problem - keeping in mind I'm not the Webservers-Administrator?
Cheers!
Marko
just tried to upload with type Content-Type: "text/vnd.sun.j2me.app-descriptor"
yields the same result:
OK
AT^SJOTAPAT^SJOTAP
OK
AT^SCFG=Trace/Syslog/OTAP,1AT^SCFG=Trace/Syslog/OTAP,1
SYSLOG ENABLED
[OTAP] GPRS connection established.
[OTAP] Try to get http://<URL-to-jad> ...
[OTAP] Connected.
[OTAP] Transfer finished.
[OTAP] JAM status: 906 Invalid Descriptor.
[OTAP] Reboot now.
^SYSSTART
Hi,
What do you have inside your descriptor?
Regards,
Jure
HTTPPWD: <HTTP-PWD>
HTTPUSER: <HTTP-USER>
MIDlet-1: S6C8Y,,tsystems.S6C8Y
MIDlet-Jar-Size: 346314
MIDlet-Jar-URL: <URL-to-Jad>
MIDlet-Name: S6C8Y
MIDlet-Vendor: T-Systems International GmbH
MIDlet-Version: 0.0.49
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: IMP-NG
UseHTTPBasicAuth: 1
server.connprops: ;timeout=120;bearer_type=GPRS;access_point=internet.t-d1.de;username=anyone;password=something
Is MIDlet-Jar-URL: <URL-to-Jad> set? Or you just didn't want to show it? That could be the only thing I know that could be causing problems.
But if it works on the other server, then probably this isn't the problem and somebody else will be able to help you more.
Regards,
Jure
MIDlet-Jar-URL contains the URL to the Jar-File on the nginx-webserver.
Just didn't want to reveal any URLs.
Anyway, thx a lot for your help.
Cheers!