Page 8 of 8

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Sun Jun 25, 2017 5:24 pm
by Snowbird
ok, I did what you said, now I have this :

Code: Select all

19:28:34            Exception in thread WMI Thread:
19:28:34            Traceback (most recent call last):
19:28:34              File "threading.pyc", line 801, in __bootstrap_inner
19:28:34              File "C:\ProgramData\EventGhost\plugins\System\Device\Notifier.py", line 1525, in run
19:28:34                self._current_devices(guid, device, **dev)
19:28:34              File "C:\ProgramData\EventGhost\plugins\System\Device\Notifier.py", line 1488, in _current_devices
19:28:34                class_guid = device.ClassGuid.upper()
19:28:34            AttributeError: 'NoneType' object has no attribute 'upper'
19:28:34            

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Sun Jun 25, 2017 5:35 pm
by Snowbird
kgschlosser wrote:yes there is. this is why I am having you test it out. But with BT there has to be a specific things I have to code into the plugin to look for as the devices get added removed in a different manner.. Now if you delete the pairing completely and then remake it does it then show a connection for the device?

because if it does then i will have to monitor BT devices for being enabled or not.
actually this does work ! But I first had to reinstall the version located in this post :
viewtopic.php?f=5&t=9588&start=75#p46704

When I pair or unpair the phone, not only I can see the phone itself but also the other BT services related to the phone as well, so this does work !!! :)

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Mon Jun 26, 2017 3:39 am
by kgschlosser
I know it works. Just gotta make all the tidbits work. And windows 10 is not making this very easy. I am wondering if it is acting like this possibly becsuse of administrative privileges. Try running EG as admin and see if it begins to work.

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Mon Jun 26, 2017 3:40 am
by kgschlosser
And copy and paste the events for the BT stuff for the phone. I want to see what it looks like.

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Mon Jun 26, 2017 7:54 am
by Snowbird
Ok, here's what happens when I pair my phone :

Code: Select all

09:38:59   System.Device.Attached.USBDevice.RAZR MAXX HD <dynamic-device 'USBDevice'>
09:38:59      Attached
09:38:59         Python Script
09:38:59            Name: RAZR MAXX HD, Description: Bluetooth Peripheral Device, Caption: RAZR MAXX HD, DeviceId: BTHENUM\DEV_B07994F7ABDF\8&A715F6&0&BLUETOOTHDEVICE_B07994F7ABDF, DeviceID: BTHENUM\DEV_B07994F7ABDF\8&A715F6&0&BLUETOOTHDEVICE_B07994F7ABDF, ClassGuid: None, PNPDeviceID: BTHENUM\DEV_B07994F7ABDF\8&A715F6&0&BLUETOOTHDEVICE_B07994F7ABDF, 


