Skip to content

Feature/bvll router discovery#6

Open
acedrew wants to merge 2 commits intojscott3201:mainfrom
ACE-IoT-Solutions:feature/bvll-router-discovery
Open

Feature/bvll router discovery#6
acedrew wants to merge 2 commits intojscott3201:mainfrom
ACE-IoT-Solutions:feature/bvll-router-discovery

Conversation

@acedrew
Copy link
Copy Markdown

@acedrew acedrew commented Mar 21, 2026

Summary

  • Network-layer message channel: NetworkLayer now optionally forwards network messages (I-Am-Router-To-Network, Who-Is-Router, etc.) via a broadcast channel instead of silently dropping them. Opt-in via network_messages() before start().
  • BBMD table reads: read_bdt() and read_fdt() exposed through AnyTransport and BACnetClient, allowing inspection of BBMD Broadcast Distribution Tables and Foreign Device Tables.
  • Router discovery: who_is_router_to_network() broadcasts the request and collects I-Am-Router-To-Network responses for a configurable duration, returning structured RouterInfo results.
  • Python bindings: New BdtEntry, FdtEntry, and RouterInfo types with full type stubs. All three new client methods are available from Python.
  • Example: examples/python/bbmd_scanner.py demonstrates scanning for BBMDs and discovering routers on a live network.
  • Integration test: Containerized bvll-test binary + Dockerfile for testing against a live multi-building campus network.

Test results

Validated against a podman-based campus network with two buildings, two BBMDs (bacpypes3-based ACL BBMDs), a cross-subnet router, and HVAC simulators:

Test Result Notes
cargo check ✅ Pass All crates compile
cargo test ✅ Pass All existing tests green
Read BDT from BBMD ✅ Pass 2 entries returned — both BBMDs (10.1.0.2, 10.2.0.2) with correct subnet masks
Read FDT from BBMD ✅ Pass 0 entries — expected, no foreign devices registered
Who-Is-Router-To-Network ✅ Pass No routers on BIP subnet (simulator uses bacpypes3 virtual networks internally)
Who-Is-Router(net=1001) ✅ Pass Correctly returns empty when network is handled internally

Campus network topology

Building 1 (10.1.0.0/24)          Building 2 (10.2.0.0/24)
├── BBMD1      10.1.0.2  ◄──BDT──► BBMD2      10.2.0.2
├── Simulator  10.1.0.10           ├── Simulator  10.2.0.10
└── Router     10.1.0.254 ────────── Router     10.2.0.254

Test plan

  • cargo check passes
  • cargo test passes
  • Container integration test against live campus network (BDT, FDT, router discovery)
  • Verify Python bindings via maturin develop and example script

🤖 Generated with Claude Code

acedrew and others added 2 commits March 20, 2026 11:12
Expose BBMD Broadcast Distribution Table (BDT) and Foreign Device Table
(FDT) read operations, plus Who-Is-Router-To-Network discovery through
all layers: transport, network, client, and Python bindings.

- NetworkLayer now supports broadcast channel for network-layer messages
  (I-Am-Router-To-Network, etc.) instead of silently dropping them
- AnyTransport delegates read_bdt/read_fdt to BIP transport
- BACnetClient gains who_is_router_to_network(), read_bdt(), read_fdt()
- Python bindings add BdtEntry, FdtEntry, RouterInfo types
- Example script demonstrates BBMD scanning and router discovery

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a bvll-test binary and Dockerfile that exercises read_bdt,
read_fdt, and who_is_router_to_network against a live multi-building
BACnet campus with two BBMDs and a router. Validated on the
hvacnetwork_building1 podman network:

  - Read BDT: OK (2 entries — both BBMDs listed with correct masks)
  - Read FDT: OK (0 entries — expected, no foreign devices registered)
  - Who-Is-Router-To-Network: OK (no routers on BIP subnet; simulator
    handles routing internally via bacpypes3 virtual networks)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jscott3201
Copy link
Copy Markdown
Owner

I just saw this. I'm merging a bunch of fixes into dev and will probably push those to main. Let me see where these changes stand after those get into the dev branch. These might have been picked up in the pass I did last night.

@jscott3201 jscott3201 self-requested a review March 21, 2026 18:29
@jscott3201 jscott3201 self-assigned this Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants