Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I was trying to get a shell script using hcitool to perfom consecutive inquiries to discover adjacent bluetooth devices. Unfortunately, hcitool will only inquire every 10 seconds, returning previous ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2011
    Posts
    2

    Flush Bluetooth Cache


    Hi,

    I was trying to get a shell script using hcitool to perfom consecutive inquiries to discover adjacent bluetooth devices. Unfortunately, hcitool will only inquire every 10 seconds, returning previous results if called before.

    I read that bluetooth daemon stores a cache at /var/lib/bluetooth, however, deleting its contents proved to have no effect. I also tried to change the configuration of bluetooth but I found no option to remove this caching effect.

    I was wondering if anyone knew how to solve this problem.

    Thanks in advance.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,601
    Even if you delete a file, if another application has it open, it will only be removed from the director, not from the system.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,601
    Anyway, I use the gnome bluetooth-applet to deal with my BT connections. In any case, it talks to the bluetooth daemon (/usr/sbin/bluetoothd) to get information about devices. I'm not sure that hcitool does or not also. You can check if bluetoothd is running. If so, then that is holding the cache file open.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Just Joined!
    Join Date
    May 2011
    Posts
    2
    If that's the case then the only solution would be restarting the daemon every time I run hcitool, but that doesn't seem a good way to do it.

    I was hoping there was some sort of configuration or command to deal with this.

    Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •