×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    31

    GPS - Bluetooth connection problem

    I am trying to make a Routing application using a GPS device.
    I prepared a BT connection engine using BT examples in SDK.

    I had used:

    User::LeaveIfError(iSocket.Open(iSocketServer, _L("RFCOMM")));
    iSocket.Connect(iDeviceAddress, iStatus);
    SetActive();

    as in the example (after discovering or using a saved address).

    After connection is established, I start to wait for incoming data.
    (I tried both READ and RECVONEORMORE)

    //iSocket.RecvOneOrMore(iRecvBuffer,0,iStatus,iMessageLength);
    iSocket.Read(iRecvBuffer,iStatus);
    SetActive();

    There seems no problem at first.
    Sometimes 10 minutes later, sometimes 3-4 hours later;
    Socket stops receiving data from GPS.
    * Engine seems ACTIVE(waiting to recv data)
    * No errors occurs in RUNL

    If I shutdown GPS device, "Connection Lost" message received.
    So there seems no problem in connection.

    If I disconnect from GPS and connect again,
    Socket start to receive data again but sometimes later,
    same problem occurs.
    So GPS seems OK.

    I tried 3 different GPS device and it doesnt matter.
    I had tested on 6630 and SX1.

    What should I do?

  2. #2
    Super Contributor
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721
    what have you done in RunL() after Recv?

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    31
    After PROCESSING DATA:

    iRecvBuffer.Zero();

    and then:

    iSocket.RecvOneOrMore( iRecvBuffer,0,iStatus ,iMessageLength );
    SetActive();.

Posting Permissions

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