09:39:01   System.Device.Attached.USBDevice.Bluetooth Peripheral Device <dynamic-device 'USBDevice'>
09:39:01      Attached
09:39:01         Python Script
09:39:01            Name: Bluetooth Peripheral Device, Description: Bluetooth Peripheral Device, Caption: Bluetooth Peripheral Device, DeviceId: BTHENUM\{00001801-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001801-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001801-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:03   System.Device.Attached.USBDevice.Bluetooth Peripheral Device <dynamic-device 'USBDevice'>
09:39:03      Attached
09:39:03         Python Script
09:39:03            Name: Bluetooth Peripheral Device, Description: Bluetooth Peripheral Device, Caption: Bluetooth Peripheral Device, DeviceId: BTHENUM\{00001800-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001800-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001800-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:05   System.Device.Attached.USBDevice.Headset Gateway <dynamic-device 'USBDevice'>
09:39:05      Attached
09:39:05         Python Script
09:39:05            Name: Headset Gateway, Description: Headset Gateway, Caption: Headset Gateway, DeviceId: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.Handsfree Gateway <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: Handsfree Gateway, Description: Handsfree Gateway, Caption: Handsfree Gateway, DeviceId: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.MAP SMS <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: MAP SMS, Description: MAP SMS, Caption: MAP SMS, DeviceId: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.Headset Gateway <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: Headset Gateway, Description: Headset Gateway, Caption: Headset Gateway, DeviceId: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.OBEX File Transfer <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: OBEX File Transfer, Description: OBEX File Transfer, Caption: OBEX File Transfer, DeviceId: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.OBEX Object Push <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: OBEX Object Push, Description: OBEX Object Push, Caption: OBEX Object Push, DeviceId: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.OBEX Phonebook Access Server <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: OBEX Phonebook Access Server, Description: OBEX Phonebook Access Server, Caption: OBEX Phonebook Access Server, DeviceId: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:09   System.Device.Attached.USBDevice.Handsfree Gateway <dynamic-device 'USBDevice'>
09:39:09      Attached
09:39:09         Python Script
09:39:09            Name: Handsfree Gateway, Description: Handsfree Gateway, Caption: Handsfree Gateway, DeviceId: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:13   System.Device.Attached.USBDevice.AV Remote Control Target <dynamic-device 'USBDevice'>
09:39:13      Attached
09:39:13         Python Script
09:39:13            Name: AV Remote Control Target, Description: AV Remote Control Target, Caption: AV Remote Control Target, DeviceId: BTHENUM\{0000110C-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000110C-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000110C-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:15   System.Device.Attached.USBDevice.Advanced Audio <dynamic-device 'USBDevice'>
09:39:15      Attached
09:39:15         Python Script
09:39:15            Name: Advanced Audio, Description: Advanced Audio, Caption: Advanced Audio, DeviceId: BTHENUM\{0000110A-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000110A-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000110A-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000,


09:39:17   System.Device.Attached.USBDevice.Bluetooth Peripheral Device <dynamic-device 'USBDevice'>
09:39:17      Attached
09:39:17         Python Script
09:39:17            Name: Bluetooth Peripheral Device, Description: Bluetooth Peripheral Device, Caption: Bluetooth Peripheral Device, DeviceId: BTHENUM\{0000110E-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000110E-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000110E-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:19   System.Device.Attached.USBDevice.Android Network Access Point <dynamic-device 'USBDevice'>
09:39:19      Attached
09:39:19         Python Script
09:39:19            Name: Android Network Access Point, Description: Android Network Access Point, Caption: Android Network Access Point, DeviceId: BTHENUM\{00001116-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001116-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001116-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:21   System.Device.Attached.USBDevice.MAP SMS <dynamic-device 'USBDevice'>
09:39:21      Attached
09:39:21         Python Script
09:39:21            Name: MAP SMS, Description: MAP SMS, Caption: MAP SMS, DeviceId: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:25   System.Device.Attached.USBDevice.OBEX Phonebook Access Server <dynamic-device 'USBDevice'>
09:39:25      Attached
09:39:25         Python Script
09:39:25            Name: OBEX Phonebook Access Server, Description: OBEX Phonebook Access Server, Caption: OBEX Phonebook Access Server, DeviceId: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:29   System.Device.Attached.USBDevice.OBEX Object Push <dynamic-device 'USBDevice'>
09:39:29      Attached
09:39:29         Python Script
09:39:29            Name: OBEX Object Push, Description: OBEX Object Push, Caption: OBEX Object Push, DeviceId: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:33   System.Device.Attached.USBDevice.OBEX File Transfer <dynamic-device 'USBDevice'>
09:39:33      Attached
09:39:33         Python Script
09:39:33            Name: OBEX File Transfer, Description: OBEX File Transfer, Caption: OBEX File Transfer, DeviceId: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:37   System.Device.Attached.USBDevice.Bluetooth Peripheral Device <dynamic-device 'USBDevice'>
09:39:37      Attached
09:39:37         Python Script
09:39:37            Name: Bluetooth Peripheral Device, Description: Bluetooth Peripheral Device, Caption: Bluetooth Peripheral Device, DeviceId: BTHENUM\{00001101-0000-1000-8000-00805F9B34FB}_LOCALMFG&0000\8&20E5A5E0&0&000000000000_00000009, DeviceID: BTHENUM\{00001101-0000-1000-8000-00805F9B34FB}_LOCALMFG&0000\8&20E5A5E0&0&000000000000_00000009, ClassGuid: None, PNPDeviceID: BTHENUM\{00001101-0000-1000-8000-00805F9B34FB}_LOCALMFG&0000\8&20E5A5E0&0&000000000000_00000009,

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Mon Jun 26, 2017 7:58 am
by Snowbird
kgschlosser wrote:I know it works. Just gotta make all the tidbits work. And windows 10 is not making this very easy. I am wondering if it is acting like this possibly becsuse of administrative privileges. Try running EG as admin and see if it begins to work.
I still get this error when I start as admin :
09:57:11 Exception in thread WMI Thread:
09:57:11 Traceback (most recent call last):
09:57:11 File "threading.pyc", line 801, in __bootstrap_inner
09:57:11 File "C:\ProgramData\EventGhost\plugins\System\Device\Notifier.py", line 1525, in run
09:57:11 self._current_devices(guid, device, **dev)
09:57:11 File "C:\ProgramData\EventGhost\plugins\System\Device\Notifier.py", line 1488, in _current_devices
09:57:11 class_guid = device.ClassGuid.upper()
09:57:11 AttributeError: 'NoneType' object has no attribute 'upper'
09:57:11

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Mon Jun 26, 2017 5:22 pm
by kgschlosser
give this one a try

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Mon Jun 26, 2017 5:49 pm
by Snowbird
nice ! the error is gone ! :wink:

but what happened to these events ? they are not generated anymore ?
System.SessionUnlock
System.SessionLock

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Tue Jun 27, 2017 2:26 am
by kgschlosser
follow th initial instructions for running the plugin. I need that log.txt file after it has run for a minute or so.. you will see all kinds of stuff go flying by on the screen. I am not worried about the session locking and unlocking. this thing is not complete. I only set this version to give excessive logging information. and i need to see that information.

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Thu Sep 13, 2018 8:08 pm
by pralima87
Is this System-1.2.0.egplugin safe to use with RC4?

It looks like is working fine,
but I'm only getting the DeviceRemoved working 100%.

When my BT controller connects I only get the event the first time.
one the next connections I get no event.
System.Device.Attached.HIDDevice.HID-compliant game controller <dynamic-device 'HIDDevice'>

But when it disconnects it always trow the event:
System.Device.Removed [u'\\\\?\\HID#{00001124-0000-1000-8000-00805f9b34fb}_VID&0002054c_PID&09cc#8&553dc99&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}']

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Thu Sep 13, 2018 9:01 pm
by kgschlosser
The device removed is not working properly either. The event is not supposed to show up like that.

I am going to need to know a whole lot more information
When you say device "connected" are you referring to plugging in a blutooth dongle? Or are you referring to a device connecting to the Bluetooth??.. these are 2 completely different things. This plugin will generate events for plugging and unplugging devices from a computer. If it is a device connection over some kind of wireless signal it is not going to work properly. The issue with Bluetooth is that it is a serial port connection that is made when a device connects. Some devices have specific windows drivers but most do not. And unless windows sees a connected device as a device and not a comport it is not going to generate an event or it will generate one that is more of a generic

Also. As far as the blutooth dongle drivers go. Are you using the ones that came with windows or are you using the broadcom widcomm drivers?

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Thu Sep 13, 2018 10:16 pm
by pralima87
Or are you referring to a device connecting to the Bluetooth??
Yep I have a bluetooth dongle and need to detect the events when the controller connects to it ;)

Are you using the ones that came with windows or are you using the broadcom widcomm drivers?[/quote]
broadcom widcomm driver

Somehow I'm getting some proper events now:
System.DeviceAttached [u'\\\\?\\HID#{00001124-0000-1000-8000-00805f9b34fb}_VID&0002054c_PID&09cc#8&553dc99&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}']
System.DeviceRemoved [u'\\\\?\\HID#{00001124-0000-1000-8000-00805f9b34fb}_VID&0002054c_PID&09cc#8&553dc99&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}']

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Fri Sep 14, 2018 5:32 am
by kgschlosser
ok so you are looking for a device connecting to the bluetooth dongle.
The plugin is not designed to capture those. This is because not every bluetooth device adds a device to the device manager. It is one of those things i did plan on adding.

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Posted: Tue Oct 29, 2019 1:03 am
by kgschlosser
OK so I never liked how this plugin worked. I found it clunky and slow. So I started doing some research on the Windows API and I have found a better way!. The old system would take about 10 seconds to load all of the devices on a PC the new way takes less then 100 milliseconds. I am still in the research process and have done some programming. I want to see what kinds of things I am able to access using the Windows API instead of WMI