summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol
diff options
context:
space:
mode:
authorstein3 <stein3@gmail.com>2020-10-06 07:15:41 -0700
committerstein3 <stein3@gmail.com>2020-10-06 07:15:41 -0700
commit2e402741a89c5eec8cf30c966ce6f36d6ec9249b (patch)
tree3592e8c5e6bd19943ae55db7fc02a5f755afbb51 /tmk_core/protocol
parent3e5e4f74272c610bb9fa737f674f8e65ed6100ca (diff)
parent2013f6313430b977e557e482d30daa279a46e75d (diff)
Merge branch 'master' into meteor
Diffstat (limited to 'tmk_core/protocol')
-rw-r--r--tmk_core/protocol/chibios/main.c1
-rw-r--r--tmk_core/protocol/chibios/usb_main.c85
-rw-r--r--tmk_core/protocol/iwrap.mk32
-rw-r--r--tmk_core/protocol/iwrap/iWRAP4.txt376
-rw-r--r--tmk_core/protocol/iwrap/iWRAP5.txt356
-rw-r--r--tmk_core/protocol/iwrap/iwrap.c420
-rw-r--r--tmk_core/protocol/iwrap/iwrap.h47
-rw-r--r--tmk_core/protocol/iwrap/main.c412
-rw-r--r--tmk_core/protocol/iwrap/mux_exit.rb7
-rw-r--r--tmk_core/protocol/iwrap/suart.S156
-rw-r--r--tmk_core/protocol/iwrap/suart.h8
-rw-r--r--tmk_core/protocol/iwrap/wd.h161
-rw-r--r--tmk_core/protocol/lufa.mk25
-rw-r--r--tmk_core/protocol/lufa/adafruit_ble.cpp4
-rw-r--r--tmk_core/protocol/lufa/adafruit_ble.h27
-rw-r--r--tmk_core/protocol/lufa/bluetooth.c38
-rw-r--r--tmk_core/protocol/lufa/bluetooth.h48
-rw-r--r--tmk_core/protocol/lufa/lufa.c314
-rw-r--r--tmk_core/protocol/lufa/lufa.h4
-rw-r--r--tmk_core/protocol/lufa/outputselect.c14
-rw-r--r--tmk_core/protocol/lufa/outputselect.h6
-rw-r--r--tmk_core/protocol/serial.h5
-rw-r--r--tmk_core/protocol/usb_descriptor.c121
-rw-r--r--tmk_core/protocol/usb_descriptor.h20
-rw-r--r--tmk_core/protocol/vusb.mk7
-rw-r--r--tmk_core/protocol/vusb/main.c37
-rw-r--r--tmk_core/protocol/vusb/sendchar_usart.c19
-rw-r--r--tmk_core/protocol/vusb/usbconfig.h20
-rw-r--r--tmk_core/protocol/vusb/vusb.c144
29 files changed, 546 insertions, 2368 deletions
diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c
index 7d32c16ed8..a0d28f9afc 100644
--- a/tmk_core/protocol/chibios/main.c
+++ b/tmk_core/protocol/chibios/main.c
@@ -35,6 +35,7 @@
#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP
// Change this to be TRUE once we've migrated keyboards to the new init system
+// Remember to change docs/platformdev_chibios_earlyinit.md as well.
# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE
#endif
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c
index 65bd291bec..ae33e86a70 100644
--- a/tmk_core/protocol/chibios/usb_main.c
+++ b/tmk_core/protocol/chibios/usb_main.c
@@ -47,6 +47,10 @@
extern keymap_config_t keymap_config;
#endif
+#ifdef JOYSTICK_ENABLE
+# include "joystick.h"
+#endif
+
/* ---------------------------------------------------------
* Global interface variables and declarations
* ---------------------------------------------------------
@@ -62,7 +66,7 @@ extern keymap_config_t keymap_config;
uint8_t keyboard_idle __attribute__((aligned(2))) = 0;
uint8_t keyboard_protocol __attribute__((aligned(2))) = 1;
-uint8_t keyboard_led_stats = 0;
+uint8_t keyboard_led_state = 0;
volatile uint16_t keyboard_idle_count = 0;
static virtual_timer_t keyboard_idle_timer;
static void keyboard_idle_timer_cb(void *arg);
@@ -247,6 +251,9 @@ typedef struct {
#ifdef VIRTSER_ENABLE
usb_driver_config_t serial_driver;
#endif
+#ifdef JOYSTICK_ENABLE
+ usb_driver_config_t joystick_driver;
+#endif
};
usb_driver_config_t array[0];
};
@@ -283,6 +290,14 @@ static usb_driver_configs_t drivers = {
# define CDC_OUT_MODE USB_EP_MODE_TYPE_BULK
.serial_driver = QMK_USB_DRIVER_CONFIG(CDC, CDC_NOTIFICATION_EPNUM, false),
#endif
+
+#ifdef JOYSTICK_ENABLE
+# define JOYSTICK_IN_CAPACITY 4
+# define JOYSTICK_OUT_CAPACITY 4
+# define JOYSTICK_IN_MODE USB_EP_MODE_TYPE_BULK
+# define JOYSTICK_OUT_MODE USB_EP_MODE_TYPE_BULK
+ .joystick_driver = QMK_USB_DRIVER_CONFIG(JOYSTICK, 0, false),
+#endif
};
#define NUM_USB_DRIVERS (sizeof(drivers) / sizeof(usb_driver_config_t))
@@ -386,10 +401,10 @@ static void set_led_transfer_cb(USBDriver *usbp) {
if (usbp->setup[6] == 2) { /* LSB(wLength) */
uint8_t report_id = set_report_buf[0];
if ((report_id == REPORT_ID_KEYBOARD) || (report_id == REPORT_ID_NKRO)) {
- keyboard_led_stats = set_report_buf[1];
+ keyboard_led_state = set_report_buf[1];
}
} else {
- keyboard_led_stats = set_report_buf[0];
+ keyboard_led_state = set_report_buf[0];
}
}
@@ -610,7 +625,7 @@ static void keyboard_idle_timer_cb(void *arg) {
}
/* LED status */
-uint8_t keyboard_leds(void) { return keyboard_led_stats; }
+uint8_t keyboard_leds(void) { return keyboard_led_state; }
/* prepare and start sending a report IN
* not callable from ISR or locked state */
@@ -796,9 +811,7 @@ int8_t sendchar(uint8_t c) {
}
#endif /* CONSOLE_ENABLE */
-void _putchar(char character) {
- sendchar(character);
-}
+void _putchar(char character) { sendchar(character); }
#ifdef RAW_ENABLE
void raw_hid_send(uint8_t *data, uint8_t length) {
@@ -869,3 +882,61 @@ void virtser_task(void) {
}
#endif
+
+#ifdef JOYSTICK_ENABLE
+
+void send_joystick_packet(joystick_t *joystick) {
+ joystick_report_t rep = {
+# if JOYSTICK_AXES_COUNT > 0
+ .axes =
+ {
+ joystick->axes[0],
+
+# if JOYSTICK_AXES_COUNT >= 2
+ joystick->axes[1],
+# endif
+# if JOYSTICK_AXES_COUNT >= 3
+ joystick->axes[2],
+# endif
+# if JOYSTICK_AXES_COUNT >= 4
+ joystick->axes[3],
+# endif
+# if JOYSTICK_AXES_COUNT >= 5
+ joystick->axes[4],
+# endif
+# if JOYSTICK_AXES_COUNT >= 6
+ joystick->axes[5],
+# endif
+ },
+# endif // JOYSTICK_AXES_COUNT>0
+
+# if JOYSTICK_BUTTON_COUNT > 0
+ .buttons =
+ {
+ joystick->buttons[0],
+
+# if JOYSTICK_BUTTON_COUNT > 8
+ joystick->buttons[1],
+# endif
+# if JOYSTICK_BUTTON_COUNT > 16
+ joystick->buttons[2],
+# endif
+# if JOYSTICK_BUTTON_COUNT > 24
+ joystick->buttons[3],
+# endif
+ }
+# endif // JOYSTICK_BUTTON_COUNT>0
+ };
+
+ // chnWrite(&drivers.joystick_driver.driver, (uint8_t *)&rep, sizeof(rep));
+ osalSysLock();
+ if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) {
+ osalSysUnlock();
+ return;
+ }
+
+ usbStartTransmitI(&USB_DRIVER, JOYSTICK_IN_EPNUM, (uint8_t *)&rep, sizeof(joystick_report_t));
+ osalSysUnlock();
+}
+
+#endif
diff --git a/tmk_core/protocol/iwrap.mk b/tmk_core/protocol/iwrap.mk
deleted file mode 100644
index 934235bd81..0000000000
--- a/tmk_core/protocol/iwrap.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-IWRAP_DIR = protocol/iwrap
-
-OPT_DEFS += -DPROTOCOL_IWRAP
-
-SRC += $(IWRAP_DIR)/main.c \
- $(IWRAP_DIR)/iwrap.c \
- $(IWRAP_DIR)/suart.S \
- $(COMMON_DIR)/sendchar_uart.c \
- $(COMMON_DIR)/uart.c
-
-# Search Path
-VPATH += $(TMK_DIR)/protocol/iwrap
-
-
-# TODO: compatible with LUFA and PJRC
-# V-USB
-#
-VUSB_DIR = protocol/vusb
-
-# Path to the V-USB library
-VUSB_PATH = $(LIB_PATH)/vusb
-
-SRC += $(VUSB_DIR)/vusb.c \
- $(VUSB_PATH)/usbdrv/usbdrv.c \
- $(VUSB_PATH)/usbdrv/usbdrvasm.S \
- $(VUSB_PATH)/usbdrv/oddebug.c
-
-# Search Path
-VPATH += $(TMK_PATH)/$(VUSB_DIR)
-VPATH += $(VUSB_PATH)
-
-OPT_DEFS += -DPROTOCOL_VUSB
diff --git a/tmk_core/protocol/iwrap/iWRAP4.txt b/tmk_core/protocol/iwrap/iWRAP4.txt
deleted file mode 100644
index 2a062d9d98..0000000000
--- a/tmk_core/protocol/iwrap/iWRAP4.txt
+++ /dev/null
@@ -1,376 +0,0 @@
-Bulegiga WT12
-=============
-WT12 is a bluetooth module from Bluegiga. http://www.bluegiga.com/
-
-iWRAP
- higher layer interface for bluetooth firmware
- communicate with UART
-
-iWRAP HID
-default setting
- 115200 8bit/n/1/n
-
-
-TODO
-----
-KiCAD circuit/PCB design
-power saving
- AVR sleep(15ms by watch dog timer)
- WT12 sleep
- measuring current consumption
- measuring battery life of normal usage/idle/intensive usage
-software reset/bootloarder
-LED indicator(chaging/paring/connecting)
-license confirmation of suart.c
-consumer page is not working
-authenticate method/SSP
-SPP keyboard support
-SPP debug console support
-mouse wheel feature request to Bluegiga
-
-
-Problems
---------
-power consumption
-no consumer page support(bug?)
-no mouse wheel support
-no paring management
-no interactive auth method
-
-
-UART hardware flow control
---------------------------
-(iWRAP4 User Guide 9.5)
-Hardware flow control is enabled by default and it should not be disabled unless mandatory, because without the hardware flow control the data transmission may not be reliable.
-If the hardware flow control is enabled from PS-keys, but no flow control is used, the following steps should be implemented in the hardware design:
-- CTS pin must be grounded
-- RTS pin must be left floating
-
-
-Power Saving
-------------
-power consume
- without opimization: 4hr to shutdown(310mAh)
- 2011/08/25: 9hr(310mAh) SNIFF MASTER sleep/WDTO_120MS
-
-measure current consumption
- HHKB keyswitch matrix board
- idle
- scanning
- Bluegiga WT12 module
- SLEEP command
- deep sleep on/off in config bits
-
-HHKB keyswich
- how to power off
- I/O pin configuration when sleeping
- FET switch for 5V regulator
-
-Bluetooth module
- power off when in USB mode
- power off by FET switch
-
-AVR configuration
- unused pins
- ADC
-
-
-
-SET CONTROL CONFIG
-------------------
- SET CONTROL CONFIG 4810
- SET CONTROL CONFIG LIST
- SET CONTROL CONFIG 0000 0000 4910 DEEP_SLEEP KLUDGE INTERACTIVE_PIN UART_LATENCY
-
- Bit14 UART low latency
- Bit11 Interactive pairing mode
- Bit04 Deep sleep
-
-
-Reconnection
-------------
-SET CONTROL AUTOCALL 1124 5000 HID
- 1124 HID service class
- 5000 interval ms
-
-HID profile
------------
-This is needed to configure only once.
- SET PROFILE HID ON
- RESET
-
-HID class
----------
- SET BT CLASS 005C0 // keyboard/mouse combined devie
-
-Pairing Security
-----------------
-Secure Simple Pairing(SSP)
- SET BT SSP 2 0 // Enables SSP for keyboard and Man-in-the-middle protection
- SET BT SSP 3 0 // Enables SSP just works mode
-
-for keyboard with SSP
- SET BT AUTH * 0000
- SET BT SSP 2 0
- SET CONTROL CONFIG 800
- RESET
-
-for keyboard without SSP
- SET BT AUTH * 0000
- SET CONTROL CONFIG 800
- RESET
-
-AUTH
- AUTH xx:xx:xx:xx:xx:xx? // Pairing request event
- AUTH xx:xx:xx:xx:xx:xx 0000
-
- SSP PASSKEY 78:dd:08:b7:e4:a2 ?
- SSP PASSKEY 78:dd:08:b7:e4:a2 xxxxx
- (SSP COMPLETE 78:dd:08:b7:e4:a2 HCI_ERROR_AUTH_FAIL // failed)
- RING 0 78:dd:08:b7:e4:a2 11 HID
-
-Connecton
- RING xx:xx:xx:xx:xx:xx xx HID // connection event
-
- KILL xx:xx:xx:xx:xx:xx
-
-Mode
-----
-Command mode
-Data mode
- Raw mode
- (Simple mode not for a real keyboard)
-
-Raw mode
- Keyboard:
- 0x9f, length(10), 0xa1, 0x01, mods, 0x00, key1, key2, key3, key4, key5, key6
-
- Mouse:
- 0x9f, length(5), 0xa1, 0x02, buttons, X, Y
-
- Consumer page:
- 0x9f, length(5), 0xa1, 0x03, bitfield1, bitfield2, bitfield3
-
- consumer page suage
- Bitfield 1:
- 0x01 Volume Increment
- 0x02 Volume Decrement
- 0x04 Mute
- 0x08 Play/Pause
- 0x10 Scan Next Track
- 0x20 Scan Previous Track
- 0x40 Stop
- 0x80 Eject
- Bitfield 2:
- 0x01 Email Reader
- 0x02 Application Control Search
- 0x04 AC Bookmarks
- 0x08 AC Home
- 0x10 AC Back
- 0x20 AC Forward
- 0x40 AC Stop
- 0x80 AC Refresh
- Bitfield 3:
- 0x01 Application Launch Generic Consumer Control
- 0x02 AL Internet Browser
- 0x04 AL Calculator
- 0x08 AL Terminal Lock / Screensaver
- 0x10 AL Local Machine Browser
- 0x20 AC Minimize
- 0x40 Record
- 0x80 Rewind
-
-
-
-
-
-2011/07/13
-set
-SET BT BDADDR 00:07:80:47:22:14
-SET BT NAME HHKB pro BT
-SET BT CLASS 0005c0
-SET BT AUTH * 0000
-SET BT IDENT BT:47 f000 4.1.0 Bluegiga iWRAP
-SET BT LAP 9e8b33
-SET BT PAGEMODE 4 2000 1
-SET BT PAIR 78:dd:08:b7:e4:a2 a191189cd7e51030ad6a07848ce879bb
-SET BT POWER 3 3 3
-SET BT ROLE 0 f 7d00
-SET BT SNIFF 0 20 1 8
-SET BT SSP 2 1
-SET BT MTU 667
-SET CONTROL AUTOCALL 1124 3000 HID
-SET CONTROL BAUD 38400,8n1
-SET CONTROL CD 00 0
-SET CONTROL ECHO 7
-SET CONTROL ESCAPE 43 00 1
-SET CONTROL GAIN 0 5
-SET CONTROL INIT SET CONTROL MUX 0
-SET CONTROL MSC DTE 00 00 00 00 00 00
-SET CONTROL MUX 1
-SET CONTROL PIO 00 00
-SET CONTROL READY 00
-SET PROFILE HID f HID
-SET
-
-info config
-
-!!! THIS IS BETA RELEASE AND MAY BE USED FOR EVALUATION PURPOSES ONLY !!!
-
-WRAP THOR AI (4.1.0 build 435)
-Copyright (c) 2003-2011 Bluegiga Technologies Inc.
-Compiled on Jun 28 2011 17:19:51, running on WT12-A module, psr v31
- AVRCP BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP LEDS MAP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME
- - BOCK3 version 435 (Jun 28 2011 17:19:37) (max acl/sco 7/1)
- - Bluetooth version 2.1, Power class 2
- - Loader 4279, firmware 6297 (56-bit encryption), native execution mode
- - up 0 days, 06:23, 2 connections (pool 2)
- - User configuration:
-&028a = 0001 0000 0000 0011 0024 0000 0000 0010 0000 0080 0000 0000 0080 005f 009b 0034 00fb 0006
-&028b = 0000 0bb8
-&028d = 0001
-&0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000
-&0298 = a006
-&0299 = 0000 0000
-&02a3 = 0030 0030 0030 0030
-&02a4 = 009d 0000
-&02a5 = 0053 0045 0054 0020 0043 004f 004e 0054 0052 004f 004c 0020 004d 0055 0058 0020 0030
-&02a7 = 0000 05c0
-&02a8 = 4910 0000 0000
-&02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
-&02ac = 0000 0000 002b 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000
-&02ad = 4848 424b 7020 6f72 4220 0054
-&02b3 = 0005 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003
-&02b7 = 000f 4948 0044
-&02bb = 8000
-READY.
-
-
-
-
-2011/07/07 settings:
-set
-SET BT BDADDR 00:07:80:47:22:14
-SET BT NAME HHKB Pro BT
-SET BT CLASS 0005c0
-SET BT AUTH * 000
-SET BT IDENT BT:47 f000 4.0.0 Bluegiga iWRAP
-SET BT LAP 9e8b33
-SET BT PAGEMODE 4 2000 1
-SET BT PAIR 78:dd:08:b7:e4:a2 9e54d0aabb1b4d73cfccddb1ea4ef2d6
-SET BT POWER 3 3 3
-SET BT ROLE 0 f 7d00
-SET BT SNIFF 0 20 1 8
-SET BT SSP 3 0
-SET BT MTU 667
-SET CONTROL BAUD 38400,8n1
-SET CONTROL CD 00 0
-SET CONTROL ECHO 7
-SET CONTROL ESCAPE 255 00 1
-SET CONTROL GAIN 0 5
-SET CONTROL INIT set control mux 0
-SET CONTROL MSC DTE 00 00 00 00 00 00
-SET CONTROL PREAMP 1 1
-SET CONTROL READY 00
-SET PROFILE HID HID
-SET PROFILE SPP Bluetooth Serial Port
-SET
-
-info config
-WRAP THOR AI (4.0.0 build 317)
-Copyright (c) 2003-2010 Bluegiga Technologies Inc.
-Compiled on Apr 20 2010 16:44:28, running on WT12-A module, psr v31
- AVRCP FTP PBAP PIO=0x00fc SSP SUBRATE VOLUME
- - BOCK3 version 317 (Apr 20 2010 16:44:21) (max acl/sco 7/1)
- - Bluetooth version 2.1, Power class 2
- - Loader 4279, firmware 6297 (56-bit encryption), native execution mode
- - up 0 days, 00:00, 0 connections (pool 1)
- - User configuration:
-&028c = 0001 0020 0000 0001 0008 0000
-&028d = 0000
-&0296 = 0047 0001 f000 0400 6c42 6575 6967 6167 6920 5257 5041
-&0298 = c006
-&02a3 = 0030 0030 0030
-&02a4 = 009d 0000
-&02a5 = 0073 0065 0074 0020 0063 006f 006e 0074 0072 006f 006c 0020 006d 0075 0078 0020 0030
-&02a7 = 0000 05c0
-&02a8 = 0800 0000 0000
-&02ac = 0000 0000 00ff 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000
-&02ad = 4848 424b 5020 6f72 4220 0054
-&02b3 = 0004 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003
-&02b7 = 0000
-&02bb = 6c42 6575 6f74 746f 2068 6553 6972 6c61 5020 726f 0074
-READY.
-
-
-
-2011/08/23:
-SET BT BDADDR 00:07:80:47:22:14
-SET BT NAME HHKB pro BT
-SET BT CLASS 0005c0
-SET BT AUTH * 0000
-SET BT IDENT BT:47 f000 4.1.0 Bluegiga iWRAP
-SET BT LAP 9e8b33
-SET BT PAGEMODE 4 2000 1
-SET BT PAIRCOUNT 4
-SET BT POWER 3 3 3
-SET BT ROLE 1 f 12c0
-SET BT SNIFF 10 2 1 8
-SET BT SSP 3 0
-SET BT MTU 667
-SET CONTROL BAUD 38400,8n1
-SET CONTROL CD 00 0
-SET CONTROL ECHO 7
-SET CONTROL ESCAPE 43 00 1
-SET CONTROL GAIN 0 5
-SET CONTROL INIT SET CONTROL MUX 0
-SET CONTROL MSC DTE 00 00 00 00 00 00
-SET CONTROL MUX 1
-SET CONTROL PIO 00 00
-SET CONTROL READY 00
-SET PROFILE HID 7 HIDKeyboardMouse
-SET
-
-SET CONTROL CONFIG 0000 0004 481e CLOCK_CACHE INTERLACED_INQ INTERLACED_PAGE DEEP_SLEEP INTERACTIVE_PIN UART_LATENCY 23D_NOKLUDGE
-
-
-
-2011/08/25:
-SET BT BDADDR 00:07:80:47:22:14
-SET BT NAME HHKB pro BT
-SET BT CLASS 0005c0
-
-SET BT IDENT BT:47 f000 4.1.0 Bluegiga iWRAP
-SET BT LAP 9e8b33
-SET BT PAGEMODE 4 2000 1
-SET BT PAIRCOUNT 4
-SET BT PAIR 78:dd:08:b7:e4:a2 0be83335a03fed8ededae42e99554e28
-SET BT POWER 3 3 3
-SET BT ROLE 1 f 12c0
-SET BT SNIFF 100 20 1 8
-SET BT SSP 3 0
-SET BT MTU 667
-SET CONTROL BAUD 38400,8n1
-SET CONTROL CD 00 0
-SET CONTROL ECHO 7
-SET CONTROL ESCAPE - 20 1
-SET CONTROL GAIN 0 5
-SET CONTROL INIT SET CONTROL MUX 0
-SET CONTROL MSC DTE 00 00 00 00 00 00
-SET CONTROL MUX 1
-SET CONTROL PIO 00 00
-SET CONTROL READY 00
-SET PROFILE HID f HIDKeyboardMouse
-SET
-
-
-SET CONTROL CONFIG 0000 0000 490e CLOCK_CACHE INTERLACED_INQ INTERLACED_PAGE KLUDGE INTERACTIVE_PIN UART_LATENCY
-
-
-2011/09/08:
-SET CONTROL CONFIG 0000 0000 410e CLOCK_CACHE INTERLACED_INQ INTERLACED_PAGE KLUDGE UART_LATENCY
-
- Removed INTERACTIVE_PIN to avoid interactive auth and use SET BT AUTH pin(0000).
-
-
-EOF
diff --git a/tmk_core/protocol/iwrap/iWRAP5.txt b/tmk_core/protocol/iwrap/iWRAP5.txt
deleted file mode 100644
index ce3310f1bf..0000000000
--- a/tmk_core/protocol/iwrap/iWRAP5.txt
+++ /dev/null
@@ -1,356 +0,0 @@
-Terminology
-===========
-PSM
-HIDP HID Protocol
-L2CAP Logical Link Control Adaptation Protocol
-MTU Maximum Transmission Unit
-
-
-
-HID Protocol
-============
-3 of HID_SPEC_V11.pdf
-
-Channel
--------
-Control channel PSM=0x0011
-Interrupt channel PSM=0x0013
-
-Message
--------
-HANDSHAKE(0)
-HID_CONTROL(1)
-
-GET_REPORT(4)
- Host requests report(DATA payload on Control channel) from Device
- Size Desc
- ------------------------------------------------------------------------------
- HIDP-Hdr 1 7..4: HIDP Message TYpe(4: GET_REPORT)
- 3: Size(1:2-octed buffer size, 0:size of the report)
- 2: 0
- 1..0: Report Type(1:input, 2:output, 3: feature)
- ReportID 1 Optional
- BufferSize 2 Optional(specified when Size=1)
-
-SET_REPORT(5)
-GET_PROTOCOL(6)
-SET_PROTOCOL(7)
-
-DATA(A)
- Input/Output Report: All DATA payloads flow on Interrupt channel.
- Other: flows on Control channel.
- Size Desc
- ------------------------------------------------------------------------------
- HIDP-Hdr 1 7..4 0xA
- 3..2 Reserved(0)
- 1..0 Report Type(0:Other, 1:Input, 2:Output, 3:Feature)
- Payload N Data
-
-
-
-
-Boot Protocol
-=============
-3.3.2
-No report descriptor, fixed report descriptors defined.
-
-Device ReportID Size
----------------------------------
-Reserved 0
-Keyboard 1 9octets
-Mouse 2 4octets
-Reserved 3-255
-
-Report descriptor
------------------
-Report ID is added to USB HID boot protocol descriptor.
-Boot Protocol device doesn't need to supply descriptors. and can send extra data on end of boot report this data will be ignored unless host supports report descriptor.
-
-Report Protocol devices can have specific descriptors. Using Boot protocol descriptor followed by extra data may be useful for compatibility to Boot protocol only supported host.
-
-NOTE:
-Bluegiga HID sample say report ID of mouse is 1 but 2?
-Bluegiga HID sample say report ID of consumer page is 2 but 3?
-** mouse.desc and consumer.desc were fixed.
- size
-keyboard.desc 67 0x43
-mouse.desc 60 0x3c
-consumer.desc 82 0x52
-combo.desc 209 0xd1
-
-
-
-SDP
-===
-attributes(3.3.2)
-----------
-HIDDeviceSubclass
- which type is supported in Boot Protocol Mode
- 7 6
- ---
- 0 1 Keyboard
- 1 0 Pointing device
- 1 1 Combo keyboard/pointing device
-
-HIDBootDevice
- TRUE
-HIDReconnectInitiate
- TRUE
-
-
-Class of Device/Service
-=======================
-http://phys.sci.hokudai.ac.jp/LABS/yts/pic/GB002/Bluetooth_assigned_numbers_baseband.pdf
-
-0x0005C0 Keyboard and Pointing deivce(combo)
-
-
- 23 16 15 8 7 0
- ---------------------------------
- Service |Major |Minor |Format
-
- Format type
- 1 0
- ---
- 0 0
-
- Minor Device Class of Peripheral Major
- 7 6
- ---
- 0 1 Keyboard
- 1 0 Pointing device
- 1 1 Combo keyboard/pointing device
-
-
- Major device classes
- 12 11 10 9 8
- --------------
- 0 0 0 0 0 Miscellaneous
- 0 0 0 0 1 Computer
- 0 0 0 1 0 Phone
- 0 0 0 1 1 LAN /Network Access point
- 0 0 1 0 0 Audio/Video (headset,speaker,stereo, video display, vcr.....
- 0 0 1 0 1 *Peripheral (mouse, joystick, keyboards, ..... )
- 0 0 1 1 0 Imaging (printing, scanner, camera, display, ...)
- 1 1 1 1 1 Uncategorized, specific device code not specified
- X X X X X All other values reserved
-
-
- Major service classes
- bit
- --------------------------------------
- 13 Limited Discoverable Mode [Ref #1]
- 14 (reserved)
- 15 (reserved)
- 16 Positioning (Location identification)
- 17 Networking (LAN, Ad hoc, ...)
- 18 Rendering (Printing, Speaker, ...)
- 19 Capturing (Scanner, Microphone, ...)
- 20 Object Transfer (v-Inbox, v-Folder, ...)
- 21 Audio (Speaker, Microphone, Headset service, ...)
- 22 Telephony (Cordless telephony, Modem, Headset service, ...)
- 23 Information (WEB-server, WAP-server, ...)
-
-
-
-
-Authentication SSP
--------------------
-SET BT SSP 2 0 PASS KEY entering
-SET BT SSP 3 0 NO PASS KEY entering
-SET BT SSP <capabilities> <mitm>
- <capabilities>: 0:display only 1:display+yes/no button 2:keyboard only 3:none
-SET BT SSP 2 1 # 2:keyboard only 1:Man-in-the-middle protection is needed
-SET BT SSP 2 0 # 2:keyboard only 0:Man-in-the-middle protection is not needed
-
-
-SET BT SSP 2 1
- bond only if MITM protection is supported by host
-SET BT SSP 2 0
- bond even if MITM protection is not supported by host
-
-On Windows 'Add device' causes SSP PASSKEY event on iWRAP
- SSP PASSKEY 78:dd:08:b7:e4:a2 ?
-
-If device has display(0 or 1) this event occurs. User should be shown this code on the device.
- SSP CONFIRM 78:dd:08:b7:e4:a2 517572
-
-
-SET BT SSP 3 0
- No input/output, No MITM protection.
- Without procedure of authentication the divice is bond to host.
-
-
-Connect
-=======
-CALL 78:dd:08:b7:e4:a2 11 HID
-
-
-Setting
-========
-Following settings need to be done before wiring into keyboard.
-- UART speed: 38400bps(115200bps didn't work with software serial)
-- No SSP procedure(without MITM protection)
-- No Power Saving
-
-# clear pairing record and set default
-SET BT PAIR *
-SET RESET
-
-SET CONTROL INIT SET CONTROL MUX 0
-SET CONTROL BAUD 38400,8n1
-SET BT NAME TMK Blootooth WT12
-SET BT CLASS 0005c0
-SET BT AUTH * 0000
-SET BT SSP 3 0
-SET CONTROL CONFIG 4800
-SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard(WT12)
-SET PROFILE SPP
-
-# power saving?
-SET BT SNIFF 100 20 1 8
-
-
-# Report Descriptor
-# combo keyboard + mouse + consumer
-HID SET d2 05010906a1010507850119e029e715002501750195088102950175088101950575010508850119012905910295017503910395067508150025650507190029658100c005010902a1010901a1008502050919012908150025017501950881020501093009311581257f750895028106093895018106050c0a380295018106c0c0050c0901a1018503050c1500250109e909ea09e209cd19b529b87501950881020a8a010a21020a2a021a23022a27027501950881020a83010a96010a92010a9e010a94010a060209b209b4750195088102c0
-
-
-
-SET PROFILE HID
----------------
- SET PROFILE HID 0d c0 100 0 en 0409 HHKB pro Bluetooth keyboard
- {function bit} uint8
- {subclass} uint8
- {version} uint16
- {country} uint8
- {BTlang} char[2]
- {USBlang} uint16
- {name} string
-
-
-SET BT CLASS
-------------
- See Class of Device
- composite device: keyboard and mouse
- SET BT CLASS 005c0
-
-
-
-
-
-
-----------
-after setting
-----------
-set
-SET BT BDADDR 00:07:80:47:22:14
-SET BT NAME TMK Blootooth WT12
-SET BT CLASS 0005c0
-SET BT AUTH * 0000
-SET BT IDENT BT:47 f000 5.0.1 Bluegiga iWRAP
-SET BT LAP 9e8b33
-SET BT PAGEMODE 4 2000 1
-SET BT PAIR 78:dd:08:b7:e4:a2 9e3d85c91bcae73fef8cc10bec18b42f
-SET BT POWER 3 3 3
-SET BT ROLE 0 f 7d00
-SET BT SNIFF 0 20 1 8
-SET BT SSP 3 0
-SET BT MTU 667
-SET CONTROL BAUD 38400,8n1
-SET CONTROL CD 00 0
-SET CONTROL ECHO 7
-SET CONTROL ESCAPE 43 00 1
-SET CONTROL GAIN 0 5
-SET CONTROL INIT SET CONTROL MUX 0
-SET CONTROL MSC DTE 00 00 00 00 00 00
-SET CONTROL MUX 1
-SET CONTROL PIO 00 00
-SET CONTROL READY 00
-SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard(WT12)
-SET
-
-set control config list
-SET CONTROL CONFIG 0000 0000 0000 4900 KLUDGE INTERACTIVE_PIN UART_LATENCY
-
-
-info config
-WRAP THOR AI (5.0.1 build 620)
-Copyright (c) 2003-2012 Bluegiga Technologies Inc.
-Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31
- BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME
- - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1)
- - Bluetooth version 3.0, Power class 2
- - Loader 8615, firmware 8825 (56-bit encryption), native execution mode
- - up 0 days, 01:50, 2 connections (pool 2)
- - User configuration:
-&028d = 0001
-&0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000
-&0298 = c053
-&0299 = 0000 0000
-&02a3 = 0030 0030 0030 0030
-&02a4 = 009d 0000
-&02a5 = 0053 0045 0054 0020 0043 004f 004e 0054 0052 004f 004c 0020 004d 0055 0058 0020 0030
-&02a7 = 0000 05c0
-&02a8 = 0800 0000 0000 0000
-&02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
-&02ac = 0000 0000 002b 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000
-&02ad = 4d54 204b 6c42 6f6f 6f74 746f 2068 5457 3231
-&02b0 = fa65 b0aa 934a 077b a600 d1cc fe58 8dd5
-&02b3 = 0004 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0005 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0005
-&02b7 = 000f 00c0 0100 0000 0065 006e 0409 4d54 204b 6c42 6575 6f74 746f &02bb = 8000
-READY.
-----------
-
-
-
------
-After 5.0.1 Firmware update
-Firmware: ai-5.0.1-620-25b.bc4.dfu
-PSR: wt12-a.ai-5.0.1-620-25b.psrf
------
-info config
-WRAP THOR AI (5.0.1 build 620)
-Copyright (c) 2003-2012 Bluegiga Technologies Inc.
-Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31
- BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME
- - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1)
- - Bluetooth version 3.0, Power class 2
- - Loader 8615, firmware 8825 (56-bit encryption), native execution mode
- - up 0 days, 00:03, 0 connections (pool 1)
- - User configuration:
-&0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000
-&0299 = 0000 0000
-&02