Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions bellows/ezsp/v14/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from . import commands, config
from ..v13 import EZSPv13

NULL_NODE_ID = 0xFFFF


class EZSPv14(EZSPv13):
"""EZSP Version 14 Protocol version handler."""
Expand Down Expand Up @@ -125,8 +127,8 @@ async def send_multicast(
aps_frame=aps_frame,
hops=radius,
broadcast_addr=t.BroadcastAddress.RX_ON_WHEN_IDLE,
alias=0x0000,
sequence=aps_frame.sequence,
alias=NULL_NODE_ID,
sequence=0x00, # NWK sequence, only used with an alias
message_tag=message_tag,
message=data,
)
Expand All @@ -142,10 +144,12 @@ async def send_broadcast(
aps_sequence: t.uint8_t,
data: bytes,
) -> tuple[t.sl_Status, t.uint8_t]:
# `aps_sequence` is not used

status, sequence = await self.sendBroadcast(
alias=0x0000,
alias=NULL_NODE_ID,
destination=address,
sequence=aps_sequence,
sequence=0x00, # NWK sequence, only used with an alias
aps_frame=aps_frame,
radius=radius,
message_tag=message_tag,
Expand Down
8 changes: 4 additions & 4 deletions tests/test_ezsp_v14.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ async def test_send_multicast(ezsp_f) -> None:
aps_frame=t.EmberApsFrame(sequence=0x34),
hops=12,
broadcast_addr=t.BroadcastAddress.RX_ON_WHEN_IDLE,
alias=0x0000,
sequence=0x34,
alias=0xFFFF,
sequence=0x00,
message_tag=0x0042,
message=b"hello",
)
Expand All @@ -276,9 +276,9 @@ async def test_send_broadcast(ezsp_f) -> None:
assert message_tag == 0x42
assert ezsp_f.sendBroadcast.mock_calls == [
call(
alias=0x0000,
alias=0xFFFF,
destination=t.BroadcastAddress.ALL_ROUTERS_AND_COORDINATOR,
sequence=34,
sequence=0x00,
aps_frame=t.EmberApsFrame(),
radius=12,
message_tag=0x42,
Expand Down
Loading