I have Ubuntu 14.04 and my bluetooth stopped working. The accepted solution for this problem is to find the driver in hex format and convert it to hcd for installation:
sudo apt-get install git
git clone git://github.com/jessesung/hex2hcd.git
cd hex2hcd
make
./hex2hcd ../BCMxxxx.xxx.xxx.xx.hex BCM43142A0-0a5c-21d7.hcd (Correct hex file and required hcd name here)
So I followed the commands and installed git and everything seems to go just fine until the end when I get a "command not found":
$ git clone git://github.com/jessesung/hex2hcd.git
Cloning into 'hex2hcd'...
remote: Counting objects: 8, done.
remote: Total 8 (delta 0), reused 0 (delta 0), pack-reused 8
Receiving objects: 100% (8/8), 8.71 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1/1), done.
Checking connectivity... done.
~$ cd hex2hcd
:~/hex2hcd$ make
gcc -O2 -march=native hex2hcd.c -o hex2hcd
~/hex2hcd$ hex2hcd BCM43142A0_001.001.011.0084.0086.hex BCM43142A0-0a5c-21d7.hcd
hex2hcd: command not found
Why am I getting "command not found" ???
If i look in the directory the command hex2hcd is present:
~/hex2hcd$ ls
BCM43142A0_001.001.011.0084.0086.hex hex2hcd hex2hcd.c LICENSE Makefile
And if I examine the hex2hcd file its properties are executable.
I do not know what to do next to resolve this.
hmm. This question has been marked as a duplicate to:
How to run scripts without typing the full path?
But I do not understand how that helps or how I would have ever found that page. Actually another suggest to prepend ./ before my command is a helpful answer as it has solved the problem. But that solution is not found on the page marked as duplicate.
I don't understand why I need to prepend ./ when I am already in the directory with the command ... So I have a solution but do not understand why it is needed.
./hex2hcd BCM43142A0_001.001.011.0084.0086.hex BCM43142A0-0a5c-21d7.hcd
, i.e., add./
in front?hexhcd
does not work because it is not in yourPATH
. Appending./
works because.
is an alias for the current directory, so./hexhcd
is one way of specifying the path tohexhcd
. The duplicate target that @muru posted provides ways to modifyPATH
by creating symlinks or editing~/.bashrc
.