diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-05-26 14:54:11 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-12-03 16:32:47 +0200 |
commit | 347bb9cad49e0cd9aa94c67c5f6027cbb9c0ee6c (patch) | |
tree | c576f3d0a3e1a4d5e93aadb3c1439d209c2b31d9 /tools/smp-tester.c | |
parent | 41f7c8e26b11793ed0a941062ea07d1d22c7d01a (diff) | |
download | bluez-347bb9cad49e0cd9aa94c67c5f6027cbb9c0ee6c.tar.gz |
smp-tester: Add another basic SC test
Diffstat (limited to 'tools/smp-tester.c')
-rw-r--r-- | tools/smp-tester.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/smp-tester.c b/tools/smp-tester.c index ba4710908..b1d25a36f 100644 --- a/tools/smp-tester.c +++ b/tools/smp-tester.c @@ -439,6 +439,26 @@ static const struct smp_data smp_client_sc_req_1_test = { .sc = true, }; +static const uint8_t smp_sc_rsp_1[] = { 0x02, /* Pairing Response */ + 0x03, /* NoInputNoOutput */ + 0x00, /* OOB Flag */ + 0x09, /* Bonding - no MITM, SC */ + 0x10, /* Max key size */ + 0x0d, /* Init. key dist. */ + 0x0d, /* Rsp. key dist. */ +}; + +static const struct smp_req_rsp cli_sc_req_2[] = { + { NULL, 0, smp_sc_req_1, sizeof(smp_sc_req_1) }, + { smp_sc_rsp_1, sizeof(smp_sc_rsp_1), NULL, 0 }, +}; + +static const struct smp_data smp_client_sc_req_2_test = { + .req = cli_sc_req_2, + .req_count = G_N_ELEMENTS(cli_sc_req_2), + .sc = true, +}; + static void client_connectable_complete(uint16_t opcode, uint8_t status, const void *param, uint8_t len, void *user_data) @@ -859,6 +879,9 @@ int main(int argc, char *argv[]) test_smp("SMP Client - SC Request 1", &smp_client_sc_req_1_test, setup_powered_client, test_client); + test_smp("SMP Client - SC Request 2", + &smp_client_sc_req_2_test, + setup_powered_client, test_client); return tester_run(); } |