#!/bin/sh export DATE="10.8.2008";SCRIPT=${0#/rom} export TITLE="Admin: Bluetooth" . ${SCRIPT%/*}/cgi-bin-pre.sh cat<Admin: Bluetooth EOF if [ "$REQUEST_METHOD" = "POST" ]; then read QUERY_STRING fi if [ -z "$QUERY_STRING" ]; then #Speedups ff_bt_role="$(nvram get ff_bt_role)" cat<
Bluetooth Role:
Bluetooth NAP ID:
Bluetooth PIN:
 
   

Note: The freifunk-bluetooth packages is work in progress. Pairings are stored in /etc/bluetooth/persist, so they are valid after a reboot. You need to enter the following commands on the ssh command line.

In PANU mode the router uses a mobile phone as internet access. Enter /etc/init.d/S75bluetooth connect resp. /etc/init.d/S75bluetooth disconnect. To find a NAP ID, use hcitool scan. On the addressed device you need to enter the PIN to complete the pairing. The router will start to announce Internet via HNA0/0 immediately after connection is up.

In NAP mode, the bluetooth dongle is bridged to the LAN adapter which probably provides DHCP. To start the paring, use /etc/init.d/S75bluetooth connect and initiate the pairing from the remote device. The NAP ID is irrelevant in this mode, so any device can connect during the 30 seconds paring time if it knows the correct PIN.

EOF else IFS=\&;set $QUERY_STRING;unset IFS;eval $* DIRTY= if [ -n "$post_bluez" ]; then for V in ff_bt_role ff_bt_id ff_bt_pin; do eval "C=\$$V" C=$(unescape $C) if [ "$C" != "$(nvram get $V)" ]; then DIRTY=1 nvram set $V="$C" fi done fi if [ -n "$DIRTY" ]; then nvram commit>/dev/null 2>&1 cat< The changed settings are committed. The settings are active after the next Restart. EOF else cat< No settings are changed. EOF fi fi . ${SCRIPT%/*}/cgi-bin-post.sh