hi all
i am using a Nokia 6630 and wishes to launch aserial connection Using Symbian C++ through the DKU-2 cable ( The other end is a RS232 )
i adapted the glassterm in the SDK.
i also read some threads about the Faxmodem process that blockes the serial port and solved it by killing its process 3 times
but i still couldnot launch the serial connection ALTHOUGH i succeded to launch the connection in the EMULATOR
but when putting it on the phone when trying to:
icomm.Open(icommserv,Kportname , ECommExclusive, ECommRoleDTE);
it returns -14 KErrInUse
i donot know why??
please any suggestion
by the way my code is :
Code:TBuf8<50> buf; TFullName repName; _LIT8(KFAXMODEM, "FaxModem" ); TFindProcess process; for(TInt i = 0; i < 1000; i++) { while(process.Next(repName) != KErrNotFound) { buf.Copy(repName); if ( (buf.Find(KFAXMODEM) != KErrNotFound) ) { EchoL(KMess2); RProcess aProcess; aProcess.Open(process); aProcess.Kill(0); aProcess.Close(); } } } _LIT(KLddName, "ECOMM"); _LIT(KPddName, "EUART1"); _LIT(Kmodulename, "ECUART"); _LIT(Kportname, "COMM::0"); _LIT(Kerrorldd,"error ldd"); _LIT(Kerrorpdd,"error pdd"); _LIT(Kerrorcommserv,"error commserv"); _LIT(Kerrorcommmodule,"error commmodule"); _LIT(Kerrorloadmodule,"error loadmodule"); TInt r1; r1=User::LoadLogicalDevice(KLddName); if (r1 != KErrNone) EchoL(Kerrorldd); r1=User::LoadPhysicalDevice(KPddName); if (r1 != KErrNone) EchoL(Kerrorpdd); StartC32 (); RCommServ icommserv; TInt s; TInt r; s=icommserv.Connect(); if (s != KErrNone) EchoL(Kerrorcommserv); s=icommserv.LoadCommModule(Kmodulename); if (s != KErrNone) { EchoL(Kerrorcommmodule); } RComm icomm; r = icomm.Open(icommserv,Kportname ,ECommExclusive,ECommRoleDTE); // here it returnes KerrInUse if (r != KErrNone) { EchoL(Kerrorloadmodule); }

Reply With Quote


