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

Re: [bluetooth-dev] readbd and HCI inquiry scan error



Hi,

Is the result when using "btd" different from that when using "btduser"?
If it is so, the same trouble happened to me.
It seemed to me that some critical timing happened when executing  
ericsson_init_hw() in btd.c .

To solve the problem, I inserted usleep() like shown below.
I'm not sure and I want to know if it is the proper way. 
But it is working well now. Any advises are welcome.

Hiro Okura
--------------------------------------------------------------------------



(From ericsson_init_hw() of openbt-0.0.5 )
                     :
                     :
  sleep(1); // wait for HW... 
  printf("Setting baudrate in Ericsson module!\n");  
  if (ioctl(bt_cfd, HCISETBAUDRATE, &spd) < 0)
  {
    perror("HCISETBAUDRATE");
    exit(1);
  }
  /* ================= added  begin================== */
  usleep(10000); 
  /* ================= added end   ================== */
#else  
  printf("Setting write_scan_enable in Ericsson module!\n");
  hci_write_scan_enable(PAGE_SCAN_ENABLE|INQUIRY_SCAN_ENABLE);  
  sleep(1); /* wait for HW... */
                      :
                      :
   


-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com