The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Applications (http://hintsforums.macworld.com/forumdisplay.php?f=5)
-   -   Bluetooth switching off (http://hintsforums.macworld.com/showthread.php?t=169832)

RobertSK 11-21-2013 12:50 PM

Bluetooth switching off
 
Until fairly recently Bluetooth was on when I started (using 10.5.8). Now I have to switch bluetooth on every time I restart. Can anyone advise how I change the preferences to having bluetooth on as before. Now I have to use a wire-connect mouse in order to turn on bluetooth by switching on the bluetooth assistant at startup.

jsalmi 11-21-2013 01:25 PM

Which computer/device are you having the issue with?

RobertSK 11-21-2013 01:37 PM

Hi, it is the Mac PowerPC running OS 10.5.8 that is not switching on the Bluetooth when it restarts. I have set the Bluetooth Set-up Assistant to log in at start-up and it allows me to switch on Blue tooth but I have to do this using a wired mouse rather than the Bluetooth connected mouse.
Hope you can help, thanks for getting back to me.

benwiggy 11-21-2013 01:49 PM

Quote:

Originally Posted by RobertSK (Post 723455)
Until fairly recently Bluetooth was on when I started (using 10.5.8). Now I have to switch bluetooth on every time I restart.

Has anything changed in your setup recently? New hardware, new software?

You haven't said exactly which model of Mac you have, but it's going to be 8 years old at best, running Bluetooth 1.1. Hardware issues are also likely to come to the fore.

(Personally, I don't see the point of bluetooth for a desktop mouse. I've never "run out of cable" on a wired mouse. :D )

RobertSK 11-21-2013 02:03 PM

Hi, I find the lack of cables on the desktop better. The Bluetooth Set UP Assistant is v2.1.10. Nothing changed as far as I can tell when the Bluetooth decided not to turn on at start-up. I am using a Belkin Bluetooth device to be able to use Bluetooth.

RobertSK 11-22-2013 04:06 AM

Further to my last post, I am using Bluetooth version 2.1.10f2 with v.14 firmware with the USB 2 Belkin Bluetooth adapter. I notice if I unplug it and then plug it in again, I have to switch Bluetooth on again.

seesolve 11-26-2013 07:36 PM

It's not an ideal solution, but you could use blueutil, a command-line utility that controls Bluetooth, in a script to turn Bluetooth on when restarting.

RobertSK 11-27-2013 04:30 AM

Hi, thanks for the suggestion which sounds good. At the moment I have to use a wired mouse to start Bluetooth. Unfortunately the utility won't work. I get /usr/local/bin does not exist . Can you suggest how to get the utility working?

seesolve 11-28-2013 11:25 AM

Ah. I don't have 10.5. You might have to create the /usr/local/bin directory. Open Terminal and type the following at the prompt and press enter/return:
Code:

mkdir -p /usr/local/bin
'mkdir' makes directories, and the '-p' creates intermediate directories as required.

Also, '/usr/local/bin' may not be in your path. To see your path, type the following at the prompt:
Code:

echo $PATH
The paths will be separated by colons. If you don't see '/usr/local/bin' in the path, then you'll have to add it to your ~/.bash_profile file, which might not exist: Creating a .bash_profile on your mac. Then add the path. To see an example, check out the "my bash profile > ENVIRONMENT CONFIGURATION > Set Paths" section of MY MAC OSX BASH PROFILE. He has 2 lines for export PATH. I don't know why he set it up that way.

RobertSK 11-29-2013 12:44 PM

not having great deal of success! I get (mkdir: /usr/local: Permission denied and rsk-372:~ test$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
rsk-372:~ test$ mkdir -p /usr/local/bin
mkdir: /usr/local: Permission denied
what should I do to get the blueutil working?

DeltaMac 11-29-2013 12:57 PM

The mkdir may require a sudo.

However, if the behavior has recently changed, and had been working OK before, then I would suggest that you try running the 10.5.8 combined updater. That install will check that all system components that have been updated in Leopard are properly installed in their correct locations, along with other maintenance. Might get your bluetooth working properly again.
Get the updater here, if you don't already have it downloaded: http://support.apple.com/kb/DL866

seesolve 11-29-2013 02:42 PM

Ooh. Yes, sorry about that. You may need to 'sudo mkdir -p /usr/local/bin'. This assumes you're using an admin account.

Also, I forgot to tell you that even when you add /usr/local/bin to your PATH, you'll need to specify the path if running the utility in AppleScript via the 'do shell script' command.

By the way, we're assuming you have a certain amount of knowledge about Terminal and the Mac command-line. If you need more detailed instructions, just let us know.

RobertSK 11-30-2013 11:41 AM

Quote:

Originally Posted by DeltaMac (Post 723730)
The mkdir may require a sudo.

However, if the behavior has recently changed, and had been working OK before, then I would suggest that you try running the 10.5.8 combined updater. That install will check that all system components that have been updated in Leopard are properly installed in their correct locations, along with other maintenance. Might get your bluetooth working properly again.
Get the updater here, if you don't already have it downloaded: http://support.apple.com/kb/DL866

Many thanks for the very good suggestion re-updating OS10.5.8. I have now tried this without any improvement.I will continue to try the terminal approach.
regards, R

RobertSK 11-30-2013 11:44 AM

Hi, Seesolve. I do not have much of a knowledge of Terminal and the Mac command line so help in this would be most appreciated.

DeltaMac 11-30-2013 12:14 PM

Have you recently changed the USB bluetooth dongle that you use?
I have 2 different USB bluetooth. One accepts a bluetooth mouse click to enable the bluetooth, including waking from sleep just by clicking the BT mouse. The other dongle does not allow for mouse clicks to wake up my Mac. (I use it, despite the limitation because it's very tiny and works well otherwise with an old PowerBook that you use)

RobertSK 11-30-2013 12:23 PM

thanks for reply. No I have not changed the dongle and find that when I unplug it and then plug it in again, I have to reactivate Bluetooth.

DeltaMac 11-30-2013 12:51 PM

I would suggest that you log in to a different user account, and see if the bluetooth responds in a more familiar manner.

When I plug in a bluetooth dongle, the Bluetooth pref pane 'magically' appears in the System Prefs.

RobertSK 12-01-2013 06:59 AM

Thanks for the suggestion. I tried what you suggested and logged in to a different account and found that Bluetooth automatically worked without further problems. When I logged back in to the original account that was giving trouble, I found that Bluetooth was working. How would this be?
I just need to see if Bluetooth picks up my mouse and keyboard after shutting down!

DeltaMac 12-01-2013 07:07 AM

And - is your Bluetooth working as you expect now, even in your normal user account?

RobertSK 12-01-2013 10:34 AM

Having shut down and restarted, I find that Bluetooth has gone back to having to be switched on by the wired Mouse to be able to use my wireless devices. Having logged out and in again, I can do that without having to switch on Bluetooth.

seesolve 12-02-2013 03:42 PM

Ah, so Bluetooth only shuts off when you shut down? Interesting.

When you downloaded blueutil, how did you install it? There is an 'Install' file (it's a .command file). Did you double-click that?

RobertSK 12-03-2013 03:55 AM

Bluetooth only needs to be restarted after shutting down as one particular user. I have not been able to get Blueutil working yet. I tried installing it with a double click.

seesolve 12-04-2013 07:47 PM

What happened when you did that?

RobertSK 12-05-2013 07:26 AM

I got a message : the execution error: cp: directory /usr/local/bin does not exist (1)

trevor 12-06-2013 11:56 AM

In your Terminal, try the following command:

sudo mkdir /usr/local/bin

And enter your admin password when prompted. Then try installing again.

By the way, that's a pretty poor installer that assumes /usr/local/bin already exists, but doesn't create it in the event that it doesn't. /usr/local/bin is common across Unix systems, but it does not exist by default in OS X.

Trevor

RobertSK 12-08-2013 05:12 AM

Just tried that but terminal would not accept anything typed after password!

DeltaMac 12-08-2013 07:14 AM

Quote:

Originally Posted by RobertSK (Post 724077)
Just tried that but terminal would not accept anything typed after password!

Yes, that's a security feature in the terminal:
You will not see anything repeated as you type in your password. Just type it, then press enter.

RobertSK 12-08-2013 07:45 AM

Hi, I got
mkdir: /usr/local: No such file or directory

seesolve 03-06-2014 04:26 PM

You've probably already moved on by now, but for others asking the same question, using the following will create the directory, including intermediate dircectories:

Code:

sudo mkdir -p /usr/local/bin

RobertSK 03-07-2014 03:57 AM

Hi, thanks for your info. I still have not resolved the problem and work with it but find that except for the admin account, other accounts don't seem to have the problem and remain connected to Bluetooth.
I tried what you suggest but got no response from Terminal as below.
rsk-853:~ test$ sudo mkdir -p /usr/local/bin
rsk-853:~ test$

DeltaMac 03-07-2014 08:06 AM

Quote:

Originally Posted by RobertSK (Post 726321)
Hi, thanks for your info. I still have not resolved the problem and work with it but find that except for the admin account, other accounts don't seem to have the problem and remain connected to Bluetooth.
I tried what you suggest but got no response from Terminal as below.
rsk-853:~ test$ sudo mkdir -p /usr/local/bin
rsk-853:~ test$

That is your response.
You run the mkdir command, which creates the folder that you need, and the terminal returns your text prompt. It wouldn't tell you anything else, unless there is a problem with creating the folder.
And, after that command, you should be able to run the blueutil app.

RobertSK 03-07-2014 11:38 AM

Just tried using blueutil and command not found
was reported. What next?

trevor 03-07-2014 01:28 PM

That probably means that blueutil is not in your PATH. Since you put blueutil in /usr/local/bin (which I think is the best place for you to have put it), you will need to add /usr/local/bin to the PATH.

First, let's verify that my guess is correct, since there are also other possible explanations for 'command not found'.

echo $PATH
(and hit Return at the end of the command)

Terminal should respond with a list of the directories in your PATH, looking something like:

% echo $PATH
/usr/local/bin:/usr/local/sbin:/sw/bin:/sw/sbin:/usr/local/lib:/usr/bin:/bin:/usr/sbin:/sbin:/usr/lib


Check and see if /usr/local/bin is listed, preferably near the beginning, and definitely earlier than /bin. If it's not, you'll need to add it.

I'm going to assume that you are using bash shell, which is the default in OS X. If you use something other than the default, then you probably don't need this explanation from me. Look in your home directory for any of the following files: .bash_profile, .bash_login, .profile, .bashrc

ls -al ~

If you don't see any of those files, then you have many many options for how you want to set this up. I'll give you one way, but there are a bajillion others, and everyone who uses Unix has their own opinion about the best way.

If you DO see one of those files in your home directory, let us know what it is and what it has in it. So for example, if you have a .bash_profile file, then issue the command:
cat ~/.bash_profile

...and copy/paste what you have here for us to see.

But back to the assumption that you don't have any of these files, the way I would do it is to create the files. I'll use pico, which is a very easy to use text editor. First create .bash_profile

pico ~/.bash_profile
(remember to hit Return at the end of commands)

This will put you into the pico text editor. Now copy/paste the text below into pico:

source $HOME/.bashrc

Now, hit Control-O to write the file, then hit Control-X to exit pico.

Next, create .bashrc:

pico ~/.bashrc

Now, copy/paste the following into pico:

export PATH=/usr/local/bin:$PATH


Hit Control-O to write, Control-X to exit.

Now, quit your Terminal program. Relaunch Terminal, and try the following command:
which blueutil

It should respond with /usr/local/bin/blueutil

If it responds with nothing, or with something else, then there's still a problem.

Trevor

RobertSK 03-08-2014 04:17 AM

Hi, I have 0 29 Nov 11:06 .bash_profile
but cat ~/.bash_profile produces no result.

trevor 03-10-2014 12:30 PM

That means that there is nothing in the file. So follow the directions above as if it didn't exist.

Trevor

RobertSK 03-10-2014 01:33 PM

Got as far as control-O but got a beep on Control-X with info on running processes being login,bash,nano.
Which blueutil gave me export PATH/usr/local/bin:$PATH

trevor 03-10-2014 04:41 PM

Quote:

Originally Posted by RobertSK (Post 726371)
Got as far as control-O but got a beep on Control-X

When you hit Control-O, the bottom of the pico screen gives you the filename, and you hit Return. After hitting Return, hit Control-X to exit.

Quote:

Originally Posted by RobertSK
Which blueutil gave me export PATH/usr/local/bin:$PATH

Can you copy/paste a transcript from your Terminal? You should see
export PATH=/usr/local/bin:$PATH
as a response from cat .bashrc, but getting that as a response to which blueutil makes no sense. You'll either get nothing (which means you don't have blueutil anywhere in your PATH) or /usr/local/bin/blueutil (which means that your computer is seeing the right blueutil), or some other path to blueutil (which means that your computer is seening the wrong blueutil).

Trevor

ganbustein 03-10-2014 05:04 PM

Quote:

Originally Posted by benwiggy (Post 723459)
You haven't said exactly which model of Mac you have, but it's going to be 8 years old at best, running Bluetooth 1.1. Hardware issues are also likely to come to the fore.

Hardware issues like, for example, the PRAM battery.

Loss of settings after a shutdown is the primary symptom of a dead battery. They frequently need to be replaced every five years or so.

RobertSK 03-11-2014 06:13 AM

Hi Trevor, just complete what you advised and have the following from Terminal:

Last login: Tue Mar 11 08:01:22 on console
rsk-853:~ test$ pico ~/.bash_profile
rsk-853:~ test$ which blueutil
/usr/local/bin/blueutil
rsk-853:~ test$ cat ~/.bash_profile
source $HOME/.bashrc

rsk-853:~ test$

regards, Robert

trevor 03-11-2014 07:54 AM

Quote:

Code:

rsk-853:~ test$ which blueutil
/usr/local/bin/blueutil


OK, so blueutil is now in your PATH. Does it work?

Trevor

RobertSK 03-11-2014 08:40 AM

No, it doesn't seem to :

Last login: Tue Mar 11 11:58:40 on ttys000
-bash: /Users/test/.bashrc: No such file or directory
rsk-853:~ test$ $ blueutil status
-bash: $: command not found
rsk-853:~ test$

RobertSK 03-11-2014 12:06 PM

Hi again, Trevor. Just wondering if when we get blueutil working whether it will overcome the current problem I have in that bluetooth switches off when I shut down meaning that I have to restart it again with a wired mouse using Bluetooth Setup assistant when I restart.

trevor 03-11-2014 01:00 PM

Quote:

Originally Posted by RobertSK
-bash: /Users/test/.bashrc: No such file or directory

Did you follow my directions to create .bashrc? It doesn't seem to have worked. But that means I'm confused as to how you got blueutil in your PATH.

Quote:

Originally Posted by RobertSK
rsk-853:~ test$ $ blueutil status

Can we see the results of the following commands, copy/pasted into Terminal?

ls -alOe /usr/local/bin
ls -alOe ~
cat ~/.bashrc
id
echo $PATH
echo "done"


Quote:

Originally Posted by RobertSK
Just wondering if when we get blueutil working whether it will overcome the current problem I have in that bluetooth switches off when I shut down

I have no idea. I've never used blueutil. I've been answering specifically your questions about how to install blueutil on the command line and how to get your environment working, and I have purposely not addressed the larger question of your Bluetooth problems, as I really don't know the answer to that larger question.

Trevor

RobertSK 03-11-2014 02:36 PM

Here are the results:
Code:

Last login: Tue Mar 11 12:38:59 on ttys000
-bash: /Users/test/.bashrc: No such file or directory
rsk-853:~ test$ ls -alOe /usr/local/bin
total 72
drwxr-xr-x  3 root  wheel  -  102  7 Mar 13:19 .
drwxr-xr-x  3 root  wheel  -  102  7 Mar 08:50 ..
-rwxr-xr-x@ 1 root  wheel  - 33860 11 Mar 11:58 blueutil
rsk-853:~ test$ ls -alOe ~
total 96
drwxr-xr-x+ 26 test  staff  -        884 10 Mar 17:41 .
 0: group:everyone deny delete
drwxr-xr-x  8 root  admin  -        272 25 Apr  2012 ..
-rw-------  1 test  staff  -          3 25 Apr  2012 .CFUserTextEncoding
-rw-r--r--@  1 test  staff  hidden 12292  6 Mar 17:20 .DS_Store
drwx------  4 test  staff  -        136 11 Mar 10:20 .Trash
-rw-------  1 test  staff  -      1744 11 Mar 16:02 .bash_history
-rw-r--r--  1 test  staff  -        23 11 Mar 10:07 .bash_profile
-rw-------  1 test  staff  -        22 10 Mar 17:16 .bash_profile.save
-rw-------  1 test  staff  -        22 10 Mar 17:24 .bash_profile.save.1
-rw-------  1 test  staff  -        22 10 Mar 17:37 .bash_profile.save.2
-rw-------  1 test  staff  -        33 10 Mar 17:26 .bashrc.save
drwx------  3 test  staff  -        102 26 Apr  2012 .cups
drwx------  15 test  staff  -        510 11 Mar 10:26 .dropbox
-rw-------  1 test  staff  -        50  8 Dec 10:11 .lesshst
drwx------  5 test  staff  -        170  9 Sep  2013 Applications
drwx------@ 11 test  staff  -        374 10 Mar 18:25 Desktop
 0: group:everyone deny delete
drwx------@ 16 test  staff  -        544  9 Jan 17:57 Documents
 0: group:everyone deny delete
drwx------@ 40 test  staff  -      1360 11 Mar 08:53 Downloads
 0: group:everyone deny delete
drwx------@ 22 test  staff  -        748 11 Mar 10:26 Dropbox
drwx------+ 46 test  staff  -      1564 12 Feb  2013 Library
 0: group:everyone deny delete
drwxr-xr-x  2 test  staff  -        68 14 May  2012 Memeo Backups
drwx------+  3 test  staff  -        102 25 Apr  2012 Movies
 0: group:everyone deny delete
drwx------+  7 test  staff  -        238 22 Apr  2013 Music
 0: group:everyone deny delete
drwx------+  8 test  staff  -        272 18 Oct 17:25 Pictures
 0: group:everyone deny delete
drwxr-xr-x+  5 test  staff  -        170 25 Apr  2012 Public
 0: group:everyone deny delete
drwxr-xr-x+  5 test  staff  -        170 25 Apr  2012 Sites
 0: group:everyone deny delete
rsk-853:~ test$ cat ~/.bashrc
cat: /Users/test/.bashrc: No such file or directory
rsk-853:~ test$ id
uid=503(test) gid=20(staff) groups=20(staff),98(_lpadmin),81(_appserveradm),101(com.apple.sharepoint.group.1),102(com.apple.sharepoint.group.2),79(_appserverusr),80(admin)
rsk-853:~ test$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
rsk-853:~ test$ echo "done"
done
rsk-853:~ test$


trevor 03-13-2014 06:01 PM

Code:

-rw-r--r--  1 test  staff  -        23 11 Mar 10:07 .bash_profile
-rw-------  1 test  staff  -        22 10 Mar 17:16 .bash_profile.save
-rw-------  1 test  staff  -        22 10 Mar 17:24 .bash_profile.save.1
-rw-------  1 test  staff  -        22 10 Mar 17:37 .bash_profile.save.2
-rw-------  1 test  staff  -        33 10 Mar 17:26 .bashrc.save

Your .bashrc file is misnamed .bashrc.save. Let's fix that, and get rid of a couple of other extraneous .bash_profile.save files, and improve the permissions on your .bashrc file. (This is assuming that you properly wrote the .bashrc file, it's just misnamed.) Copy/paste the following into Terminal:

rm ~/.bash_profile.sav*
mv ~/.bashrc.save ~/.bashrc
chmod 644 ~/.bashrc
cat ~/.bashrc
echo "done"


Trevor

RobertSK 03-25-2014 01:25 PM

Trevor, sorry not to have replied sooner but I have been away.
I copied and pasted what you suggested and got the following from terminal:
Last login: Tue Mar 25 08:01:19 on console
-bash: /Users/test/.bashrc: No such file or directory
rsk-853:~ test$ rm ~/.bash_profile.sav*
rsk-853:~ test$ mv ~/.bashrc.save ~/.bashrc
rsk-853:~ test$ chmod 644 ~/.bashrc
rsk-853:~ test$ cat ~/.bashrc
export PATH=/usr/local/bin:$PATH
rsk-853:~ test$ echo "done"
done
rsk-853:~ test$

What should I do next.?

trevor 03-25-2014 07:27 PM

Quit your Terminal program, restart it, and then test to see if things are now working.

Trevor

RobertSK 03-26-2014 04:36 AM

HI, no progress it seems:

Last login: Wed Mar 26 08:33:38 on ttys000
rsk-853:~ test$ $ blueutil on
-bash: $: command not found
rsk-853:~ test$

trevor 03-27-2014 06:41 PM

Quote:

-bash: $: command not found
You shouldn't type in the dollar sign ($). That's the prompt, meaning it shows that the computer is ready for your command. Just type

blueutil on

Trevor

RobertSK 03-28-2014 05:03 AM

Thanks Trevor. I did that and then tried to turn blueutil off but got:
Last login: Fri Mar 28 08:01:18 on console
rsk-853:~ test$ blueutil on
rsk-853:~ test$ blueutil off
Error: unable to turn Bluetooth off
rsk-853:~ test$

trevor 03-28-2014 02:02 PM

OK, you can turn it on, though, so that's at least a significant milestone that you've achieved. You have blueutil installed, properly in your PATH, and you can turn bluetooth on.

Perhaps someone else here can help you troubleshoot turning it off. Maybe try
sudo blueutil off
...and enter your admin password when asked.

Trevor

RobertSK 03-29-2014 10:22 AM

Thanks very much for all your help with BlueTooth. A great experience leaning the use of Terminal commands. Very kind of you to stick with me over the period.
Weather here in UK warming up now so good to see a little sun!
As a footnote to the use of Bluetooth, I found yesterday that my problem in BlueTooth turning off every time I shut down was corrected when I changed the settings in the Advanced menu of the Bluetooth Hardware setting in the System Preferences!
Again thanks.Hope all well in Boulder. regards Robert


All times are GMT -5. The time now is 12:55 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.