From c1ace44ee91d8e4d235a51097eef97b21fb309dc Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Tue, 28 Jan 2014 22:42:58 +0000 Subject: [PATCH] added l2cap connection update request command and tested with ipad --- example/libusb/ble_peripheral.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/example/libusb/ble_peripheral.c b/example/libusb/ble_peripheral.c index 53077b717..80c77b393 100644 --- a/example/libusb/ble_peripheral.c +++ b/example/libusb/ble_peripheral.c @@ -579,6 +579,7 @@ void show_usage(){ printf("---\n"); printf("s - slave initiated security request off\n"); printf("S - slave initiated security request on\n"); + printf("z - send Connection Parameter Update Request\n"); printf("t - terminate connection\n"); printf("---\n"); printf("e - IO_CAPABILITY_DISPLAY_ONLY\n"); @@ -664,10 +665,12 @@ int stdin_process(struct data_source *ds){ switch (buffer){ case 'a': gap_advertisements = 0; + update_advertisements(); show_usage(); break; case 'A': gap_advertisements = 1; + update_advertisements(); show_usage(); break; case 'b': @@ -762,6 +765,10 @@ int stdin_process(struct data_source *ds){ printf("Terminating connection\n"); hci_send_cmd(&hci_disconnect, handle, 0x13); break; + case 'z': + printf("Sending l2cap connection update parameter request\n"); + l2cap_le_request_connection_parameter_update(handle, 50, 120, 0, 550); + break; case 'o': sm_have_oob_data = 0; show_usage();