From 47075ebb6c10d0bfabce118a9d8b53bb9a0604db Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 14 Jul 2018 01:52:28 +0200 Subject: [PATCH] Fix: Initialize the device to have signals reported Signed-off-by: Knut Ahlers --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index 4100abc..bc42a4c 100644 --- a/main.go +++ b/main.go @@ -61,6 +61,13 @@ func main() { // Make sure to close it later. defer port.Close() + // Send initialization for the CUL + // TODO: This might be useful to be configurable? + fmt.Fprintln(port, "X21") // Turn on echoing of received messages + fmt.Fprintln(port, "Ax") // reset AskSin + fmt.Fprintln(port, "Zx") // reset Moritz + fmt.Fprintln(port, "brx") // reset WMBus + for { scanner := bufio.NewScanner(port) for scanner.Scan() {