×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    2

    Download failed for MMS file

    Hi guys/gals.

    We have been experiencing some problems when clients are downloading .mms files of our servers. I'm not sure if te problem is on the client's side or on ours. The .mms files are produced using Nokia's MMS Java Library 1.1

    Basically we produce mms content and publish it on our servers. After placing it on ourservers, we then send a MMS notification push to the intended recipient with the URL to the mms file. The URL are something like this:

    Code:
    http://myserver.com/mms/mmsgateway?mmsid=123456778
    Where 123456778 represents a unique id for each mms.

    mmsgateway is basically a cgi script. What it does is is something like:

    Code:
    print "Content-type: application/vnd.wap.mms-message"
    print
    print data
    Where data is the raw binary data which is read from the specified .mms file.

    When the mobile receives the MMS notification, it will then make a GET request to mmsgateway and we will just spill out the file to the client. Now, some of the handsets that we tried with keeps on getting "Download failed" or "Interrupted Errors" errors, although they clearly GET the file of the server. These clients were (from the HTTP_USER_AGENT):

    Nokia3220/2.0 (03.30) Profile/MIDP-2.0 Configuration/CLDC-1.1
    A1000 - MMS./A1000./1.0

    But we also had success with the following clients:

    Nokia6680/1.0 (3.04.37) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1
    SonyEricssonP900/R102 Profile/MIDP-2.0 Configuration/CLDC-1.0 Rev/MR4 UP.Link/1.1

    I have a feeling that we are not returning a correct response to the client, hence they are getting the errors, but the fact there were other clients that doesn't have the problem is leaving us stumped.

    Anyone with any ideas what else should I try out?

    Thanks in advance

  2. #2
    Registered User
    Join Date
    Feb 2006
    Posts
    2

    Re: Download failed for MMS file

    Hi,

    i've figured out the problem to this issue, so i am posting an update.

    the generated .mms files was not correctly encoded, and it was the cause of all the failed downloads by most of the mobiles. the mobile type that was able to download and view the mms files were basically broken i guess. (actually this made the problem harder to solve)

    using the Nokia MMSLibrary, i encoded the files with the Message-Type header of MESSAGE_TYPE_M_SEND_REQ (following the examples in the docs). If I understand correctly, this is actually a message type that you use when you are submitting a mms file to the MMSC for delivery. Following the specs in WAP-209-MMSEncapsulation-20020105-a for a message that is supposed to be picked up by the client from the MMSC, the Message-Type header must be of M-RETRIEVE-CONF

    Unfortunately MMSLibrary does not define M-RETRIEVE-CONF type so I had to do a small hack of the library. It is actually a trivial one, so I will not post the changes here, just the details of the changes.

    In IMMConstats.java:

    Added the defination byte

    Code:
    static final byte MESSAGE_TYPE_M_RETRIEVE_CONF =(byte)0x84;
    And in MMEncoder.java I added MESSAGE_TYPE_M_RETRIEVE_CONF in the switch case statement being called between MESSAGE_TYPE_M_SEND_REQ and MESSAGE_TYPE_M_DELIVERY_IND. If I did not do this, the encoder will give out an exception during encoding because it does not recognise the message type. From what I understand a MESSAGE_TYPE_M_RETRIEVE_CONF and a MESSAGE_TYPE_M_SEND_REQ message is not different, only the byte for the Messaget-Type header is. So I just copy and pasted the code for MESSAGE_TYPE_M_SEND_REQ and used them for MESSAGE_TYPE_M_RETRIEVE_CONF case in the switch statement.

    All the mobile that could not download and view the mms files were able to do so after this fix.

    HTH

Similar Threads

  1. i made a WML Data but i can not Download a jar File!
    By mehiii in forum Mobile Java General
    Replies: 6
    Last Post: 2005-09-10, 22:30
  2. How to reformat the file?
    By ryanfunghk in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-03-26, 17:43
  3. .3gp file download problem
    By anoopd in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2005-02-25, 05:53
  4. How do I download dm file from web server?
    By daniel418 in forum Digital Rights Management & Content Downloading
    Replies: 2
    Last Post: 2004-11-26, 09:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •