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

[bluetooth-dev] inquiry command




The inquiry command is wrong.  Only 3 bytes for the lap.


Fix:

int inquiry(unsigned char lap[], unsigned char inq_len, unsigned char
num_resp)
{
  D_CTRL("Sending inquiry()\n");
  c_pkt.type = CMD_PKT;
  c_pkt.ocf = INQUIRY;
  c_pkt.ogf = HCI_LC;
  memcpy(c_pkt.data, lap, 3);
  c_pkt.data[3] = inq_len;
  c_pkt.data[4] = num_resp;
  c_pkt.length = 5;

  return send_cmd((unsigned char*) &c_pkt ,c_pkt.length + CMD_HDR_LEN +
HCI_HDR_LEN);
}


----                                                                   
Mark Douglas Corner                                      
mcorner@xxxxxxx.edu