|
From: Alain P. <apa...@us...> - 2002-08-19 15:18:59
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
btinit.c 1.24 1.25=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Because the DTR signal is automatically set to 0 when we open the serial po=
rt, it was stupid to suppose that the module could be reseted when DTR is o=
n 0. So I assume that DTR should be to 1 for reseting the module.
The diff of the modified file(s):
--- btinit.c 16 Aug 2002 15:23:01 -0000 1.24
+++ btinit.c 19 Aug 2002 15:18:57 -0000 1.25
@@ -158,19 +158,19 @@
if (ioctl (phys_fd, TIOCMGET, &iosettings) !=3D 0) {
fprintf(stderr, "btinit : Error for ioctl TIOCMGET\n");
}
- printf("Set DTR to 1\n");
- iosettings &=3D ~TIOCM_DTR;
+ printf("Set DTR to 1\n"); /* Output of PC */
+ iosettings |=3D TIOCM_DTR;
if (ioctl (phys_fd, TIOCMSET, &iosettings) !=3D 0) {
fprintf(stderr, "btinit : Error for ioctl TIOCMSET\n");
}
usleep(500000);=09
printf("Set DTR to 0\n");
- iosettings |=3D TIOCM_DTR;
+ iosettings &=3D ~TIOCM_DTR;
ioctl (phys_fd, TIOCMSET, &iosettings);
=20
usleep(200000); /*Sleep 200 ms for reset*/
printf("Set DTR to 1 again\n");
- iosettings &=3D ~TIOCM_DTR;
+ iosettings |=3D TIOCM_DTR;
ioctl (phys_fd, TIOCMSET, &iosettings);
=20
D(syslogprintf("btinit : DTR set to HIGH\n"));
|