Commit graph

94 commits

Author SHA1 Message Date
jaseg
a818c94fc4 Replace word lists by PGP word lists
from https://en.wikipedia.org/wiki/PGP_word_list
2018-12-01 14:02:37 +09:00
jaseg
e613f1b9a2 Key scrubber works but is untested on race conditions due to unexpected reset 2018-11-16 16:16:30 +09:00
jaseg
080e5e4131 Clear ciphers on handshake reset 2018-11-15 11:46:22 +09:00
jaseg
eb481f1cda known device/sram data persistence working 2018-11-14 22:47:04 +09:00
jaseg
66f9e82c5c Pairing and fingerprint checking works nicely now 2018-11-14 22:00:06 +09:00
jaseg
9249e792a1 GUI pairing working as it should 2018-11-14 09:39:43 +09:00
jaseg
370301e06d Add tracing 2018-11-13 22:43:00 +09:00
jaseg
e16515bb64 Pairing and passthrough mostly working, except it's too slow 2018-11-13 21:45:24 +09:00
jaseg
587ecdd72d Host handshake mostly working 2018-11-13 15:51:35 +09:00
jaseg
af15c38a05 New host-side arch working 2018-11-12 23:18:45 +09:00
jaseg
d2c9b00b36 Pairing confirmation: ignore special chars and "and" 2018-11-12 13:19:26 +09:00
jaseg
70d8dcb6f6 Confirmed pairing works 2018-11-12 12:48:47 +09:00
jaseg
2f4f3e13aa Handshake working with new abstractions 2018-11-12 11:59:11 +09:00
jaseg
21be46a0b5 HID report transmission partially works now
partially i.e. if you attach the keyboard before the noise handshake. I
suspect some memory corruption somewhere.
2018-11-08 19:53:11 +09:00
jaseg
e4e2318804 Break out noise.c and packet_interface.c 2018-11-08 19:01:10 +09:00
jaseg
333d94bf9f Noise handshake working 2018-11-08 16:35:31 +09:00
jaseg
050d49a56b Noise integration compiles 2018-11-08 15:41:46 +09:00
jaseg
985710d517 COBS/binary suport added, abstraction improved 2018-11-06 17:18:34 +09:00
jaseg
09893c47d1 Proper print abstraction and ring buffer works 2018-11-06 14:21:10 +09:00
jaseg
5009a15280 DMA-supported LOG_PRINTF works 2018-11-06 09:15:37 +09:00
jaseg
5b4c295d00 Some UART logging work 2018-11-05 10:02:51 +09:00
jaseg
7c8490211b Make demo work with STM32F4 board from aliexpress for SecureHID project 2018-11-01 16:39:56 +09:00
Amir Hammad
d1689b4701 Fix missing usbh_config.h in the cmake project
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 20:14:51 +02:00
Amir Hammad
b7167bf2af lld: add mask with epdir
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:48 +02:00
Amir Hammad
4415d960c3 use default case instead of handling other packet statuses explicitely
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:48 +02:00
Amir Hammad
bacf8ecdbb xbox: remove warning about unused variable
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:48 +02:00
Amir Hammad
b055665fb0 lld: remove not used error_count field in channel struct
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:48 +02:00
Amir Hammad
d7f23c7a8f lld: simplify stm32f4_usbh_port_channel_setup
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:48 +02:00
Amir Hammad
8946cb522b lld: rework low level driver initialization
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:48 +02:00
Amir Hammad
decb2d817d use forward declaration for usbh_dev_driver_t
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:48 +02:00
Amir Hammad
1d1b697bc6 use NULL instead of 0 for assigning null pointer
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
bc8dd60b2e midi: rename prefix of static functions
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
63446f99fc lld: don't enable channel on write nack, return EAGAIN instead
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
b895498df9 hub: use common code to remove device
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
c9869466dd remove detection of hang
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
fe54644237 HUB: make use of control wrappers + use enums
Until now, hardcoded numbers were used as states.

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
66b801b01e hid: use control wrapper to simplify hid report writes
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
2c23090d49 core: use new control wrapper to set configuration to device
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
7c4ae8d7aa core: use new control wrapper to read device descriptor
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
d4c74c55c3 core: use new control wrapper to set device's address
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
c4e6f3b55b core: add helper state machine for control read/write
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
6d9ee8e9a6 add DISABLE_LOW_LEVEL ifdef in hub device driver
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
58fec7a17c Drop need for the set configuration request in dev drivers
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
a75535e52b core: Simplify device removes
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:31:47 +02:00
Amir Hammad
3d68ea2807 make hid_mouse driver generic HID driver
+ keyboard support
+ SET_REPORT commands - usually leds on keyboards (WIP)

- missing parsing of HID report descriptor

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:30:13 +02:00
Amir Hammad
ed70a1efa3 Switch to cmake build system
* use tinyprintf
* ability to configure project via ccmake

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-11 13:30:10 +02:00
Amir Hammad
28ccd32608 core: adjust search for the device driver
in finding compatibility there are 3 steps how to find
out whether the provided device driver supports currently
inserted device.

1. compare fields in the driver info structure
If there is a match (all CHECK_PARTIAL_COMPATIBILITY() macros return true),
we proceed to step 2.
If all device drivers are searched, but none is compatible ->
that means no device driver is available for currently inserted device.

2. try to call driver's init function.
If it return non-null pointer to data we may proceed to the step 3.
Otherwise, we continue in the loop handling step 1.

3. call analyze descriptor for all descriptors. When it returns true,
it means success and that the driver supports current device. From now on
poll function is allowed to be called.
If all descriptors were provided to the analyze_descriptor method and
it still returns false, it means device driver is not initialized and
should not be used with this device.

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-08 07:54:06 +02:00
Amir Hammad
4aa69b4eaf make usbh_packet->data of union type
out: const void *
in: void *

Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-08 07:54:06 +02:00
Amir Hammad
e0fbb799bd usbh_core refactor
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-08 07:54:06 +02:00
Amir Hammad
3493c1c087 fix bmRequestType field - use of defines
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
2016-09-01 10:36:36 +02:00