Johan Hedberg
88373d735a
emulator: Fix correct link key type generation
2014-02-03 07:49:42 +02:00
Johan Hedberg
df39364122
emulator: Add HCI_Write_SSP_Debug_Mode support
2014-02-03 07:49:25 +02:00
Anderson Lizardo
64bc96534b
emulator: Fix crash if socket(AF_ALG) is not supported by the kernel
...
In this situation, smp_stop() was being called with NULL pointer.
Crash detected by valgrind:
==7925== Invalid read of size 4
==7925== at 0x8052F18: smp_stop (smp.c:480)
==7925== by 0x8052542: bthost_stop (bthost.c:2073)
==7925== by 0x805521D: hciemu_unref (hciemu.c:372)
==7925== by 0x8058C65: test_post_teardown (android-tester.c:464)
==7925== by 0x8055DE7: tester_teardown_complete (tester.c:533)
==7925== by 0x8055501: teardown_callback (tester.c:312)
==7925== by 0x408348F: g_idle_dispatch (gmain.c:5250)
==7925== by 0x4086A75: g_main_context_dispatch (gmain.c:3065)
==7925== by 0x4086E14: g_main_context_iterate.isra.23 (gmain.c:3712)
==7925== by 0x40872FA: g_main_loop_run (gmain.c:3906)
==7925== by 0x41744D2: (below main) (libc-start.c:226)
==7925== Address 0x8 is not stack'd, malloc'd or (recently) free'd
2014-01-27 09:59:28 -08:00
Marcel Holtmann
ccbbb8dd3c
emulator: Add simple HFP emulator for testing
2014-01-25 12:17:09 -08:00
Anderson Lizardo
b23ed9bf8d
emulator: Fix unaligned memory access compilation errors
...
The u128_xor() function does proper aligned access and accepts void *
arguments, therefore the casts are unnecessary and trigger clang errors.
2014-01-21 11:07:37 +02:00
Johan Hedberg
35b50f0f34
emulator/bthost: Add dummy entries for LTK reply completion
2014-01-20 16:28:03 +02:00
Johan Hedberg
f3db25a05b
emulator/bthost: Add SMP callback to fetch LTK
2014-01-20 16:28:03 +02:00
Johan Hedberg
741d28de64
emulator/bthost: Add warning for unsupported LE Meta events
2014-01-20 16:27:57 +02:00
Johan Hedberg
fb922ee610
emulator/bthost: Add SMP support
2014-01-20 16:26:33 +02:00
Johan Hedberg
2688bf5c6e
emulator/bthost: Add dummy handler for User Confirm Request Reply completion
2014-01-20 13:14:28 +02:00
Johan Hedberg
23b2191c07
emulator/bthost: Remove unnecessary printf
2014-01-17 15:29:31 +02:00
Johan Hedberg
dee79b4635
emulator/bthost: More RFCOMM code cleanups
2014-01-16 12:23:16 +02:00
Johan Hedberg
d11ac83a18
emulator/bthost: Further cleanups to the RFCOMM code
2014-01-16 12:23:15 +02:00
Johan Hedberg
bce8cc0159
emulator/bthost: Clean up RFCOMM related code
2014-01-16 12:23:15 +02:00
Johan Hedberg
a48b49121f
tools/bthost: Remove useless channel parameter from RFCOMM callback
2014-01-16 12:23:15 +02:00
Marcin Kraglak
c64b9baa99
emulator/bthost: Call rfcomm_connect_cb when connected
...
This will call connect callback when connected or failed to connect.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
37a1b0fa3d
emulator/bthost: Add implementation to PN RSP
...
This will send sabm command if PN_RSP will be received.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
287c075913
emulator/bthost: Ad implementation of rfcomm_ua_recv
...
This will handle ua responses in bthost.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
90fd2a2f98
emulator/bthost: Implement bthost_connect_rfcomm
...
This method will start L2CAP connection on RFCOMM PSM and continue
connecting to rfcomm server. User can specify callback to be called
after connection.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
3fbe314714
emulator/bthost: Implement recv_disc rfcomm frame in bthost
2014-01-16 12:23:15 +02:00
Marcin Kraglak
662c19903f
emulator/bthost: Service msc frames
2014-01-16 12:23:15 +02:00
Marcin Kraglak
f167df0e3a
emulator/bthost: Add recv_pn implementation
2014-01-16 12:23:15 +02:00
Marcin Kraglak
cbc1720d4f
emulator/bthost: Add rfcomm_mcc_recv stub
...
It will handle mcc frames in bthost.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
983ecc30e4
emulator/bthost: Add recv_sabm imnplementation
...
This will handle sabm frames and send ua or dm frame.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
75c7ab2d99
emulator/bthost: Add method to create rfcomm server
...
It allows user to create rfcomm server on bthost.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
0c27ca7f45
emulator/bthost: Add initial rfcomm handling
...
This is initial rfcomm handling in bthost.
2014-01-16 12:23:15 +02:00
Johan Hedberg
3c08f44715
emulator/bthost: Fix requesting encryption if authentication failed
2014-01-15 14:38:04 +02:00
Johan Hedberg
f072c7573b
emulator/bthost: Add API to request authentication
2014-01-15 14:34:01 +02:00
Johan Hedberg
7dfc7e9614
emulator/bthost: Add basic support for link key requests
2014-01-15 14:33:38 +02:00
Johan Hedberg
e52dfcadf5
emulator: Fix SSP IO capability request handling
2014-01-13 16:56:49 +02:00
Johan Hedberg
c85d3d5747
emulator: Add reminding comment to fix link key type
2014-01-13 16:32:41 +02:00
Johan Hedberg
92d3e1b6f2
emulator: Fix emitting bogus encrypt change if we're not connected
2014-01-13 16:32:40 +02:00
Johan Hedberg
579876ea9e
emulator: Fix returning correct remote host features
2014-01-13 16:32:40 +02:00
Johan Hedberg
a26be8f057
emulator: Fix completion of SSP user confirm commands
2014-01-13 16:32:40 +02:00
Johan Hedberg
162882534b
emulator: Fix SSP rejection status propagation
2014-01-13 14:29:36 +02:00
Johan Hedberg
27d79b3a73
emulator/bthost: Add API to reject SSP User Confirmation
2014-01-13 14:29:06 +02:00
Johan Hedberg
0903fa12a5
emulator/bthost: Add support for specifying custom IO capability
2014-01-13 13:23:45 +02:00
Marcin Kraglak
62041e0a4d
emulator/bthost: Fix sending L2CAP config req
...
Send L2CAP config request with correct dcid field. It worked
well only if scid and dcid of L2CAP connection were the same.
2014-01-13 13:05:44 +02:00
Johan Hedberg
f881e165ec
emulator/bthost: Request encryption when authentication completes
2014-01-13 12:58:16 +02:00
Johan Hedberg
4ea78ff34b
emulator: Add Set Connection Encryption command support
2014-01-13 12:58:15 +02:00
Johan Hedberg
f89e2eb7fb
emulator: Encryption should be enabled only when explicitly requested
2014-01-13 12:58:15 +02:00
Johan Hedberg
78d239fd40
emulator: Add missing Transparent SCO feature bit
2014-01-12 09:19:25 +02:00
Marcel Holtmann
e90a074333
emulator: Make use of generic endian conversion macros
2014-01-10 13:05:23 -08:00
Johan Hedberg
8a5967251a
emulator: Add basic support for SSP completion
2014-01-10 16:05:08 +02:00
Johan Hedberg
cee10685ae
emulator/bthost: Add basic handling of user confirm request and SSP complete events
2014-01-10 16:05:08 +02:00
Johan Hedberg
0143a51c32
emulator: Add dummy cmd complete handler for IO Capability Request Reply
2014-01-10 16:05:07 +02:00
Johan Hedberg
9980744cd4
emulator/bthost: Add basic IO Capability Request & Response handling
2014-01-10 16:05:07 +02:00
Johan Hedberg
2781eb13f5
emulator: Add basic HCI_IO_Capability_Request_Reply handling
2014-01-10 16:05:07 +02:00
Johan Hedberg
bc3b7427cf
tools/bthost: Add dummy handler for HCI_Write_SSP_Mode completion
2014-01-10 16:05:06 +02:00
Johan Hedberg
262ee6bd02
emulator/bthost: Track remote address in btconn
2014-01-10 16:05:06 +02:00