From 46f277ae9670c63525b590295b2f39c824c2465b Mon Sep 17 00:00:00 2001 From: Geovane Fedrecheski Date: Mon, 28 Oct 2024 16:07:42 +0100 Subject: [PATCH] example: improve nrf readme on multiple probes --- examples/lakers-nrf52840/README.md | 8 ++++---- examples/lakers-nrf52840/src/bin/responder.rs | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/lakers-nrf52840/README.md b/examples/lakers-nrf52840/README.md index bb5cc547..4b19b675 100644 --- a/examples/lakers-nrf52840/README.md +++ b/examples/lakers-nrf52840/README.md @@ -14,12 +14,12 @@ The example is configured to be ran on nRF52840-DK board. This folder's `.cargo/config.toml` configures the target (`thumbv7m-none-eabi`) and the probe-rs runner so the things should just work: - cargo run --bin initiator - cargo run --bin responder + cargo run --bin initiator -- --probe 1366:1015:000683965284 + cargo run --bin responder -- --probe 1366:1051:001050286964 -You may want to prefix the commands above with e.g. PROBE_RS_PROBE=1366:1051:001050288491 in order to specify which board you want to connect to. +Note that if there are two boards connected to your computer, we need to specify which one we want to use. You can get the name of your probes by running: probe-rs list -You can enhance debugging by passing environment variables such as `DEFMT_LOG=trace`." \ No newline at end of file +You can enhance debugging by passing environment variables such as `DEFMT_LOG=trace`." diff --git a/examples/lakers-nrf52840/src/bin/responder.rs b/examples/lakers-nrf52840/src/bin/responder.rs index 2c086bae..9463364f 100644 --- a/examples/lakers-nrf52840/src/bin/responder.rs +++ b/examples/lakers-nrf52840/src/bin/responder.rs @@ -60,6 +60,8 @@ async fn main(spawner: Spawner) { mbedtls_memory_buffer_alloc_init(buffer.as_mut_ptr(), buffer.len()); } + info!("Responder started, will wait for messages"); + loop { let mut buffer: [u8; MAX_PDU] = [0x00u8; MAX_PDU]; let mut c_r: Option = None;