stop_exmimo2 1.69 KB
Newer Older
Rohit Gupta's avatar
Rohit Gupta committed
1
#!/bin/bash
2 3 4 5 6
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements.  See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
7
# * the OAI Public License, Version 1.1  (the "License"); you may not use this file
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# *      http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# *      contact@openairinterface.org
# */

# \author Navid Nikaein, Rohit Gupta
Rohit Gupta's avatar
Rohit Gupta committed
24 25 26 27 28 29 30

echo "This script stops exmimo2 as it might be transmitting signal by itself if lte-softmodem terminates incorrectly"

if [ "$OPENAIR_DIR" == "" ]; then
  echo "Is the OPENAIR_DIR path set correctly? Exiting now"
  exit
fi
31
sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches'
Rohit Gupta's avatar
Rohit Gupta committed
32

33 34 35 36 37 38
exmimo_mod=`lsmod |grep openair_rf`
#load the module only if absent to avoid kernel crashes
if [ -z "$exmimo_mod" ]
then
  sudo -E $OPENAIR_DIR/cmake_targets/tools/init_exmimo2
fi
Rohit Gupta's avatar
Rohit Gupta committed
39 40 41

#now we stop the card from transmitting anything
cd $OPENAIR_DIR/targets/bin
42
sudo -E octave -H --no-gui $OPENAIR_DIR/cmake_targets/tools/exmimo_stop_octave.m
Rohit Gupta's avatar
Rohit Gupta committed
43