OpenWrt Forum Archive

Topic: WGT634U as a stompbox?

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Awhile back there was this thing called a stompbox. It was a wireless AP, and you could stick a Sprint PCS card in there and have a nifty little access point. So I'm trying to do the same thing with a WGT634u

Thus far its going very well. I have bluetooth up and running and I'm able to connect to the phone and get online. The problem is I'm building this for a very non-technical friend. So what I'm trying to get is that when they turn on the device, and plug in the USB bluetooth dongle that it'll automatically dial up the GPRS connection and get online.

I googled endlessly for hotplug scripts and can't seem to find one for this linksys bluetooth dongle. I've tried putting a bluetooth.usermap and bluetooth executable in /etc/hotplug.d/usb but it never seems to get recognized. So I was wondering if anyone had any advice on how to get the ppp to start as soon as the bluetooth dongle is stuck in. And even better, some way to have it come up on a web page!

I'm also having a lot of trouble with the 'site scan' using x-wrt and getting it to connect as a wireless bridge to another access point. But thats probably another e-mail. For now I'll be happy getting the bluetooth to autodial!

Thanks

you would need to create a script that is run when the dongle is pluged in, pay attention to what hotplug2 spits out and go from there.

Yeah, thats my problem. hotplug2 doesn't spit anything out. Or if it does I can't find where its spitting it out at. And google was even less than helpful about hotplug2. So, is there a way to turn on debugging? Or turn on logging to a file somewhere for hotplug2?

Thanks!

** WARNING **

This is an ugly hack. In fact it doesn't even work all that well. But I'd like to post for anyone else going through this

First off, hotplug2 is VERY poorly documented. But I suppose if I was a developer it would make sense. It also appears the usual hotplug rules don't apply either.

So, in order to have it initiate and dial up my GPRS connection via bluetooth I had to make the following changes.

First, I had to change /etc/hotplug2.rules (it looks like this has already been added to svn on openwrt)

SUBSYSTEM ~~ (net|button|usb) {

Then, I added the file /etc/hotplug.d/usb/bluetooth

#!/bin/sh

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
    rfcomm release /dev/rfcomm0
    rfcomm bind /dev/rfcomm0 00:12:56:F8:5E:E7 8
    pppd call Cingular
    fi

Now, this still gives me an error under hotplug. But it does dial the phone, and establish the ppp connection. So, plug in the bluetooth dongle, and you've got GPRS! Unplug the dongle and you don't.

Of course I'm still having trouble getting the firewall rules to send traffic out the ppp interface. Or it might be because I set it up as a wireless access point and its not letting ath0 out for some reason. But in any case its kinda working and thats close enough for right now. It seems hard to get a lot of feedback on stuff like this so its mostly blind poking until I get it right.

The discussion might have continued from here.