Forum: Haus & Smart Home ebus/RS232-Timing bei ebus/RS232-Konverter


von Tobias H. (thaustein)


Lesenswert?

Hallo!

Ich versuche seit längerem vergeblich, meine Vaillant-Gastherme mittels 
esera eBus Koppler RS232 und RS232-USB-Interface an einen Raspberry Pi 
zu koppeln. Mein Eindruck ist, dass meine Therme ein kaputtes Timing hat 
und es deshalb nicht funktioniert.

Auf dem Raspberry PI lasse ich den ebusd alle eingehenden Daten loggen:
1
> ebusd -f -c /tmp --logareas all --loglevel info --lograwdata=bytes -d /dev/ttyUSB0 
2
2017-12-16 12:36:30.204 [main notice] ebusd 3.0.595c7c0 started
3
2017-12-16 12:36:30.204 [main info] loading configuration files from /tmp
4
2017-12-16 12:36:30.205 [main info] reading dir  /tmp/pulse-PKdhtXMmr18n
5
2017-12-16 12:36:30.205 [main error] error reading config files: ERR: element not found, last error: 
6
2017-12-16 12:36:30.211 [bus notice] bus started with own address 31/36
7
2017-12-16 12:36:30.211 [bus notice] <15
8
2017-12-16 12:36:30.211 [bus notice] signal acquired
9
2017-12-16 12:36:30.211 [bus notice] <15
10
2017-12-16 12:36:30.211 [bus notice] <15
11
2017-12-16 12:36:30.211 [bus notice] <15
12
2017-12-16 12:36:30.211 [main info] registering data handlers
13
2017-12-16 12:36:30.211 [main info] registered data handlers
14
2017-12-16 12:36:30.211 [bus notice] <15
15
2017-12-16 12:36:30.211 [bus notice] <15
16
2017-12-16 12:36:30.211 [bus notice] <15
17
2017-12-16 12:36:30.211 [bus notice] <15
18
2017-12-16 12:36:30.211 [bus notice] <15
19
2017-12-16 12:36:30.211 [bus notice] <15
20
2017-12-16 12:36:30.211 [bus notice] <15
21
2017-12-16 12:36:30.211 [bus notice] <15
22
2017-12-16 12:36:30.211 [bus notice] <15
23
2017-12-16 12:36:30.212 [bus notice] <15
24
2017-12-16 12:36:30.212 [bus notice] <15
25
2017-12-16 12:36:30.212 [bus notice] <15
26
2017-12-16 12:36:30.212 [bus notice] <15
27
2017-12-16 12:36:30.212 [bus notice] <15
28
2017-12-16 12:36:30.212 [bus notice] <15

Mehr oder weniger das gleiche Ergebnis erhalte ich, wenn ich direkt per 
minicom die Bytes auf der Schnittstelle logge:
1
> minicom -b 2400 -D /dev/ttyUSB0 -H -w
2
3
Welcome to minicom 2.7
4
5
OPTIONS: I18n 
6
Compiled on May  7 2017, 05:18:49.
7
Port /dev/ttyUSB0, 12:33:49
8
9
Press CTRL-A Z for help on special keys                                                               
10
                                                                                                      
11
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 17 15 17 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 17 15 15 
12
15 15 15 1d 15 15 15 15 15 15 15 15 15 15 15 17 15 15 15 1d 15 15 15 15 15 15 15 15 15 15 17 15 15 15 15 15 15 17 15 15 15 15 15 15 15 15 15 17 15 15 15 15 15 15 15 17 15 15 15 15
13
 15 15 15 15 15 15 1d 15 15 15 15 17 15 1c 0d 15 1f 1f 1f 1b 15 15 15 15 15 15 17 15 15 1c 0c 0d 1a 03 15 15 15 15 15 15 15 15 15 15 1c 0d 1c 15 15 15 15 15 15 1d 15 15 15 1e 0d 
14
08 1a 0a 06 1d 15 1c 0d 18 15 15 11 0c 0d 11 1d 15 11 0d 0a 15 15 15 15 1d 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 1c 02 1f 15 1f 1f 08 1d 15 1c 0d 17 15 15 15 15 0d 
15
13 15 15 15 15 15 15 1d 15 15 15 15 1c 1e 0d 04 04 08 14 15 15 15 15 15 15 15 1d 15 17 1c 1f 0e 15 15 1d 15 15 15 1d 15 15 1d 15 1c 1e 06 15 15 15 15 15 15 15 15 15 17 1e 0d 08 09
16
 15 17 15 15 15 15 15 1d 15 15 15 15 15 15 15 15 1d 15 15 15 15 15 15 15 15 15 1d 15 15 15 15 15 15 15 1d 1f 15 15 15 15 15

Laut diversen Anleitungen in diversen Foren müsste aber regelmäßig der 
SYNC-Wert "aa" auf dem Bus ausgegeben werden, nicht "15". Am 
Einstellpoti des Buskopplers habe ich alle Stellungen ausprobiert, es 
ändert aber nichts.

Mit dem Oszilloskop habe ich folgendes Signal ausgemessen:
1
  8,8 V 
2
     +---------------------+        +----------+        +----------+         +----------+
3
     |                     |        |          |        |          |         |          |          
4
     |                     |        |          |        |          |         |          |          
5
     |                     |        |          |        |          |         |          |          
6
     |        880 us       | 360 us |  440 us  | 360 us |  460 us  | 380 us  |  460 us  |          
7
     |                     |        |          |        |          |         |          |          
8
     |                     |        |          |        |          |         |          |          
9
     |                     |        |          |        |          |         |          |          
10
-----+                     +--------+          +--------+          +---------+          +----------------
11
-10,4 V
12
13
     |   Start  |    0     |   1    |     0    |    1   |    0     |    1    |     0    |    1    | Stopp

Das Eingangssignal (ebus) ist invertiert und verwendet die Pegel 10,4 V 
und 19,4 V. Das RS232-Signal hat sehr steile Flanken, das Eingangssignal 
hat Flanken von ca. 30 us Länge. Diese langen Flanken machen sich im 
RS232-Timing als Abweichung vom Idealwert von 417 us (1 s / 2400 Baud) 
bemerkbar.

Wenn ich das Diagramm selbst interpretiere, komme ich auf die 
Interpretation hexadezimal aa. Insofern verstehe ich nicht, wieso der 
USB-RS232-Adapter (mehrere ausprobiert) auf hexadezimal 15 kommt. Die 
einzig plausible Erklärung ist für mich, dass die Abweichungen vom 
idealen Timing für die Fehlinterpretation sorgen.

Was übersehe ich? Kennt jemand das Problem? Ich konnte keinen Beitrag 
dazu finden.

Danke,

Tobias

von chris (Gast)


Lesenswert?

Ich lese beim Ozi 0xaa , das 1 hat immer die gleiche Polaritaet als das
Startbit.
Wenn dein Diagramm richtig ist, sind die Daten invertiert.
Also nach Max232 braucht es noch ein Inverter.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.