mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-15 21:40:22 +00:00
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:
parent
1c3473b4f4
commit
7223da3224
@ -158,16 +158,7 @@ static int h4_open(void *transport_config){
|
|||||||
// init state machine
|
// init state machine
|
||||||
bytes_to_read = 1;
|
bytes_to_read = 1;
|
||||||
h4_state = H4_W4_PACKET_TYPE;
|
h4_state = H4_W4_PACKET_TYPE;
|
||||||
read_pos = 0;
|
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);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user