×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    5

    Question Test certificates and network connections...

    I am now starting to play with j2me stuff on my Nokia N90. I was intending to use C++, but want the app to work on a Samsung D600 as well. Simply using Connector.open("socket://here.ya.go:111").

    I've looked through these forums and seems alot of people are limited when it comes to making socket connections from their MIDlets. If the MIDlet is not signed, and not installed from a valid JAD file, then there's no luck whatsoever come time to make a socket connection.

    I am using Netbeans IDE 4.1 at the moment to create the small test MIDlet and it has signing capabilities. So I used those to add the cert info to the JAD, etc.

    Whenever I install on the N90 it just moans about being "Unable to verify certificate" and kills the app install. So to get the socket connection part of this, on a small personal-use MIDlet, do I need to go and flood the bank accounts of Verisign just to have socket or any other connections in a test setup?

    Is there a way to have a test certificate (self signed thing) or not?
    if (so)
    {
    how("?");
    }
    else
    {
    why("not?");
    }

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Test certificates and network connections...

    If you sign your midlet, the corresponding certificate should on the phone. If it is not, the midlet is not installed. So first step is: remove the signing info.

    In general, socket connections should be available for unsigned midlets too. However some carriers/operators limit the capabilities in the branded phones, so in case you have such phone, you might be out of luck. If you have a generic Nokia phone, that should not be a problem. Of course,by default, you will be prompted every time you open a socket connection.

    There are also some port specific limitiations in socket connections for unsigned midlets (mainly 80 and 443), but as you are using 111, that should not cause problems to you.

    Hartti

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    5

    Re: Test certificates and network connections...

    I'll remove the signing information from the JAD, is that correct?

    It does ask if I want to allow data network access, but beyond that it does nothing. The N90 I have is not branded. It has 2 access points, "Internet" and "Internet.GPRS", and these are supplied by my service provider.

    I have also tried the port 80 HTTP connection, but no access point is fired up. Several other java-based applications I have installed don't have any luck doing the same thing. Then again, others do so I just don't get it.

    I'll remove that info and see what happens.

  4. #4
    Registered User
    Join Date
    Nov 2006
    Posts
    5

    Re: Test certificates and network connections...

    Nope, nothing. GPRS connection doesn't start up on socket or http. I'm just using Connector.open call. What magical wonderful code do other unsigned apps use to get one of the access points to start up?

    Do these security restrictions apply when using C++ apps?

  5. #5
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Test certificates and network connections...

    Check what network access rights are set for your midlet. Go to Application Manager and check Suite Settings (I might remember this incorrectly, but it should be something along those lines).

    C++ apps do not use the Java security domain thinking. On 3rd edition devices the platform security affects what the Symbian apps can do, but your phone is not 3rd edition phone.

    Hartti

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    When other MIDlets have the same issue, I think your phone is not setup correctly. And before you answer: WAP and internal browser work, please, please have an additional search on this board.

    And forget about siging. You do not need that for the start.

  7. #7
    Registered User
    Join Date
    Nov 2006
    Posts
    5

    Re: Test certificates and network connections...

    All good and well, but what is one looking for in terms of the phone not being setup correctly?

    hartti, I have set connectivity to always and networking to always ask, but still nothing happens. What I am going to do right now, is to a reset to factory settings.

  8. #8
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Test certificates and network connections...

    Stupid question: Do you have a data plan in your SIM card? Are you able to browse the net?

    Hartti

  9. #9
    Registered User
    Join Date
    Nov 2006
    Posts
    5

    Re: Test certificates and network connections...

    Yes. Picks up GPRS or 3G depending on the location. Got apps that connect up fine, and others that don't even need to pick a AP to do so. Then there are MIDP apps that just don't connect.

    So I downloaded carbide.c++ last night and the S60 2nd FP3 SDK to rather do this stuff from my favourite language. WTF? It's near impossible to figure out what's what in symbian c++!!! Did they do this in order to sell the books?

  10. #10
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    63

    Re: Test certificates and network connections...

    yea, and they made the phones in order to sell symbian :d

    Seems strange why other midlets can use http/sockets and you can't; it must be something with your code ( or you're just damn unlucky and try to access some restricted ports, etc...).
    Some ideas:
    -try to built a very basic test application (http, socket, whatever).
    -make sure it works in the emulator.
    -try different ports ( and high ones > 1024 )
    -try different phones
    -if you have the jar/jad of the apps with "magical wonderful code", run the apps in an emulator that has a network monitor (e.g., sun WTK) and see what type of connections/what ports they're using; then try a similar approach in your code
    Last edited by ionutianasi; 2006-11-03 at 18:02.

Similar Threads

  1. Replies: 0
    Last Post: 2006-09-06, 16:26
  2. How to allow certificates permanently(Nokia 6600)
    By tskankaa in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2004-01-08, 08:30

Posting Permissions

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