summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2019-05-23 22:47:29 +0200
committerBjørn Mork <bjorn@mork.no>2019-05-23 22:47:29 +0200
commit13595f045002720966f1cdc8b7412476ec6b6fe5 (patch)
tree5f10bc8a425e9eb081f3fe955c7da7eb14f5a2d0
parent2f20e4866efdb9d2a0b48b41317e6df409a12dda (diff)
set serial port speed to 2400 bps
Signed-off-by: Bjørn Mork <bjorn@mork.no>
-rw-r--r--doc/README.md2
-rw-r--r--obinsectd.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/doc/README.md b/doc/README.md
index def733e..ad44bce 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -83,7 +83,7 @@ address field is restricted to be one, two or four bytes long.
### COSEM decoding
-See EC 62056-7-5:2017 Annex G.1 "xDLMS APDUs used (without protection
+See IEC 62056-7-5:2017 Annex G.1 "xDLMS APDUs used (without protection
and without general-block-transfer)" for the application protocol with
examples.
diff --git a/obinsectd.c b/obinsectd.c
index 2b9e2be..9688f3c 100644
--- a/obinsectd.c
+++ b/obinsectd.c
@@ -124,6 +124,7 @@ static int serial_open(const char *dev)
if (fd > 0) {
tcgetattr(fd, &terminal_data);
cfmakeraw(&terminal_data);
+ cfsetspeed(&terminal_data, B2400); // 2400 8N1
tcsetattr(fd, TCSANOW, &terminal_data);
}
debug("opened %s\n", dev);