projects
/
profile
/
ivi
/
can-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9cdc9d
)
slcan_attach: 'close' the slcan adapter before setting a bitrate
author
Oliver Hartkopp
<socketcan@hartkopp.net>
Sun, 9 Jan 2011 11:35:03 +0000
(11:35 +0000)
committer
Oliver Hartkopp
<socketcan@hartkopp.net>
Sun, 9 Jan 2011 11:35:03 +0000
(11:35 +0000)
As investigated by Thorsten Godau the bitrate can only be set after the
slcan adapter is in 'close' state.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Thorsten Godau <dl9sec@gmx.net>
slcan_attach.c
patch
|
blob
|
history
diff --git
a/slcan_attach.c
b/slcan_attach.c
index
4a91ba0
..
147ec6b
100644
(file)
--- a/
slcan_attach.c
+++ b/
slcan_attach.c
@@
-150,12
+150,12
@@
int main(int argc, char **argv)
if (waitkey || !detach) {
if (speed) {
- sprintf(buf, "S%s\r", speed);
+ sprintf(buf, "
C\r
S%s\r", speed);
write(fd, buf, strlen(buf));
}
if (btr) {
- sprintf(buf, "s%s\r", btr);
+ sprintf(buf, "
C\r
s%s\r", btr);
write(fd, buf, strlen(buf));
}