Author Topic: Turning off bluetooth auto detection  (Read 8203 times)

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Turning off bluetooth auto detection
« on: November 10, 2007, 05:02:30 pm »
Does anyone know how to do it?  I've looked at every message on these boards that mentions bluetooth but can't find any hints on this.

My system is picking up devices from outside my house and since I live right next to a busy shopping street it's almost becoming a day job to tell the system to ignore them one by one.  I figured it would get less after a while but that turned out to be wishful thinking, instead it has become a bit sluggish after litterally thousands of devices to ignore.  It would be far easier for me to enable the auto detection temporarily whenever I actually want to add a new bluetooth device.

"Change is inevitable. Progress is optional."
-- Anonymous


totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Turning off bluetooth auto detection
« Reply #1 on: November 10, 2007, 08:49:06 pm »
Does anyone know how to do it?  I've looked at every message on these boards that mentions bluetooth but can't find any hints on this.

My system is picking up devices from outside my house and since I live right next to a busy shopping street it's almost becoming a day job to tell the system to ignore them one by one.  I figured it would get less after a while but that turned out to be wishful thinking, instead it has become a bit sluggish after litterally thousands of devices to ignore.  It would be far easier for me to enable the auto detection temporarily whenever I actually want to add a new bluetooth device.



Well I would guess you could disable the Bluetooth device in the divices tree in Web Admin. Or somewhat easier possibly go to Web Admin -> Wizard -> Devices -> Media Directors scroll to the MD with the Bluetooth dongle attached and click on 'Edit' software modules and then un-tick 'Bluetooth Dongle' and then click 'Save' in the pop-up window. The only problem is this will also disable all Bluetooth comms too!

So I guess the real solution is to have a on/off bluetooth detection capability in Web Admin so that when Bluetooth 'detection' is in the off mode no new devices are detected and offered for adding... but importantly existing devices that have been added already still work.

This should be feasible with some script changes and a small change in some php code i would think... i will dig into this next week :-)

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Turning off bluetooth auto detection
« Reply #2 on: November 11, 2007, 06:07:55 am »
Yeah I already tried unplugging the dongle, but for some reason my mobile orbiter stopped working. ;)

If it's not to much trouble I would be really greatful, unfortunately I'm not that savvy myself (but I hope one day to be).
"Change is inevitable. Progress is optional."
-- Anonymous


Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Turning off bluetooth auto detection
« Reply #3 on: November 20, 2007, 06:17:54 pm »
As I got a little desperate that I'd never see the gui again for more then 10 seconds (on my production system no less), I have temporarily "fixed" this by getting a list of all mobile phone MAC numbers from the PnpQueue table, cleaning out the duplicates and inserting them into the UnknownDevices table.  Very crude, but it worked for me.

Things work a lot smoother again, so clicking "always ignore" a few times every now and then isn't so much hassle anymore.  I never would have guessed that there are such enormous amounts of bleutooth devices passing by my house every day (almost 4000 unique so far).

As I was writing this I figured the things I did might be kept in the shell's history so just for reference:
Code: [Select]
mysql pluto_main -e "SELECT MACaddress FROM PnpQueue WHERE Category='mobile_phone';" >mobile-mac.text
sort -u mobile-mac.text >mobile-mac_sorted.text
xargs --arg-file=mobile-mac_sorted.text insert_unknownDevice.sh

Where insert_unknownDevice.sh was a little script I made just for the occasion:
Code: [Select]
mysql pluto_main -e "INSERT INTO UnknownDevices VALUES (0,NULL,'$1','',NULL,'',1,NULL,NULL,NULL,0,NOW(),NULL);"

It can probably be done in a single SQL query, but I didn't feel like putting in more effort then needed.  As you can see this is not for the fainthearted, and I wouldn't reccommend messing with the database directly unless you have no other option.  Apart from that, this is likely not entirely the proper way of doing it anyway.

"Change is inevitable. Progress is optional."
-- Anonymous


totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Turning off bluetooth auto detection
« Reply #4 on: November 20, 2007, 09:51:19 pm »
As I got a little desperate that I'd never see the gui again for more then 10 seconds (on my production system no less), I have temporarily "fixed" this by getting a list of all mobile phone MAC numbers from the PnpQueue table, cleaning out the duplicates and inserting them into the UnknownDevices table.  Very crude, but it worked for me.

Things work a lot smoother again, so clicking "always ignore" a few times every now and then isn't so much hassle anymore.  I never would have guessed that there are such enormous amounts of bleutooth devices passing by my house every day (almost 4000 unique so far).

As I was writing this I figured the things I did might be kept in the shell's history so just for reference:
Code: [Select]
mysql pluto_main -e "SELECT MACaddress FROM PnpQueue WHERE Category='mobile_phone';" >mobile-mac.text
sort -u mobile-mac.text >mobile-mac_sorted.text
xargs --arg-file=mobile-mac_sorted.text insert_unknownDevice.sh

Where insert_unknownDevice.sh was a little script I made just for the occasion:
Code: [Select]
mysql pluto_main -e "INSERT INTO UnknownDevices VALUES (0,NULL,'$1','',NULL,'',1,NULL,NULL,NULL,0,NOW(),NULL);"

It can probably be done in a single SQL query, but I didn't feel like putting in more effort then needed.  As you can see this is not for the fainthearted, and I wouldn't reccommend messing with the database directly unless you have no other option.  Apart from that, this is likely not entirely the proper way of doing it anyway.



Thanks for that. We're plagued by bluetooth too!
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Cj_MaN

  • Regular Poster
  • **
  • Posts: 39
    • View Profile
Re: Turning off bluetooth auto detection
« Reply #5 on: November 21, 2007, 05:50:58 am »
How to DISABLE BLUETOOTH Auto discovery ( auto detection )
1.Login in Web Admin
2.Go to Advanced -> Configuration -> Devices
3.Open the CORE/MD where is located your bluetooth device
4.Open DCERouter and click on Orbiter Plugin
5.Check the Ignore check box.

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Turning off bluetooth auto detection
« Reply #6 on: November 21, 2007, 06:58:37 am »
Thanks, I needed just that.
"Change is inevitable. Progress is optional."
-- Anonymous


totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Turning off bluetooth auto detection
« Reply #7 on: November 21, 2007, 09:56:08 am »
How to DISABLE BLUETOOTH Auto discovery ( auto detection )
1.Login in Web Admin
2.Go to Advanced -> Configuration -> Devices
3.Open the CORE/MD where is located your bluetooth device
4.Open DCERouter and click on Orbiter Plugin
5.Check the Ignore check box.

Hmmm... that ignore appears to be related to flickr.pl and not BlueTooth if you look at the context of the fields.
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Turning off bluetooth auto detection
« Reply #8 on: November 21, 2007, 07:06:18 pm »
What we need to do is find the code that is autodiscovering BT devices as the BT dongle detects them. Then we can check if there's already any API to turn off/on the autodiscovery. And then ensure there's a UI to that API.

Maybe grepping the source code for the SQL tablename that Zaerc found in the critical path to this feature.