Closed nklebedev closed 2 years ago
is the behaviour the same when using usb instead of wifi?
I've made an experiment with USB today and result is actually quite different! Heater was successfully detected as Vaillant;BAI00;0108;7503.
all wifi attempts to scan 08 look like:
...
2022-01-27 19:30:44.259 [bus info] scan 08 cmd: 3108070400
2022-01-27 19:30:44.294 [bus notice] <aa
2022-01-27 19:30:44.294 [bus debug] start request 31
2022-01-27 19:30:44.294 [bus debug] arbitration start with 31
2022-01-27 19:30:44.336 [bus notice] <aa
2022-01-27 19:30:44.383 [bus notice] <aa
2022-01-27 19:30:44.390 [bus notice] >31
2022-01-27 19:30:44.390 [bus notice] <31
2022-01-27 19:30:44.390 [bus debug] arbitration won
2022-01-27 19:30:44.390 [bus debug] arbitration delay 6 micros
2022-01-27 19:30:44.390 [bus debug] switching from ready to send command
2022-01-27 19:30:44.390 [bus notice] >08
2022-01-27 19:30:44.434 [bus notice] <aa
2022-01-27 19:30:44.434 [bus debug] notify request: ERR: SYN received
2022-01-27 19:30:44.434 [bus debug] ERR: SYN received during send command, switching to ready
2022-01-27 19:30:44.434 [bus notice] <08
2022-01-27 19:30:44.434 [main error] scan config 08: ERR: SYN received
2022-01-27 19:30:44.474 [bus notice] <aa
2022-01-27 19:30:44.474 [bus debug] ERR: SYN received during receive command, switching to ready
2022-01-27 19:30:44.516 [bus notice] <aa
2022-01-27 19:30:44.554 [bus notice] <aa
2022-01-27 19:30:44.614 [bus notice] <aa
...
and USB:
...
2022-01-27 08:45:22.424 [bus info] scan 08 cmd: 3108070400
2022-01-27 08:45:22.447 [bus notice] <aa
2022-01-27 08:45:22.449 [bus debug] start request 31
2022-01-27 08:45:22.449 [bus debug] arbitration start with 31
2022-01-27 08:45:22.490 [bus notice] <aa
2022-01-27 08:45:22.498 [bus notice] >31
2022-01-27 08:45:22.498 [bus notice] <31
2022-01-27 08:45:22.498 [bus debug] arbitration won
2022-01-27 08:45:22.498 [bus debug] arbitration delay 3691 micros
2022-01-27 08:45:22.498 [bus info] arbitration delay 3691 - 4435 micros
2022-01-27 08:45:22.498 [bus debug] switching from ready to send command
2022-01-27 08:45:22.506 [bus notice] >08
2022-01-27 08:45:22.521 [bus notice] <08
2022-01-27 08:45:22.521 [bus debug] send/receive symbol latency 15 ms
2022-01-27 08:45:22.531 [bus notice] >07
2022-01-27 08:45:22.546 [bus notice] <07
2022-01-27 08:45:22.546 [bus debug] send/receive symbol latency 15 ms
2022-01-27 08:45:22.555 [bus notice] >04
2022-01-27 08:45:22.570 [bus notice] <04
2022-01-27 08:45:22.570 [bus debug] send/receive symbol latency 15 ms
2022-01-27 08:45:22.578 [bus notice] >00
2022-01-27 08:45:22.593 [bus notice] <00
2022-01-27 08:45:22.593 [bus debug] send/receive symbol latency 15 ms
2022-01-27 08:45:22.594 [bus debug] switching from send command to send command CRC
2022-01-27 08:45:22.601 [bus notice] >d1
2022-01-27 08:45:22.618 [bus notice] <d1
2022-01-27 08:45:22.618 [bus debug] send/receive symbol latency 16 ms
2022-01-27 08:45:22.618 [bus debug] switching from send command CRC to receive command ACK
2022-01-27 08:45:22.626 [bus notice] <00
2022-01-27 08:45:22.626 [bus debug] switching from receive command ACK to receive response
2022-01-27 08:45:22.631 [bus notice] <0a
2022-01-27 08:45:22.637 [bus notice] <b5
2022-01-27 08:45:22.642 [bus notice] <42
2022-01-27 08:45:22.646 [bus notice] <41
2022-01-27 08:45:22.651 [bus notice] <49
2022-01-27 08:45:22.655 [bus notice] <30
2022-01-27 08:45:22.659 [bus notice] <30
2022-01-27 08:45:22.663 [bus notice] <01
2022-01-27 08:45:22.667 [bus notice] <08
2022-01-27 08:45:22.671 [bus notice] <75
2022-01-27 08:45:22.679 [bus notice] <03
2022-01-27 08:45:22.679 [bus debug] switching from receive response to receive response CRC
2022-01-27 08:45:22.688 [bus notice] <ae
2022-01-27 08:45:22.688 [bus debug] switching from receive response CRC to send response ACK
2022-01-27 08:45:22.696 [bus notice] >00
2022-01-27 08:45:22.711 [bus notice] <00
2022-01-27 08:45:22.711 [bus debug] send/receive symbol latency 14 ms
2022-01-27 08:45:22.711 [bus info] send/receive symbol latency 14 - 16 ms
2022-01-27 08:45:22.711 [update info] sent MS cmd: 3108070400 / 0ab5424149303001087503
...
It is noteworthy that USB attempts have an arbitration delay of several thousand microseconds, unlike wifi, where delays are several microseconds.
please post ebusd-esp configuration and cmdline with which ebusd is started in both variants
hi, John, thank you for the response!
adapter configuration:
Max packet size: 256
Device ID: 30b0 (PIC16F15356)
Blocksize erase: 32
Blocksize write: 32
User ID 1: ff
User ID 2: ff
User ID 3: ff
User ID 4: ff
User ID:
0000: ff 3f ff 14 ff 3f ff 3f
Rev ID, Device ID:
0005: 02 20 b0 30
Device revision: 0.2
Configuration words:
0007: ec 3f ff 3f bf 3f f6 3c ff 3f
MUI:
0100: 22 01 94 31 01 51 43 10
0108: 40
EUI:
010a: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f
TSHR2: 585
FVRA2X: 2048
FVRC2X: 2050
Flash:
Bootloader version: 1 [0a6c]
Firmware version: 1 [554f]
MAC address: ae:b0:53:43:10:40
IP address: DHCP
Arbitration delay: 200 us
command line wifi:
ebusd --scanconfig -d enh:10.64.100.12:9999 --lograwdata=bytes --loglevel=debug
command line USB:
ebusd --scanconfig -d enh:/dev/ttyUSB0 --lograwdata=bytes --loglevel=debug
I did some more experiments this weekend and the problem seems to became clearer.
Actually I have the following scheme:
ebusd and adapter are located on the same network but separated by a VPN tunnel. There is a ping delay around 100-150 milliseconds between them.
If I place ebusd and adapter on the same physical network, the extra SYN is gone and everything works much better:
2022-01-27 19:30:44.390 [bus notice] >31
2022-01-27 19:30:44.390 [bus notice] <31
2022-01-27 19:30:44.390 [bus debug] arbitration won
2022-01-27 19:30:44.390 [bus debug] arbitration delay 6 micros
2022-01-27 19:30:44.390 [bus debug] switching from ready to send command
2022-01-27 19:30:44.390 [bus notice] >08
2022-01-27 19:30:44.434 [bus notice] <aa <---------------------------- this out of order SYN is gone
2022-01-27 19:30:44.434 [bus debug] notify request: ERR: SYN received
you can't run ebus traffic with 100ms latency as this violates the protocol. think about placing a raspberry or something else running ebusd in the net where the ebus is
I'm trying to connect adapter v3 with Vaillant heater (the only device on eBUS) with no success. I'm using official adapter with wemos D1 mini and pretty sure that the hardware (jumpers, wires) is set correctly.
The content of the debug log (with raw data) is always like this:
It shows scan attempts that always end with "ERR: SYN received".