|
From: Mattias A. <mat...@us...> - 2001-04-25 18:01:59
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_vendor.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* readded 10 ms sleep after setting baud rate for ericsson
* fixed using the inpar when setting write scan enable
* added bt_write_pagescan_activity for CSR HW (using default values)
* minor changes
The diff of the modified file(s):
--- bt_vendor.c 2001/04/20 16:11:35 1.9
+++ bt_vendor.c 2001/04/25 18:01:57 1.10
@@ -192,7 +192,9 @@
void
ericsson_init_hw(int bt_cfd, int phys_fd, int spd)
{
- bt_write_scan_enable(bt_cfd, 0 /* inpars not used */);
+ unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
+
+ bt_write_scan_enable(bt_cfd, wrscan);
=20
sleep(1);
=20
@@ -201,8 +203,9 @@
=20
sleep(1); // wait for HW...
=20
- printf("Setting baudrate in Ericsson module!\n");=20=20
+ syslog(LOG_INFO, "Setting baudrate in Ericsson module!\n");=20=20
bt_set_baudrate(bt_cfd, spd);
+ usleep(10000);
=20=20=20
/* Now set phys device speed to whatever HW was set to use */
fd_setup(phys_fd, spd, USE_FLOW_CTRL);
@@ -300,6 +303,14 @@
printf("Setting write_scan_enable in USB module!\n");
=20
bt_write_scan_enable(bt_cfd, wrscan);
+=20=20
+ /* improves reliability when doing a connect */
+ printf("Setting write_pagescan_activity in CSR module!\n");
+
+ bt_write_pagescan_activity(bt_cfd, 0x8000, 0x12);
+
+ sleep(1);
+
bt_set_event_filter(bt_cfd, 0 /* inpars not used */);
}
=20
|