Entries tagged as bluetooth
ble debian fitbit kernel linux raspberry pi raspbmc ubuntu backup grafana heic heif iptables nextcloud wlan xbmc ipv6 isdn network axbo barcode calendar cd dell diskless dvd encryption firefox fonts gcc gentoo gimp google earth gparted huawei ios iphone jabber java lte mac mail microsoft n810 netboot nfs nokia osmc outlook phone photo php qr raid samba scanner shell snom sparc systemd thunderbird vaudtax virtualbox voip webcam windows xorg n80 mdadm
Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux
This is how I got a Bluetooth low energy (BLE) adapter to work on a Linux laptop running Ubuntu 12.04.
First, as suggested by several websites, I created the file /etc/modprobe.d/trust-btusb.conf with the following contents:
After having restarted the computer and inserted the adapter, dmesg told me the following:
To get the proper firmware, I downloaded the Windows 8 driver (18187_02.exe) from http://www.trust.com/18187. The driver files can be extracted from the .exe with "unrar x 18187_02.exe".
Then I looked for the vendor id (0x0a5c) and product id (0x21e8) in the various .inf files, and found this in 18187_02/Win32/bcbtums-win7x86-brcm.inf:
Further down in the inf file there is a RAMUSB21E8 section which contains the following line:
The .hex "RAM Patch" file can be found in 18187_02/Win32/. Before it can be used with btusb, it needs to be converted to hcd format. This can be done with hex2hcd. Finally, the hcd file needs to be moved/copied to /lib/firmware/fw-0a5c_21e8.hcd. Here are the steps to get and compile hex2hcd:
The resulting executable can be used to convert the .hex firmware file to .hcd, which is then copied to the right destination:
The adapter can now be used:
Update, 2014-09-08:
First, as suggested by several websites, I created the file /etc/modprobe.d/trust-btusb.conf with the following contents:
install usb:v0A5Cp21E8d*dc*dsc*dp*ic*isc*ip* /sbin/modprobe btusb; echo 0a5c 21e8 > /sys/bus/usb/drivers/btusb/new_id
After having restarted the computer and inserted the adapter, dmesg told me the following:
Bluetooth: can't load firmware, may not work correctly
To get the proper firmware, I downloaded the Windows 8 driver (18187_02.exe) from http://www.trust.com/18187. The driver files can be extracted from the .exe with "unrar x 18187_02.exe".
Then I looked for the vendor id (0x0a5c) and product id (0x21e8) in the various .inf files, and found this in 18187_02/Win32/bcbtums-win7x86-brcm.inf:
%BRCM20702.DeviceDesc%=RAMUSB21E8, USB\VID_0A5C&PID_21E8 ; 20702A1 dongles
Further down in the inf file there is a RAMUSB21E8 section which contains the following line:
HKR,,%RAMPatchFileName%,0x00000, "BCM20702A1_001.002.014.0187.0188.hex"
The .hex "RAM Patch" file can be found in 18187_02/Win32/. Before it can be used with btusb, it needs to be converted to hcd format. This can be done with hex2hcd. Finally, the hcd file needs to be moved/copied to /lib/firmware/fw-0a5c_21e8.hcd. Here are the steps to get and compile hex2hcd:
$ git clone https://github.com/jessesung/hex2hcd.git
$ cd hex2hcd/
$ make
The resulting executable can be used to convert the .hex firmware file to .hcd, which is then copied to the right destination:
$ ./hex2hcd BCM20702A1_001.002.014.0187.0188.hex BCM20702A1_001.002.014.0187.0188.hcd
$ sudo cp -p BCM20702A1_001.002.014.0187.0188.hcd /lib/firmware/fw-0a5c_21e8.hcd
$ sudo chown root:root /lib/firmware/fw-0a5c_21e8.hcd
The adapter can now be used:
$ sudo hcitool -i hci1 lescan
Update, 2014-09-08:
- The first step is no longer necessary with Ubuntu 14.04, I directly receive the "may not work" message.
- I was able to extract the firmware from 18187_05.exe (latest W8 driver) using this command: "7z x 18187_05.exe"
- The correct .hex file is BCM20702A1_001.002.014.0449.0515.hex
Downloading pictures from my mobile phone
My phone stores the camera pictures in a dedicated folder with filenames like "Picture(1).jpg".
for I in `seq 20 30` ; do obexftp -b 00:11:22:33:44:55 -c 'Pictures/camera_semc/' -g "Picture($I).jpg" ; done