Skip to content

Help with addressing devices. #148

Answered by sde1000
0Zeyrox0 asked this question in Q&A
May 14, 2025 · 4 comments · 9 replies
Discussion options

You must be logged in to vote

Aha. I've realised what it is! My advice at the start of the discussion was not actually correct.

The comment for SetShortAddress() says the following:

class SetShortAddress(_StandardCommand):
    """Save the value in DTR0 as the new short address.

    The DTR must contain either:
    - (address<<1)|1 (i.e. 0AAAAAA1) to set a short address
    - 255 (i.e. 11111111) to remove the short address
    """
    _cmdval = 0x80
    uses_dtr0 = True
    sendtwice = True

So instead of sending DTR0(new_address) you should be sending DTR0((new_address << 1) | 1)

Apologies for the bad advice.

Replies: 4 comments 9 replies

Comment options

You must be logged in to vote
2 replies
@0Zeyrox0
Comment options

@0Zeyrox0
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@0Zeyrox0
Comment options

Comment options

You must be logged in to vote
6 replies
@sde1000
Comment options

@0Zeyrox0
Comment options

@sde1000
Comment options

Answer selected by 0Zeyrox0
@0Zeyrox0
Comment options

@sde1000
Comment options

@0Zeyrox0
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants