Site Tools


Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum". upgrade now! [54.2] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
Hotfix release available: 2018-04-22a "Greebo". upgrade now! [50.1] (what's this?)
New release available: 2018-04-22 "Greebo". upgrade now! [50] (what's this?)
Hotfix release available: 2017-02-19g "Frusterick Manners". upgrade now! [49.7] (what's this?)
Hotfix release available: 2017-02-19f "Frusterick Manners". upgrade now! [49.6] (what's this?)
Hotfix release available: 2017-02-19e "Frusterick Manners". upgrade now! [49.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2017-02-19d "Frusterick Manners". upgrade now! [49.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2017-02-19c "Frusterick Manners". upgrade now! [49.3] (what's this?)
pan:slave_operation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
pan:slave_operation [2017/11/08 12:24]
1.241.172.144
pan:slave_operation [2017/11/08 12:29] (current)
1.241.172.144
Line 568: Line 568:
 </​code>​ </​code>​
  
 +/​etc/​network/​interfaces
  
 <​code>​ <​code>​
 +auto lo
 +iface lo inet loopback
 </​code>​ </​code>​
 +
 +/​etc/​init.d/​S40network
 +
 <​code>​ <​code>​
 +#!/bin/sh
 +#
 +# Start the network....
 +#
 +
 +# Debian ifupdown needs the /​run/​network lock directory
 +mkdir -p /​run/​network
 +
 +case "​$1"​ in
 +  start)
 + printf "​Starting network: "
 + /​usr/​sbin/​inetd
 + [ $? = 0 ] && echo "inetd OK" || echo "inetd FAIL"
 + /sbin/ifup -a
 + [ $? = 0 ] && echo "ifup OK" || echo "ifup FAIL"
 + ;;
 +  stop)
 + printf "​Stopping network: "
 + /​sbin/​ifdown -a
 + [ $? = 0 ] && echo "​OK"​ || echo "​FAIL"​
 + ;;
 +  restart|reload)
 + "​$0"​ stop
 + "​$0"​ start
 + ;;
 +  *)
 + echo "​Usage:​ $0 {start|stop|restart}"​
 + exit 1
 +esac
 +
 +exit $?
 +
 </​code>​ </​code>​
 +
 +/​etc/​init.d/​S60blueZ
 +
 <​code>​ <​code>​
 +#!/bin/sh
 +#
 +# Start the BlueZ....
 +#
 +
 +# Debian ifupdown needs the /​run/​network lock directory
 +
 +BT_pskey() {
 + echo "BT Module : set PSKEY..."​
 + count=0
 + while [ ${count} -le 5 ]; do
 +#​ /​usr/​sbin/​bccmd -t bcsp -d /dev/ttyS4 -b 115200 psload -r /​root/​my.psr
 + /​root/​bccmd -t bcsp -d /dev/ttyS4 -b 115200 psload -r /​root/​my.psr
 + if [ $? = 0 ]; then
 + count=10
 + echo "BT Module : set PSKEY - OK"
 + else
 + echo "BT Module : set PSKEY - FAIL"
 + sleep 0.5
 + fi
 + count=$(( ${count}+1 ))
 + done
 +}
 +
 +BT_attach() {
 + echo "BT Module : Attach"​
 + count=0
 + while [ ${count} -le 5 ]; do
 + /​usr/​sbin/​hciattach -n -s 115200 /dev/ttyS4 bcsp 115200 &
 + if [ $? = 0 ]; then
 + count=10
 + echo "BT Module : Attach - OK"
 + else
 + echo "BT Module : Attach - FAIL"
 + sleep 0.5
 + fi
 + count=$(( ${count}+1 ))
 + done
 +}
 +
 +BT_up() {
 + echo "BT Module : Start"
 + count=0
 + while [ ${count} -le 5 ]; do
 + /​usr/​sbin/​hciconfig hci0 up
 + if [ $? = 0 ]; then
 + count=10
 + echo "BT Module : Start - OK"
 + else
 + echo "BT Module : Start - FAIL"
 + sleep 0.5
 + fi
 + count=$(( ${count}+1 ))
 + done
 +}
 +
 +BT_down() {
 + echo "BT Module : Stop"
 + count=0
 + while [ ${count} -le 5 ]; do
 + /​usr/​sbin/​hciconfig hci0 down
 + if [ $? = 0 ]; then
 + count=10
 + echo "BT Module : Stop - OK"
 + else
 + echo "BT Module : Stop - FAIL"
 + sleep 0.5
 + fi
 + count=$(( ${count}+1 ))
 + done
 +}
 +
 +BT_enable_scan() {
 + echo "BT Module : Enable Scan"
 + count=0
 + while [ ${count} -le 5 ]; do
 + /​usr/​sbin/​hciconfig hci0 piscan
 + if [ $? = 0 ]; then
 + count=10
 + echo "BT Module : Enable Scan - OK"
 + else
 + echo "BT Module : Enable Scan - FAIL"
 + sleep 0.5
 + fi
 + count=$(( ${count}+1 ))
 + done
 +}
 +
 +case "​$1"​ in
 +  start)
 + BT_pskey
 + sleep 0.3
 + BT_attach
 + sleep 0.5
 + BT_up
 + sleep 0.3
 + BT_enable_scan
 +# BT_down
 +# sleep 0.3
 + ​ /​usr/​sbin/​bluetoothd -n &
 + [ $? = 0 ] && echo "​bluetoothd OK" || echo "​bluetoothd FAIL"
 +# for Handy
 + sleep 0.5
 + ​ /​usr/​bin/​sdptool add PANU
 + [ $? = 0 ] && echo "add PANU OK" || echo "add PANU FAIL"
 + ;;
 +  stop)
 + printf "​Stopping BT: "
 + ​ killall bluetoothd
 + [ $? = 0 ] && echo "​OK"​ || echo "​FAIL"​
 + ;;
 +  restart|reload)
 + "​$0"​ stop
 + "​$0"​ start
 + ;;
 +  *)
 + echo "​Usage:​ $0 {start|stop|restart}"​
 + exit 1
 +esac
 +
 +exit $?
 +
 </​code>​ </​code>​
 +
 +
 <​code>​ <​code>​
 </​code>​ </​code>​
  
  
pan/slave_operation.1510111463.txt.gz ยท Last modified: 2017/11/08 12:24 by 1.241.172.144