×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    23

    RComm::SetConfig on 6600 woes...

    Why does SetConfig always return -14 (KErrInUse) on my 6600 (7.0s) device. But works fine on my 3650/7650 (6.1) device.

    Here's a snippet of my code:

    RCommServ server;
    User::LeaveIfError( server.Connect() );

    _LIT( KCsyName, "dataport" );
    TInt r = server.LoadCommModule( KCsyName );
    if ((KErrNone != r) && (KErrAlreadyExists != r))
    {
    User::Leave( r );
    }

    RComm commPort;
    r = commPort.Open( server, _L("DATAPORT::0"), ECommShared );
    if ((KErrNone != r) && (KErrAlreadyExists != r))
    {
    User::Leave( r );
    }

    TCommConfig portSettings;
    commPort.Config( portSettings );

    portSettings().iRate = EBps19200;
    portSettings().iParity = EParityNone;
    portSettings().iDataBits = EData8;
    portSettings().iStopBits = EStop1;
    portSettings().iFifo = EFifoEnable;
    portSettings().iHandshake = (KConfigObeyXoff | KConfigSendXoff);
    portSettings().iTerminator[0] = 10;
    portSettings().iTerminatorCount = 1;

    r = commPort.SetConfig( portSettings );

    User::LeaveIfError( r ); // ALWAYS returns -14 (KErrInUse)

  2. #2
    Registered User
    Join Date
    Jul 2003
    Posts
    23
    anyone?

  3. #3
    Super Contributor
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721
    tested your code, it works on my 6600

Posting Permissions

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