Re: [PATCH 02/11] android/tester: Add create bond with PIN success test case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrzej,

On Sun, Feb 2, 2014 at 7:16 AM, Andrzej Kaczmarek
<andrzej.kaczmarek@xxxxxxxxx> wrote:
> +static void bond_create_pin_success_request_cb(bt_bdaddr_t *remote_bd_addr,
> +                                       bt_bdname_t *bd_name, uint32_t cod)
> +{
> +       struct test_data *data = tester_get_data();
> +       struct mgmt_cp_pin_code_reply rp;
> +       bdaddr_t remote_addr;
> +       static uint8_t pair_device_pin[] = { 0x30, 0x30, 0x30, 0x30 };
> +       const void *pin_code = pair_device_pin;
> +       uint8_t pin_len = 4;
> +
> +       memset(&rp, 0, sizeof(rp));
> +
> +       data->cb_count--;
> +
> +       android2bdaddr(remote_bd_addr, &remote_addr);
> +
> +       bacpy(&rp.addr.bdaddr, &remote_addr);
> +       rp.addr.type = BDADDR_BREDR;
> +       rp.pin_len = pin_len;
> +       memcpy(rp.pin_code, pin_code, rp.pin_len);
> +
> +       mgmt_reply(data->mgmt, MGMT_OP_PIN_CODE_REPLY, data->mgmt_index,
> +                                       sizeof(rp), &rp, NULL, NULL, NULL);

I wonder why you are sending mgmt commands directly instead of using
data->if_bluetooth->pin_reply()?

NOTE: I'm not very familiar with the HAL API so I may just be missing
the point of the test.

Best Regards,
-- 
Anderson Lizardo
http://www.indt.org/?lang=en
INdT - Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux