Skip to content

Receiving other DALI traffic #24

@sde1000

Description

@sde1000

At the moment daliserver sends network messages when it receives information about 16-bit forward frames observed on the bus from the DALI USB device (packets starting 0x11 0x73), but doesn't send any information about backward frames.

The DALI USB device does also report backward frames it observes, in packets starting 0x11 0x72:

      9 227.191712     1.10.1      host        117300000000ffff00 Received DAPC(0) for A0
     11 273.176066     1.10.1      host        117300000080ffff00 Received DAPC(0x80) for A0
     13 327.736250     1.10.1      host        117300000280ffff00 Received DAPC(0x80) for A1
     15 329.848232     1.10.1      host        117300000280622c00 Received DAPC(0x80) for A1
     17 332.344191     1.10.1      host        117300000200744a00 Received DAPC(0) for A1
     19 439.993644     1.10.1      host        1173000003a0ffff00 Received QUERY ACTUAL LEVEL for A1
     21 440.005665     1.10.1      host        117200000000003e00 Received reply 0
     39 527.888602     host        1.10.2      120100030000ff0600 Send broadcast RECALL MIN LEVEL
     41 527.906402     1.10.1      host        12730000ff06ffff01 ... transmission report
     43 527.917386     1.10.1      host        127100000000008a01 ... no response
     45 561.337931     1.10.1      host        1173000003a0ffff00 Received QUERY ACTUAL LEVEL for A1
     47 561.350888     1.10.1      host        117200000001003d00 Received reply 0x01
     49 613.562179     1.10.1      host        1173000003a0ffff00 Received QUERY ACTUAL LEVEL for A1
     51 613.575177     1.10.1      host        117200000001003e00 Received reply 0x01
     53 640.250805     1.10.1      host        1173000005a0ffff00 Received QUERY ACTUAL LEVEL for A2
     55 640.265802     1.10.1      host        117200000055005c00 Received reply 0x55
     57 657.082566     1.10.1      host        1173000005a0ffff00 Received QUERY ACTUAL LEVEL for A2
     59 657.097562     1.10.1      host        117200000055005b00 Received reply 0x55
     69 1118.068048    host        1.10.2      120200030000ff0000 Send broadcast OFF
     71 1118.085960    1.10.1      host        12730000ff00ffff02 ... transmission report
     73 1118.096959    1.10.1      host        127100000000008a02 ... no response
     75 1118.393445    host        1.10.2      120300030000ff0000 Send broadcast OFF
     77 1118.411935    1.10.1      host        12730000ff000e9703 ... transmission report
     79 1118.422954    1.10.1      host        127100000000008a03 ... no response
    105 3158.917796    1.10.1      host        117700000005ffff00 DSI mode (briefly shorting the bus)
    107 3159.023810    1.10.1      host        117700000006006100 DALI mode
    109 3159.553784    1.10.1      host        11770000000518b900 DSI mode
    111 3159.683781    1.10.1      host        117700000006006100 DALI mode
    113 3182.744513    1.10.1      host        117700000005ffff00 DSI mode
    115 3182.836474    1.10.1      host        117700000006006100 DALI mode
    117 3182.915486    1.10.1      host        11770000000503a900 DSI mode
    119 3183.028523    1.10.1      host        117700000006006100 DALI mode

Notice what's happening in bytes 6–7 of the responses. Most of the forward frames have 0xffff here, but some of them don't (eg. 0x622c in packet 15). Most of the response frames have low numbers here; in particular, "no response" always has 0x008a, and "response" always has a number below 0x008a (eg. 0x003d or 0x003e for A1, 0x005c or 0x005b for A2).

I believe this field represents the length of time since the previous bus activity, in units of 100µs; 0x8a translates to 13.8ms. Table 20 of IEC62386-101 states that the minimum settling time between forward frame and backward frame for a frame not to be interpreted as a backward frame is 13.4ms. I'm not sure exactly when it starts counting; it could be allowing a half-bit time (400µs) with no transition to recognise that the transmitter has stopped.

Let's check by having a look at the transmission reports during a transaction (see issue #22):

      9 3.950105       host        1.10.2      125530030000ff2c55 DTR0=0x55 followed by SET SYSTEM FAILURE LEVEL (DTR0) (twice)
     11 3.967897       1.10.1      host        12730000a355ffff55 ... A355 (DTR0=0x55) transmission report 
     13 3.993899       1.10.1      host        12730000ff2c009155 ... FF2C (SET SYSTEM FAILURE LEVEL) transmission report
     15 4.020910       1.10.1      host        12730000ff2c009155 ... FF2C (SET SYSTEM FAILURE LEVEL) transmission report (again)
     17 4.030894       1.10.1      host        127100000000008a55 ... no response

0x0091 is 14.5ms. Table 17 of IEC62386-101 gives the minimum settling time between send-twice forward frames as 13.5ms and the maximum as 75.0ms, so 0x0091 is comfortably within this range.

What about the times observed for backward responses from the two DALI devices I've been experimenting with? A1 in the above examples is a LTECH LED driver, A2 is a Tridonic EM powerLED PRO DIM C. 0x003d is 6.1ms, 0x5b is 9.1ms. Table 17 gives the minimum settling time between a forward frame and the start of transmission of a backward frame as 5.5ms and the maximum time as 10.5, so both times are within the range.

I don't know what the DALI USB does when it observes an 8-bit frame that does not start within 13.4ms of the end of a forward frame; I don't have any equipment that will generate one to test! It might do nothing, or it might send a type 0x72 packet. To be on the safe side, we should probably check that the time field is less than 0x8a for all packets of type 0x72.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions