×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    41

    Unhappy [moved] Couldn't launch Serial connection plz help

    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);
                     }
    Last edited by mhmd_ward; 2008-06-19 at 02:35.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,671

    Re: Couldn't launch Serial connection plz help

    Quote Originally Posted by mhmd_ward View Post
    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 )
    The DKU-2 is not a serial cable, so I would have some doubts about RS-232
    If you search for USB in the Wiki, you will quickly find a document describing serial communication over the USB cable, but the article says it applies only to S60 3rd edition.

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    41

    Re: Couldn't launch Serial connection plz help

    hi wizard_hu_,
    thnx for your reply
    i have an rs232 cable that connected to the phone in the bottom
    ( the same port for the DKU-2 ) so i thing it will work

    but the question is not about the cable the question is why the COMM::0 is still in use after i had killed the faxmode process(3 times)
    have you any ideas?
    or anybody who faces problem like this ?

    thnx in advance

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,671

    Re: Couldn't launch Serial connection plz help

    As far as I know no S60 device uses the serial pins of the "pop-port". That can be a reason. Glassterm example usually works with the infra port of S60 1st and 2nd edition devices, however the 6630 has no infra.

  5. #5
    Registered User
    Join Date
    Mar 2008
    Posts
    41

    Re: Couldn't launch Serial connection plz help

    hi,
    i have read more than one thread in Newlc.com and more than one person achieved to open the serial port of the 6630 and use it by Glassterm adapting

    i'm also ran my program well on the emulator

    also in the phone until reaches the command icom.open(.....)
    which returns the KerrInUse

    so all i need to know if i'm succeeded to kill the faxmodem process proberly ( my code down there )?

    or is there another process that uses the COMM::0 port and i have to kill it?
    thnx in advance

    by the way here is alink of thread about that subject:
    http://www.newlc.com/topic-6353

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,671

    Re: Couldn't launch Serial connection plz help

    I still do not think that the 6630 would support an RS-232 cable, they are using a DKU-2 USB cable in the referred thread.
    Serial communication over USB is also described in the Wiki (just search for USB), though I did not know that it works on 2nd edition devices.

  7. #7
    Registered User
    Join Date
    Mar 2008
    Posts
    41

    Unhappy Re: [moved] Couldn't launch Serial connection plz help

    hi all
    ok wizard_hu_ if so why there is aglass term example in the s60
    2nd edition fp2 (v8) that describes how to connect to the comm server and loads the ECUART module and EUART1 PDD ?

    also i mentiond that my program runs sucessfully on the emulator and i could read and write to the serial port of the computer but in the device when tryimg to open the COMM :: 0 it returns KerrInUse ? it driving me crazy


    please please if any one has suggestion send it fast cause if these method donot work i will have alot to learn about the USB
    thnx to everybody
    bye and waiting?
    Last edited by mhmd_ward; 2008-06-19 at 21:31.

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,671

    Re: [moved] Couldn't launch Serial connection plz help

    Remember that the SDK-s are not model-specific. Glassterm example also supports IrDA, and that actually works on S60 2nd edition having infra port. The 6630 is just not amongst them. Also note that 'Examples' are originating from Symbian, so they are absolutely not guaranteed to run (in fact some of them does not run/function at all, and none of them has .pkg file for example). 'S[eries]60Ex' contains the stuff coming from Nokia, and those examples usually work.
    The emulator is not device specific neither. Just try clicking on an icon/listbox item in the emulator with your mouse. Then try repeating it on the 6630.

    In case of the 6630, bluetooth can be the other option than USB. Personally I do not know if the USB-code really works, bluetooth does.

  9. #9
    Registered User
    Join Date
    Mar 2008
    Posts
    41

    Unhappy Re: [moved] Couldn't launch Serial connection plz help

    hi wizard_hu_

    thank u very much for your reply although u had disappointed me

    but also i need to know why when opening the COMM:: 0 on the mobile returns to me KerrInUse although i had killed the faxmodem????????
    So all i need to know how to kill the fax modem process FOREVER
    and it couldnot be loaded until rebooting
    please help

    thnx in advance
    Last edited by mhmd_ward; 2008-06-20 at 01:15.

  10. #10
    Super Contributor
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721

    Re: [moved] Couldn't launch Serial connection plz help

    Quote Originally Posted by mhmd_ward View Post
    hi wizard_hu_

    thank u very much for your reply although u had disappointed me

    but also i need to know why when opening the COMM:: 0 on the mobile returns to me KerrInUse although i had killed the faxmodem????????
    So all i need to know how to kill the fax modem process FOREVER
    and it couldnot be loaded until rebooting
    please help

    thnx in advance
    KErrInUse means the the port is in used while the USB is connected to the PC.

    So you should do like wizard_hu said, try to connect the PC with Infra, or Bluetooth, but not USB any more.
    Symbian && Android && iPhoneOS

Similar Threads

  1. PPC Bluetooth to Nokia phone serial connection
    By naahtec in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2007-07-27, 20:40
  2. bluetooth serial connection 2865i
    By mtmchn in forum Bluetooth Technology
    Replies: 0
    Last Post: 2007-07-20, 06:13
  3. Replies: 5
    Last Post: 2006-03-15, 14:49
  4. Problem with Serial port connection using Nokia6600 Bluetooth
    By mandykahlon in forum General Development Questions
    Replies: 1
    Last Post: 2005-05-31, 11:42
  5. Nokia 6600 connection with pc via serial port
    By tobi12 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2003-12-22, 14:55

Posting Permissions

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