×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    9

    Nokia 9500 and Bluetooth

    Hi !
    I've done a midlet that read GPS-data from a Nokia LD-1W , The midlet works great on my 6600, but not on the 9500.

    This is part of the code :
    StreamConnection con = (StreamConnection)Connector.open(btService.getServiceURL());
    InputStream is = con.openInputStream();
    byte[] chars = new byte[1000];
    int len = is.read(chars);

    The first time the code is executed, the length of data fetced is 300+ bytes, but on all subsequent fetches the length is 1 or 2.

    And after a while I get a dump saying
    Program jes-147-java-comms@1453.de
    Reason code: E32USER-CBase
    Reason number: 40

    Any help would be very much appreciated.

    /Lasse

  2. #2
    Registered User
    Join Date
    Jan 2006
    Posts
    7

    Re: Nokia 9500 and Bluetooth

    Hi lahvenai
    I am sorry i have no answer for you. I have bought the same GPS reciver two weeks ago. Now I try for three days to get a connection to between mobil and gps via bluetooth. In the deviceDiscovered-function i can read the name of the gps-receiver but thats all. I thougt there shoud be one (or more) services discoverd in the servicesDiscovered-function to get the URL and then connect to the gps with a InputStreamReader to read gps-data.
    Is this right? Could you please post some codesnipes how to do the connection and get the connection-URL?

    Thanks for reply
    Frank

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    9

    Re: Nokia 9500 and Bluetooth

    When you've located your device(s) you must start polling them for their services.
    An example of this :

    public void locateServices(RemoteDevice rdev) {
    try {
    int attr[] = { 0,1,2,3,4, 5,6,7,8,9,10,11 };
    UUID[] uuidset = new UUID[] {new UUID(256L)};
    if (rdev == null) {
    }
    LocalDevice ldev = LocalDevice.getLocalDevice();
    agent = ldev.getDiscoveryAgent();
    agent.searchServices(attr,uuidset,rdev,this);
    } catch (Exception e) {

    }
    }

  4. #4
    Registered User
    Join Date
    Jan 2006
    Posts
    7

    Re: Nokia 9500 and Bluetooth

    Thank you very much,
    this point me the right way.

    I have found an example reading GPS-Data maybe it help:
    http://www.hcilab.org/documents/tuto...GPS/BT_GPS.htm

    Frank

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

Posting Permissions

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