Skip to content

Commit f4b4647

Browse files
committed
docs updated
1 parent 15342d3 commit f4b4647

File tree

4 files changed

+122
-8
lines changed

4 files changed

+122
-8
lines changed

components/ble/gap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ int bleGAPEevent(struct ble_gap_event *event, void *arg) {
172172
}
173173
break;
174174
case BLE_GAP_EVENT_REPEAT_PAIRING:
175+
//https://ubuntu.com/core/docs/bluez/reference/pairing/introduction
175176
/* We already have a bond with the peer, but it is attempting to
176177
* establish a new secure link. This app sacrifices security for
177178
* convenience: just throw away the old bond and accept the new link.

docs/BLE-Debugging.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# iOS
2+
- Unter iOS kann die App [LightBlue](https://punchthrough.com/lightblue/) verwendet werden. Zu beachten ist das Apple bei einigen Diensten nicht die rohen Daten an 3rd party Apps weitergeben [S. 197](https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf). Dadurch können manche Daten nicht gedebugged werden. Ein Service ist beispielsweise HID.
3+
- Eine weitere Möglichkeit für das Debugging für iOS ist mit einem Macbook auf dem XCode läuft. Dafür gibt es [PacketLogger](https://developer.apple.com/bluetooth/) womit Bluetooth-Pakete live gelogged werden können. Zusätzlich muss auf dem iOS-Gerät ein Logging-Profil heruntergeladen werden und installiert werden.
4+
5+
# Android
6+
- Unter Android können die Apps [LightBlue](https://punchthrough.com/lightblue/) und [nRF Connect](https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp&hl=en&gl=US) verwendet werden. Dort können mehr Daten / Dienste wie unter iOS ausgelesen werden.
7+
- In den Entwickleroptionen kann "Bluetooth HCI-Snoop-Protokoll aktiviert" werden und die Daten gelogged werden und später mittels Wirekshark ausgelesen werden.
8+
9+
# Linux
10+
- Tools: hcitool, gatttool, bluetoothctl, hidraw-dump, Bluepy
11+
12+
## hcitool
13+
14+
### Verfügbares Bluetoothgerät am Linuxrechner
15+
`hcitool dev`
16+
17+
### Scan for BLE-Devices
18+
`sudo hcitool lescan`
19+
20+
## gatttool
21+
22+
### Verbindung aufbauen
23+
1. `sudo gatttool [-t random] -b <BLE ADDRESS> -I`
24+
2. `connect`
25+
26+
### Liste aller vorhandenen Dienste aufzeigen
27+
`primary`
28+
29+
### Liste aller vorhandenen Handles
30+
Jeder Handle ist ein Verbindungspunkt, wo Daten gelesen oder geschrieben werden können.
31+
32+
`char-desc`
33+
34+
### Ein Handle auslesen
35+
`char-read-hnd <handle>`
36+
37+
### Schreiben eines Werts in ein Handle
38+
`char-write-req <handle> <data>`
39+
40+
## bluetoothctl
41+
`sudo bluetoothctl`
42+
43+
### Geräte suchen
44+
`scan le`
45+
46+
### Gerät verbinden
47+
`connect <BLE ADDRESS>`
48+
49+
### Info des Geräts
50+
`info`
51+
52+
### Menü wechseln, damit mit GATT gearbeitet werden kann
53+
`menu gatt`
54+
55+
#### Attributliste
56+
`list-attributes`
57+
58+
#### Attribut auslesen
59+
- `select-attribute <Pfad>`
60+
- `read`
61+
62+
## hidraw-dump
63+
64+
### Installation
65+
- `sudo apt-get install build-essential pkg-config libudev-dev`
66+
- `git clone https://github.com/todbot/hidraw-dump`
67+
- `cd hidraw-dump`
68+
- `make`
69+
70+
### Auslesen aller HID-Deskriptoren
71+
`sudo ./hidraw-dump`
72+
73+
### HID Deskriptor menschen lesbar machen
74+
Auf dieser [Website](https://eleccelerator.com/usbdescreqparser/) umwandeln.
75+
76+
## Bluepy
77+
78+
### Installation
79+
1. `sudo apt-get install bluetooth build-essential libglib2.0-dev libdbus-1-dev`
80+
2. `git clone https://github.com/IanHarvey/bluepy.git`
81+
3. `cd bluepy/bluepy`
82+
4. `make`
83+
84+
### Verwendung
85+
86+
#### Starten
87+
`./bluepy-helper`
88+
89+
#### Verbinden
90+
`conn <BT ADDRESS>`
91+
92+
#### Liste von Diensten
93+
`svcs`

docs/links

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/links.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Apple
2+
- [Connect Bluetooth Controller](https://support.apple.com/en-us/HT210414)
3+
- [About External Accessories](https://developer.apple.com/library/archive/featuredarticles/ExternalAccessoryPT/Introduction/Introduction.html)
4+
- [Working with Accessories](https://developer.apple.com/accessories/)
5+
- [Bluetooth](https://developer.apple.com/bluetooth/)
6+
- [Game Controller Framework](https://developer.apple.com/documentation/gamecontroller)
7+
- [Connecting Game Controllers via Bluetooth](https://kb.plugable.com/bluetooth-adapter/connecting-game-controllers-via-bluetooth)
8+
- [iOS: Xbox Series X-Controller mit iPhoone und iPad verbinden](https://amp.netzwelt.de/news/183500-ios-xbox-series-x-controller-iphone-ipad-verbinden.html)
9+
- [Kabellosen Xbox-Spielecontroller mit deinem Apple-Gerät verbinden](https://support.apple.com/de-de/HT211232)
10+
- [clarification for iOS compatibility note](https://github.com/lemmingDev/ESP32-BLE-Gamepad/issues/50#issuecomment-862770124)
11+
12+
# Linux
13+
## XBox Controller
14+
- [How to use Xbox One controllers over Bluetooth on Linux](https://www.addictivetips.com/ubuntu-linux-tips/xbox-one-controllers-over-bluetooth-linux/amp/)
15+
- [XBox ONE Wireless Controller über Bluetooth nutzen](https://wiki.ubuntuusers.de/Howto/XBox_ONE_Wireless_Controller_%C3%BCber_Bluetooth_nutzen/)
16+
- [Xbox (One) Wireless Controller won't connect](https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1750146)
17+
18+
## BLE
19+
- [How to Get Started with Bluetooth Low Energy on Linux](https://www.jaredwolff.com/get-started-with-bluetooth-low-energy/)
20+
- [Accesssing GATT Services](https://ubuntu.com/core/docs/bluez/reference/accessing-gatt-services)
21+
- [hidraw-dump](https://github.com/todbot/hidraw-dump)
22+
- [BLE on Linux with bluetoothclt](https://budimir.cc/2020/02/27/ble-on-linux-with-bluetoothctl/amp/)
23+
- [Communication with Bluetooth Low-Energy Devices on Linux](https://macchina.io/blog/internet-of-things/communication-with-low-energy-bluetooth-devices-on-linux/)
24+
- [Practical Guide to Bluetooth Hacking](https://blog.attify.com/the-practical-guide-to-hacking-bluetooth-low-energy/)
25+
26+
# Microsoft
27+
## XInput
28+
- [Xinput support](https://github.com/lemmingDev/ESP32-BLE-Gamepad/issues/137)

0 commit comments

Comments
 (0)