TODO 4.53 KB
Newer Older
Jan Wagemakers's avatar
Jan Wagemakers committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
Detecteren of iemand thuis is aan de hand van smartphone...

http://dotnet.work/2016/02/detecting-smartphone-via-bluetooth-on-linux-raspberry-pi-2/

root@thermoraspian:~# hcitool scan
Scanning ...
	20:16:11:29:83:04	hc01.com HC-05
	38:B1:DB:5B:B8:28	BRAVIA
root@thermoraspian:~# hcitool scan
Scanning ...
	38:B1:DB:5B:B8:28	BRAVIA
	20:16:11:29:83:04	hc01.com HC-05
root@thermoraspian:~# hcitool scan
Scanning ...
	38:B1:DB:5B:B8:28	BRAVIA
	20:16:11:29:83:04	hc01.com HC-05
root@thermoraspian:~# hcitool scan
Scanning ...
	CC:61:E5:D7:A3:3F	XT1572
	38:B1:DB:5B:B8:28	BRAVIA
	20:16:11:29:83:04	hc01.com HC-05
root@thermoraspian:~# hcitool info CC:61:E5:D7:A3:3F
Requesting information ...
	BD Address:  CC:61:E5:D7:A3:3F
	OUI Company: Motorola Mobility LLC, a Lenovo Company (CC-61-E5)
	Device Name: XT1572
	LMP Version: 4.1 (0x7) LMP Subversion: 0x25a
	Manufacturer: Qualcomm (29)
	Features page 0: 0xff 0xfe 0x8f 0xfe 0xd8 0x3f 0x5b 0x87
		<3-slot packets> <5-slot packets> <encryption> <slot offset>
		<timing accuracy> <role switch> <hold mode> <sniff mode>
		<RSSI> <channel quality> <SCO link> <HV2 packets>
		<HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
		<power control> <transparent SCO> <broadcast encrypt>
		<EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan>
		<interlaced iscan> <interlaced pscan> <inquiry with RSSI>
		<extended SCO> <AFH cap. slave> <AFH class. slave>
		<LE support> <3-slot EDR ACL> <5-slot EDR ACL>
		<sniff subrating> <pause encryption> <AFH cap. master>
		<AFH class. master> <EDR eSCO 2 Mbps> <extended inquiry>
		<LE and BR/EDR> <simple pairing> <encapsulated PDU>
		<non-flush flag> <LSTO> <inquiry TX power> <EPC>
		<extended features>
	Features page 1: 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	Features page 2: 0x45 0x03 0x00 0x00 0x00 0x00 0x00 0x00
root@thermoraspian:~# hcitool info CC:61:E5:D7:A3:3F
Requesting information ...
Can't create connection: Input/output error
root@thermoraspian:~#

51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
jan@thermoraspbian:~/NetBeansProjects/thermostat/dist $ hcitool info CC:61:E5:D7:A3:3F
Requesting information ...
Can't create connection: Operation not permitted
jan@thermoraspbian:~/NetBeansProjects/thermostat/dist $ ls `which hcitool`
/usr/bin/hcitool
jan@thermoraspbian:~/NetBeansProjects/thermostat/dist $ ls -la `which hcitool`
-rwxr-xr-x 1 root root 125132 Oct 20  2017 /usr/bin/hcitool
jan@thermoraspbian:~/NetBeansProjects/thermostat/dist $ su -
Password:
root@thermoraspbian:~# setcap 'cap_net_raw,cap_net_admin+eip' `which hcitool`
root@thermoraspbian:~# exit
logout
jan@thermoraspbian:~/NetBeansProjects/thermostat/dist $ hcitool info CC:61:E5:D7:A3:3F
Requesting information ...
	BD Address:  CC:61:E5:D7:A3:3F
	OUI Company: Motorola Mobility LLC, a Lenovo Company (CC-61-E5)
	Device Name: XT1572
	LMP Version: 4.1 (0x7) LMP Subversion: 0x25a
	Manufacturer: Qualcomm (29)
	Features page 0: 0xff 0xfe 0x8f 0xfe 0xd8 0x3f 0x5b 0x87
		<3-slot packets> <5-slot packets> <encryption> <slot offset>
		<timing accuracy> <role switch> <hold mode> <sniff mode>
		<RSSI> <channel quality> <SCO link> <HV2 packets>
		<HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
		<power control> <transparent SCO> <broadcast encrypt>
		<EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan>
		<interlaced iscan> <interlaced pscan> <inquiry with RSSI>
		<extended SCO> <AFH cap. slave> <AFH class. slave>
		<LE support> <3-slot EDR ACL> <5-slot EDR ACL>
		<sniff subrating> <pause encryption> <AFH cap. master>
		<AFH class. master> <EDR eSCO 2 Mbps> <extended inquiry>
		<LE and BR/EDR> <simple pairing> <encapsulated PDU>
		<non-flush flag> <LSTO> <inquiry TX power> <EPC>
		<extended features>
	Features page 1: 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	Features page 2: 0x45 0x03 0x00 0x00 0x00 0x00 0x00 0x00
jan@thermoraspbian:~/NetBeansProjects/thermostat/dist $ hcitool info CC:61:E5:D7:A3:3E
Requesting information ...
Can't create connection: Input/output error

Jan Wagemakers's avatar
Jan Wagemakers committed
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
-------------------

jan@thermoraspbian:~ l2ping -c 1 CC:61:E5:D7:A3:3F
Can't create socket: Operation not permitted
jan@thermoraspbian:~ $ which l2ping
/usr/bin/l2ping
jan@thermoraspbian:~ $ ls -la `which l2ping`
-rwxr-xr-x 1 root root 90524 Oct 20  2017 /usr/bin/l2ping
jan@thermoraspbian:~ $ su  -
Password:
root@thermoraspbian:~# chmod 4755 /usr/bin/l2ping
root@thermoraspbian:~# exit
logout
jan@thermoraspbian:~ $ l2ping -c 1 CC:61:E5:D7:A3:3F
Ping: CC:61:E5:D7:A3:3F from B8:27:EB:D5:08:9B (data size 44) ...
44 bytes from CC:61:E5:D7:A3:3F id 0 time 5.07ms
1 sent, 1 received, 0% loss
jan@thermoraspbian:~ $

-----------------------

wifi laptop probleem:

https://answers.launchpad.net/ubuntu/+question/239371