From 7223da32249490f367f9b4ef7628050371278cd8 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 16 Apr 2015 16:53:21 +0200 Subject: [PATCH] don't sent 2 additional HCI Reset by posix h4 transport as new HCI init tries sending HCI Reset until success --- platforms/posix/src/hci_transport_h4.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/platforms/posix/src/hci_transport_h4.c b/platforms/posix/src/hci_transport_h4.c index f1568488c..9236677eb 100644 --- a/platforms/posix/src/hci_transport_h4.c +++ b/platforms/posix/src/hci_transport_h4.c @@ -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; }