diff --git a/rpi/compose.yml b/rpi/compose.yml index bf027212..b2292ac4 100644 --- a/rpi/compose.yml +++ b/rpi/compose.yml @@ -1,20 +1,6 @@ version: "3.8" services: - otbr: - image: openthread/border-router - container_name: otbr - network_mode: "host" - restart: always - cap_add: - - NET_ADMIN - devices: - - /dev/ttyUSB0:/dev/ttyACM0 - - /dev/net/tun:/dev/net/tun - volumes: - - /var/lib/otbr:/data - env_file: - - otbr-env.list mosquitto: image: eclipse-mosquitto:latest diff --git a/rpi/deploy.sh b/rpi/deploy.sh index 22c4d2ab..c354a8ec 100644 --- a/rpi/deploy.sh +++ b/rpi/deploy.sh @@ -1,6 +1,8 @@ #!/bin/sh git pull +docker stop otbr +docker rm otbr docker compose down if [ "$1" != "preserve" ]; then @@ -9,5 +11,7 @@ fi docker compose up -d --force-recreate +docker run --name=otbr --detach --network=host --cap-add=NET_ADMIN --device=/dev/ttyUSB0:/dev/ttyACM0 --device=/dev/net/tun --volume=/var/lib/otbr:/data --env-file=./otbr-env.list --restart=always openthread/border-router + source ./bin/activate -python3 ./main.py \ No newline at end of file +python3 ./main.py diff --git a/rpi/otbr-env.list b/rpi/otbr-env.list index 7b9d42fe..db3b7e66 100644 --- a/rpi/otbr-env.list +++ b/rpi/otbr-env.list @@ -1,4 +1,4 @@ -OT_RCP_DEVICE=spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=1000000 +OT_RCP_DEVICE=spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=460800 OT_INFRA_IF=wlan0 OT_THREAD_IF=wpan0 -OT_LOG_LEVEL=7 \ No newline at end of file +OT_LOG_LEVEL=7