Meshctl - Modification to agent.c for easier entering static OOB key

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

 



Hi,

Entering a static OOB key in meshctl requires all 16 bytes. With the
following change a shorter
key can be entered. I have never created a patch, so sorry about the format:

In agent.c @ line 102:
static bool response_hexadecimal(const char *input)
{
  uint8_t buf[MAX_HEXADECIMAL_OOB_LEN];

  if (!str2hex(input, strlen(input), buf, pending_request.len) ) {
rl_printf("Incorrect input: expecting %d hex octets\n",
 pending_request.len);
return false;
}
...

changes to:

static bool response_hexadecimal(const char *input)
{
  uint8_t buf[MAX_HEXADECIMAL_OOB_LEN];

  memset(buf, 0, pending_request.len);
  str2hex(input, strlen(input), buf, strlen(input)/2);
...

Kind regards,

Jehudi
--
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