From 825d342f5e8c811ab87f6a7066557e095d6b7529 Mon Sep 17 00:00:00 2001 From: Mikhail Antropov Date: Thu, 5 May 2022 14:43:51 +0300 Subject: [PATCH] Add a description of the steps for running the b-ss profile under qemu --- zephyr/samples/profiles/b-ss/README.rst | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/zephyr/samples/profiles/b-ss/README.rst b/zephyr/samples/profiles/b-ss/README.rst index 8c2cb16a..f252a052 100644 --- a/zephyr/samples/profiles/b-ss/README.rst +++ b/zephyr/samples/profiles/b-ss/README.rst @@ -21,3 +21,36 @@ This sample can be found under :bacnet_file:`samples/profiles/b-ss` in the BACnet tree. The sample can be built for several platforms. + + +QEMU testing +************ + +The main logic of work can be found at the link +https://docs.zephyrproject.org/3.0.0/guides/networking/qemu_setup.html + +Steps to testing +1 Load and make net-tools: + git clone https://github.com/zephyrproject-rtos/net-tools + cd net-tools + make +2 Run net-tools loops in two termitals: + first: cd ~/net-tools && ./loop-socat.sh + second: cd ~/net-tools && sudo ./loop-slip-tap.sh +3 Configure prj.conf + The net-tools creates and uses network 192.0.2.0/24 as `tap0` interface. + Need change prj.conf: + CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1" + CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2" +4 Set BACNET_IFACE to tap0: + export BACNET_IFACE=tap0 +5 Compile and run b-ss profile: + west build -b qemu_x86 -p always -t run bacnet-stack/zephyr/samples/profiles/b-ss/ +6 Run bacnet-stack app tools as a test tool, like readprop: + bacnet-stack/apps/readprop/bacrp --mac 192.0.2.1:47808 55 17 1 77 + here: + 17 - OBJECT_SCHEDULE + 1 - schedule index + 77 - PROP_OBJECT_NAME + expected result - string: + "SCHEDULE 1"