Results 1 to 4 of 4

Thread: QextSerialEnumerator can not get modem port

  1. #1
    Join Date
    Jul 2010
    Posts
    15
    Qt products
    Qt4
    Platforms
    Windows

    Default QextSerialEnumerator can not get modem port

    Hi all,

    I am using Qt4 to write a software to control the Huawei modem. In device manager, I can see the Modem under Modems tab. When I use teraterm, I can open the modem port (in my computer it is COM7) and send AT command to the modem (work OK).

    But when I use QextSerialEnumerator to get the port list, I can not have COM7. QextSerialEnumerator can only list the ports under Ports(COM & LPT) tab.

    How can I get the comport in the Modem tab to open the modem in my software?

    I greatly appreciate any help

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QextSerialEnumerator can not get modem port

    Did you try to ignore QextSerialEnumerator and open COM7 yourself?

  3. #3
    Join Date
    Jul 2010
    Posts
    15
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QextSerialEnumerator can not get modem port

    Hi fatjuicymole,

    Thank you very much for your soon reply.

    Yes, if I just ignore the QextEnumerator and open COM 7, Qextserialport works OK. But when the user install the modem driver to another computer, the modem will take another COMPORT. I need to auto-detect the port that the modem using.

    The modem GUID is: 4d32e96d-e325-11ce-bfc1-08002be10318. I tried to modify the GUID_CLASS_COMPORT in qextserialenumerator.cpp, but after recompile the dll, I can not get any port in my enumerator program. I am using the enumerator example.

    The funny thing is: in my computer, I have 2 other virtual comports. Their GUID is 4d32e978-e325-11ce-bfc1-08002be10318. But after change the GUID to

    DEFINE_GUID(GUID_CLASS_COMPORT, 0x4d32e978, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00,0x2b, 0xe1, 0x03, 0x18)
    0r
    DEFINE_GUID(GUID_CLASS_COMPORT, 0x4d32e978L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00,0x2b, 0xe1, 0x03, 0x18)

    I can not get the 2 virtual COMPORTs, either.

    I can get these ports with the default GUID in the QextEnumerator.cpp

  4. #4
    Join Date
    Jul 2010
    Posts
    15
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QextSerialEnumerator can not get modem port

    OK! After some hair-loss I solved my problem

    It turn out that the GUID should be the device interface guid value, not the class guid value.
    After changing the GUID to 2c7089aa-2e0e-11d1-b114-00c04fc2aae4, it worked.

    By the way, is there any way to use the Class GUID value instead? Because the Class GUID of the COMPORT and Modem are the same, so I can enumerate all the ports and modem in oen function.
    But when I use the Class GUID and change the flag in SetupDiGetClassDevs (in setupAPIScan function) to DIGCF_PRESENT, the Qextenumerator does not work, either.

Similar Threads

  1. Replies: 2
    Last Post: 16th June 2010, 23:28
  2. QextSerialPort, QextSerialEnumerator, VS2008 issue
    By lasher in forum Qt Programming
    Replies: 3
    Last Post: 18th January 2010, 12:06
  3. QextSerialPort and modem
    By kaszewczyk in forum Newbie
    Replies: 12
    Last Post: 7th November 2009, 17:05
  4. Qt Extended 4.4.3 port to at91sam9261 with modem
    By bitterguo in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 3rd June 2009, 03:29
  5. Replies: 4
    Last Post: 30th January 2008, 10:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.