×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    90

    Issue with ports in 2nd edition

    Hi

    I am maintaining an application made in 2nd edition. The author of the application is not available.
    He has written the following code,
    iSerialListener.Open(iSerialListenerServer, _L("ACM::0"), ECommShared);
    for opening the listener port. He has also written code for killing the fax modem process. I dont understand that why cant we use any other ACM? That is ACM::1. Actually I think I am not clear about the concept of ACM. Kindly Help me. If I open ACM::1 , Do I need to kill the fax modem process even then?

    Kindly help me with the solution.

    Regards
    Monika Parvanda

  2. #2
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    90

    Re: Issue with ports in 2nd edition

    Quote Originally Posted by monika.parvanda View Post
    Hi

    I am maintaining an application made in 2nd edition. The author of the application is not available.
    He has written the following code,
    iSerialListener.Open(iSerialListenerServer, _L("ACM::0"), ECommShared);
    for opening the listener port. He has also written code for killing the fax modem process. I dont understand that why cant we use any other ACM? That is ACM::1. Actually I think I am not clear about the concept of ACM. Kindly Help me. If I open ACM::1 , Do I need to kill the fax modem process even then?

    Kindly help me with the solution.

    Regards
    Monika Parvanda
    Kindly help me guys!!!

  3. #3
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    90

    Re: Issue with ports in 2nd edition

    Quote Originally Posted by monika.parvanda View Post
    Kindly help me guys!!!
    PLease help friends!!!!!

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Issue with ports in 2nd edition

    The ACM::0 is reserved for fax/modem process and thats the reason why the previous coder would have first killed that process and then added the code to open his listener port.

    Check this link for details :-

    http://wiki.forum.nokia.com/index.ph...dition_devices

    http://discussion.forum.nokia.com/fo...d.php?t=123321

    Also with earlier versions of Symbians there used to be a limitation on the number of ACM ports one could open precisely 1, I am not sure how it is now. Apart from that some of this information is not there in the public domain AFAIK, if you really need to know I guess the best way would be a partnering case with Nokia since Symbian has discontinued the plat partnership program it used to run earlier.

    Cheers,
    Mayank

  5. #5
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    90

    Re: Issue with ports in 2nd edition

    Quote Originally Posted by mayankkedia View Post
    The ACM::0 is reserved for fax/modem process and thats the reason why the previous coder would have first killed that process and then added the code to open his listener port.

    Check this link for details :-

    http://wiki.forum.nokia.com/index.ph...dition_devices

    http://discussion.forum.nokia.com/fo...d.php?t=123321

    Also with earlier versions of Symbians there used to be a limitation on the number of ACM ports one could open precisely 1, I am not sure how it is now. Apart from that some of this information is not there in the public domain AFAIK, if you really need to know I guess the best way would be a partnering case with Nokia since Symbian has discontinued the plat partnership program it used to run earlier.

    Cheers,
    Mayank
    Thanks for the reply.
    How can I check whether a port is currently open or not?
    And if Open How do i close it?
    Please reply.

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Issue with ports in 2nd edition

    You can try OpenWhenAvailable(is an async call and would complete with KErrNone if the port could be opened successfully), which would allow you to open the port the moment it becomes free i.e. is released by other process/app, and then using the SetAccessMode you can set the access mode, coz the earlier function would open the port in the same mode as the earlier session.

    To close an existing open port you can simply use Close. Also if you call Open on a port which is already opened you will get a system wide error code as KErrLocked.

    Cheers,
    Mayank

  7. #7
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    90

    Re: Issue with ports in 2nd edition

    Quote Originally Posted by mayankkedia View Post
    You can try OpenWhenAvailable(is an async call and would complete with KErrNone if the port could be opened successfully), which would allow you to open the port the moment it becomes free i.e. is released by other process/app, and then using the SetAccessMode you can set the access mode, coz the earlier function would open the port in the same mode as the earlier session.

    To close an existing open port you can simply use Close. Also if you call Open on a port which is already opened you will get a system wide error code as KErrLocked.

    Cheers,
    Mayank
    Thanks for the reply Mayank.

    As we know It is not possible to reconfigure the capabilities of ports using setconfig while they are being used. In particular, the comms server will panic any client that attempts to reconfigure a port when there are pending reads or writes.
    How do I check whether there are any pending reads or writes and what should I do then?
    This is what I am trying to do

    TInt r = iSerialListener.SetConfig (portSettings);
    while(r!=0)
    {
    tempbufErr.Num(r);
    msgfile.Write(_L8("\n\n !Error Returned While configuring ports "));
    msgfile.Write(tempbufErr);
    iSerialListener.Close();
    iSerialListener.Open(iSerialListenerServer, _L("ACM::0"), ECommShared);
    r = iSerialListener.SetConfig (portSettings);

    }
    But surprisingly I never get r other than zero. I have written the code as I think that the listener port is aquired by some source ,so it does not gets configured again and hence it does not returns the listener and my application does not works any more. It does not leaves but it is not able to listen to or write on the ports.

    Please help!

  8. #8
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Issue with ports in 2nd edition

    Slowly but surely you are pushing me onto thin ice here :-(

    How about trying ReadCancel and WriteCancel and handle the error code from these functions to ensure that the read/write queues are empty before re-trying a SetConfig?

    However what beats me is why did the SetConfig not return an error if at all there were pending read/writes..!

    Cheers,
    Mayank

Similar Threads

  1. Replies: 3
    Last Post: 2008-08-29, 10:21
  2. LookUp/RHostResolver Crash in 2nd Edition FP2
    By gmsk19 in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2008-06-04, 11:10
  3. Allowing numeric characters in text box using jsp - different in 2nd & 3rd edition ph
    By ddbhasin in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2007-10-24, 08:22
  4. Need help for S40 2nd edition development
    By iworktech_kiran in forum Mobile Java General
    Replies: 4
    Last Post: 2007-08-09, 14:06
  5. Where is SDK for S60 1st Edition?
    By MDWPPC in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2007-02-08, 07:04

Posting Permissions

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