From: Gregg L. <gr...@li...> - 2005-04-26 23:36:40
|
Bruce Winter wrote: > Mike Jackson wrote: > >> Just do: >> >> chmod +x bl.pl >> ./bl.pl >> >> >> The script finds the device like this: >> >> $device = $ARGV[0] || "hci0"; >> >> I think it might have become confused with the above command. I don't >> know what it thought $ARGV[0] was in that case... > > > Hmmm, your script seems different than mine. The xscreensaver.pl > script (both original and patched) that I got from here: > > http://perl.jonallen.info/projects/bluetooth > > Has this: > > my $mac = $ARGV[0] || '00:0A:D9:3F:84:E5'; > > I changed it to my mac address. I also tried "hci0", like your > example, but that didn't work either. > > When I use my real mac address, as I think the code wants, it fails > right away with the 'Device not available' message. If I use an > arbitrary string, or hci0, then it seems to past that message, but > fails later with the 'Could not find device' message. > > Could you post the errata you get when it works you? > > Anyone else give this code a try yet? > Yes--it works for me. However, the mac address referenced above required the address of my phone--not the adapter (which I had originally thought from the discussions and assumed). I ended up trying a lot of different things--some of which may or may not have led to it eventually working (I'll post a follow-up once I get to what I think are the key steps). I do know that the first "hoop" was to rebuild my custom kernel.org kernel (2.6.6) because the stock defaults don't enable the bluetooth modules and I didn't think to enable them on the prior kernel build. Also, I'm virtually certain that I had to run "hciconfig hci0 up" to cause the adapter to be enabled (which makes sense if it follows the NIC analog). Once the adapter was "up", I used hcitool to get raw info, scan and create connections. I figured this needed to work reliably before I started playing w/ scripts that I didn't necessarily undertand. FWIW: I'm using the Belkin class 1 adapter. Gregg |