expansion/gw16146: GW16146.sh

File GW16146.sh, 855 bytes (added by Cale Collins, 13 months ago)

GW16145 configuration script

Line 
1#!/bin/bash
2
3BUSNO=$(for i in $(ls /sys/class/spi_master/); do if [ "$(basename $(readlink /sys/class/spi_master/$i/device))" == "spi-ft232h.0" ]; then echo $i | sed 's/[^0-9]*//g'; fi; done)
4
5
6echo "Device is attached to bus number:" $BUSNO
7
8sleep 3
9
10modprobe nrc fw_name=nrc7292_cspi.bin bd_name=nrc7292_bd.dat spi_bus_num=$BUSNO spi_polling_interval=5 hifspeed=30000000
11
12echo "Module loaded..."
13
14sleep 1
15
16echo "Please wait..."
17
18sleep 1.5m
19
20WLAN="$(for i in $(ls -d /sys/class/net/wlan* 2>/dev/null); do if [ "$(basename $(readlink $i/device))" == "nrc80211" ]; then basename $i; fi; done)"
21
22sleep 1.5m
23
24echo "Brining up interface:" $WLAN
25
26ifconfig $WLAN up
27
28sleep 3
29
30echo "configuring..."
31
32cli_app set bdf_use on
33
34sleep 1
35cli_app set maxagg 1 8
36sleep 1
37cli_app set maxagg 1 on
38sleep 1
39cli_app set gi long
40sleep 1
41cli_app set cal_use on
42
43echo "Done."
44