don't sent 2 additional HCI Reset by posix h4 transport as new HCI init tries sending HCI Reset until success

This commit is contained in:
Matthias Ringwald 2015-04-16 16:53:21 +02:00
parent 1c3473b4f4
commit 7223da3224

View File

@ -158,16 +158,7 @@ static int h4_open(void *transport_config){
// init state machine
bytes_to_read = 1;
h4_state = H4_W4_PACKET_TYPE;
read_pos = 0;
// bring bluetooth module into defined state
uint8_t reset[] = { 0x01, 0x03, 0x0c, 0x00};
write(fd, reset, sizeof(reset));
usleep(100000); // 100 ms
write(fd, reset, sizeof(reset));
usleep(100000); // 100 ms
tcflush(fd, TCIOFLUSH);
read_pos = 0;
return 0;
}