Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Plugin: Serial Port - How are com ports found?

If you have a question or need help, this is the place to be.
Post Reply
vicx
Posts: 13
Joined: Sun Sep 06, 2009 11:34 am

Plugin: Serial Port - How are com ports found?

Post by vicx »

I am trying to replace a serial cable using a Bluetooth SPP connection. I have what I want almost working but at the moment EG doesn't list my new Bluetooth connections as serial ports in the plugin.

I am posting this up just before I go to bed, so I don't forget what I've found.

I'll try this to see if I can make virtual copies of the com ports that are found.
http://com0com.sourceforge.net/

This has some information on finding com ports.
http://stackoverflow.com/questions/1388 ... s-in-win32

I took a minute to find them in the registry in case the names were throwing the code off.

Win7
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM
\Device\BthModem1
\Device\BthModem2
\Device\Serial0

I had a cursory look at the python modules for enumerating com ports but once it went from python to win32 I couldn't follow the code.

Thanks for taking the time to read this.
vicx
Posts: 13
Joined: Sun Sep 06, 2009 11:34 am

Re: Plugin: Serial Port - How are com ports found?

Post by vicx »

OK I have spent a little bit of time today reading stuff about serial enumeration; way out of my depth but I have found a solution online that helped me fix my problem.

This thread was most helpful because it deals directly with my issue of bluetooth serial connections not being enumerated as com ports.
http://code.google.com/p/qextserialport ... tail?id=20

I am not a programmer so I don't know if this is a bad way to go but I made this change in \EventGhost\eg\WinApi\SerialPortScan.py and now my bluetooth serial ports show up in the Serial Port plugin.

Code: Select all

#New GUID aka GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR
GUID_CLASS_COMPORT = GUID(0x4D36E978, 0xE325, 0x11CE, 
	(ctypes.c_ubyte*8)(0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18 ))

#OLD GUID
#GUID_CLASS_COMPORT = GUID(0x86e0d1e0L, 0x8089, 0x11d0,
#    (ctypes.c_ubyte*8)(0x9c, 0xe4, 0x08, 0x00, 0x3e, 0x30, 0x1f, 0x73))

I know I should make a subclass or something but I am not yet a coder. I leave this here for future reference. Someone else may also need to connect bluetooth com ports in a hurry.
Post Reply