Skip to content

Commit aae6d6c

Browse files
committed
gap appearance added
1 parent f4b4647 commit aae6d6c

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

components/ble/ble.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ void initBLE(){
7373
rc = ble_svc_gap_device_name_set(CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME);
7474
assert(rc == 0);
7575

76+
//set the appearance of the device
77+
//0x03c3 = joystick; 0x03c4 = gamepad
78+
ble_svc_gap_device_appearance_set(0x03C4);
79+
7680
//https://github.com/espressif/esp-nimble/issues/33
7781
//KEINE AHNUNG WAS DAS MACHT ABER DADURCH KANN SICH DER ESP NACH EINEN NEUSTART WIEDER MIT DEM GERÄT VERBINDEN
7882
/* XXX Need to have template for store */

components/ble/gap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ void bleAdvertise(void){
4646
fields.name_len = strlen(CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME);
4747
fields.name_is_complete = 1;
4848

49+
fields.appearance = ble_svc_gap_device_appearance();
50+
fields.appearance_is_present = 1;
51+
4952
fields.num_uuids16 = 1;
5053
fields.uuids16_is_complete = 0;
5154
fields.uuids16 = (ble_uuid16_t[]){

docs/BLE-Debugging.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,7 @@ Auf dieser [Website](https://eleccelerator.com/usbdescreqparser/) umwandeln.
9090
`conn <BT ADDRESS>`
9191

9292
#### Liste von Diensten
93-
`svcs`
93+
`svcs`
94+
95+
## Hinweis:
96+
- Debugging des XBox controllers hat nur verbunden, wenn man ihn nicht in den Bluetooth-Einstellungen verbunden hatte und wenn mann ihn erst connecting modus bringt wenn man gatttools offen hat und danach connect aufruft.

0 commit comments

Comments
 (0)