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.

Will It Work.........

If you have a question or need help, this is the place to be.
shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Will It Work.........

Post by shaggy79 »

Hi all,
I have been trying for a while now to get my PC to know if my phone (iPhone 5S) is "Present or Away".

My Goal:-

Phone is 'Present' perform action (A).
Phone is 'Away' perform action (B).

Seems simple enough, but everything I've tried "PING" "NMS" & "NMAP" ( still trying NMAP) seems to give me random readings.
When my phone is locked I get an 'Away' Response!
So my question.....
Would EG know if my phone is connected to a Bluetooth dongle plugged into my PC?
If so what would be the best Bluetooth 4.0 dongle to achieve this?

Cheers Paul.
shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Will It Work.........

Post by shaggy79 »

Anyone :?:
shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Will It Work.........

Post by shaggy79 »

No One........ :?: :!:
Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Will It Work.........

Post by Dragon470 »

For wifi:
One addition to any of the ping, nms, nmap would be if you forced a static ip, and only gave it a lease time of 1 min on the router. This would however dramatically increase battery usage on you phone as it would always be using the wifi to get a new ip address and never really shut-off. I tried this years ago and abandoned it because of the battery usage. I also had to set my device to never allow power save.

For the Bluetooth:
On any of my Bluetooth devices, as soon as power is in save mode I lose connection and it has to auto repair ( I don't use Bluetooth on my phone, so that situation may not apply). This may be a better option as it might still keep a connection if the phone is locked, just like most hands-free ear pieces.

As far as eg knowing if it has the connection to the phone via Bluetooth, I get nothing but all that needs to be changed is to add another handle in the system plugin. The file DeviceChangeNotifier.py I have never used my phone with my computer. I will enable it and do some modifying to the plugin to see if it works.


Edit: A quick change has been done and the modified file is available below. I however can not test it as it does require Bluetooth 4.0 for proximity detect. Mine does not have 4.0. So you can see if this works or not.

This may not be the right classguid to use either. So I offer no real testing until I can get a hold of a 4.0 device. I will look to see if anything else I have is 4.0.
Attachments
DeviceChangeNotifier.py
Modified to check for Bluetooth devices (newer GUID number)
(5.55 KiB) Downloaded 171 times
DeviceChangeNotifier.py
Modified to check for Bluetooth devices (older GUID number)
(5.55 KiB) Downloaded 147 times
Last edited by Dragon470 on Sun Aug 03, 2014 12:01 pm, edited 1 time in total.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Will It Work.........

Post by krambriw »

I do receive events in EG when my iPhone connects/disconnects to the computer via BT.

Code: Select all

08:15:53   System.DeviceAttached [u'\\\\?\\HID#{84a1e9b8-12ba-4a9c-8ab0-a43784e0d149}_LOCALMFG&0000#9&2b6febc9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}']

08:25:15   System.DeviceRemoved [u'\\\\?\\HID#{84a1e9b8-12ba-4a9c-8ab0-a43784e0d149}_LOCALMFG&0000#9&2b6febc9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}']
But the problem is that I can't get the phone to automatically connect to the computer when I get inside the range, I have to do it manually from the phone or the computer.

Once connected, it seems it stays that way even if I force the screen off (if this stays permanently connected or not would require a longer test period)

This is however with Windows 7, a standard BT in the laptop and an iPhone 4 and it might be that iPhone 5S and BT 4.0 has more features that makes the 'proximity' a useful feature.
shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Will It Work.........

Post by shaggy79 »

Thanks for the replies,
Dragon470 & krambriw

I am still waiting to receive my Bluetooth 4.0 dongle. :x
As soon as it arrives I will be able to test it and see what it can do. :P (I'm hopeing it has the proximity feature). :?:
I'm also still learning so might need some guidance on what and how to do. :oops:

Cheers again
Paul.
shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Will It Work.........

Post by shaggy79 »

:evil: Still waiting for dongle to arrive, opened a dispute via ebay :roll:

Could someone suggest a decent Dongle to buy for the best chance of it working to my needs :?:
shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Will It Work.........

Post by shaggy79 »

Right Guys & Girls......

My "Bluetooth Dongle" finally arrived. :roll:

http://www.ebay.co.uk/itm/USB-2-0-Bluet ... 5afc8f401f

It came with no drivers :x And after about 6 hours of trying :evil: I can't get it to work with my phone at all?! :cry:
So I have given up on this dongle :!:

If anyone could point me in the direction of a "decent budget" Bluetooth dongle I would be forever in your debt. :P
It must be compatible with :-

* Windows 7 32bit.
* iPhone 5S
* Bluetooth 4.0
* location detection? (Smart Bluetooth 'BLE' I think it's called).
:?:

Cheers Paul.
shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Will It Work.........

Post by shaggy79 »

Dragon470,

What do I do with the file I downloaded?
I put it in a folder in EG plugins but cant seem to find it in EG?
Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Will It Work.........

Post by Dragon470 »

It needs to replace the exact file in the eventghost\plugins\system folder. Then you can try connecting the Bluetooth device and see if it shows up in the event log. I have also been reading up on this and it appears this will only work if the device only registers as a Bluetooth device. Most will register as HID devices. As I noticed that is what happened to krambriw. I have also found out that it is a different GUID that is needed, so I have updated the file in my previous post.
shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Will It Work.........

Post by shaggy79 »

Dragon470,

I have tried with both files, but none seem to work. :?:
I have also ordered a new BT dongle as the one I have is not very good at all. :!:

Old Dongle :-
http://www.ebay.co.uk/itm/USB-2-0-Bluet ... 5afc8f401f

New Dongle :-
http://www.ebay.co.uk/itm/Asus-USB-BT40 ... 1319825874

My new dongle should be here by Tues / Wed, I hope :P
so I will try again then.

Cheers Paul.
shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Will It Work.........

Post by shaggy79 »

:D I got my new dongle today and it works.... well
sort of, It locks my PC when I go to far away. But it won't un-lock it :cry: :?:
but all-in-all I'm impressed :P
shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Will It Work.........

Post by shaggy79 »

krambriw wrote:I do receive events in EG when my iPhone connects/disconnects to the computer via BT.

Code: Select all

08:15:53   System.DeviceAttached [u'\\\\?\\HID#{84a1e9b8-12ba-4a9c-8ab0-a43784e0d149}_LOCALMFG&0000#9&2b6febc9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}']

08:25:15   System.DeviceRemoved [u'\\\\?\\HID#{84a1e9b8-12ba-4a9c-8ab0-a43784e0d149}_LOCALMFG&0000#9&2b6febc9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}']
But the problem is that I can't get the phone to automatically connect to the computer when I get inside the range, I have to do it manually from the phone or the computer.

Once connected, it seems it stays that way even if I force the screen off (if this stays permanently connected or not would require a longer test period)

This is however with Windows 7, a standard BT in the laptop and an iPhone 4 and it might be that iPhone 5S and BT 4.0 has more features that makes the 'proximity' a useful feature.

Hi Krambriw,

I got my new dongle installed & working but I've got a little issue.....
When I connect my iPhone it gives me in EG:- DeviceAttached.{84a1e9b8-12ba-4a}
same when I disconnect:- DeviceRemoved.{84a1e9b8-12ba-4a}
This is what I want to happen, but when I connect my iPad EG gives me the same response :?:
is there a way to change DeviceAttached.{84a1e9b8-12ba-4a} to a specific item like iPhone or iPad :?:
shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Will It Work.........

Post by shaggy79 »

Hi all,
A Quick update :-

I have tried everything to get this to work, :shock: but for all my trying I just can't get it to do what I want :x ...
I have got it to lock my PC via Proximity (Bluetooth) but no matter what I do it won't UN-lock it! :?:

I have tried with:-

BTProximity (http://www.daveamenta.com/2010-03/btpro ... -in-range/)
BtProx (http://sourceforge.net/projects/btprox/files/)
And with my Bluetooth software that came with my dongle.

With all of them I get the same outcome,
Locks as it should
Does NOT un-lock
Very frustrated.. :twisted:
Paul.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Will It Work.........

Post by krambriw »

Hi Paul,
I think it is a security reason, nothing wrong with your attempts. I have seen on the net that there are some sw to download that is said to lock/unlock on BT proximity but the same result for me, it only locked but no unlock.

If you think about it, even though it doesn't fit your application very well, for security reason it is a wise behavior.

BestR
Post Reply