openwifi/user_space/slice_cfg.sh
2021-01-20 13:30:12 +01:00

31 lines
648 B
Bash
Executable File

#!/bin/bash
# SPDX-FileCopyrightText: 2019 Jiao Xianjun <putaoshu@msn.com>
# SPDX-License-Identifier: AGPL-3.0-or-later
if [ $# -ne 5 ]
then
echo "Please input slice_idx mac_addr cycle_period(us) start_time(us) end_time(us) as input parameter!"
exit
fi
set -x #echo on
slice_idx=$1
mac_addr=$2
cycle_period=$3
start_time=$4
end_time=$5
echo $slice_idx
echo $mac_addr
echo $cycle_period
echo $start_time
echo $end_time
./sdrctl dev sdr0 set addr$slice_idx $mac_addr
./sdrctl dev sdr0 set slice_total$slice_idx $cycle_period
./sdrctl dev sdr0 set slice_start$slice_idx $start_time
./sdrctl dev sdr0 set slice_end$slice_idx $end_time