Logitech diNovo Mini
The Logitech diNovo Mini is a palm-sized keyboard directly targeted at Home Theatre PC users. It is a bluetooth keyboard that incorporates a full QWERTY layout with a touch-pad mouse.
Initial Pairing With the Logitech Mini-Adapter
The included USB mini-adapter is perhaps the easiest way to use this keyboard. But straight out-of-the-box the keyboard will not connect with the USB dongle automatically. Superficially this should just a matter of pressing the red button on the dongle, along with the red button on the back of the keyboard (under the battery cover). However this just does not seem to work under Linux. It might be necessary to install the windows drivers onto a windows PC, and then proceed with the pairing. This could of-course be a co-incidence, but a dozen pairing attempts under Ubuntu 12.10 failed, whereas the first attempt on windows succeeded. Once that initial pairing has been made, the dongle+keyboard can be moved back to the correct machine.
It is easy to tell that the pairing is successful when the "Bluetooth" icon LED on the top right of the keyboard changes from red to green.
When pairing the keyboard with a generic bluetooth adapter, remember to press [Enter] after typing the access code on the keyboard.
Ubuntu 8.10 Update
According to the Ubuntu 8.10 release notes the keyboard driver has undergone extensive modifications, and previous configurations with xmodmap will need to be changed.
The crux of the changes (as far as the author can tell) is that now the keyboard mapping is decided by XWindows on the fly, maybe with the Hardware Abstraction Layer (HAL) putting it's 2-cents worth in.
Marc Randolph suggested on the MythTV Mailing list:
- The X.Org configuration file (/etc/X11/xorg.conf) still has InputDevice entries for the mouse and keyboard, but they are ignored now because input-hotplug is used. The keyboard settings now come from /etc/default/console-setup; to change them please use sudo dpkg-reconfigure console-setup. After that, HAL and X need to be restarted (e.g., by rebooting your system).
So, with the keyboard manually set to "Logitech diNovo" (there is no "Logitech diNovo Mini" option), all the previously good keycodes are changed, and some of the keys do not generate a scan code at all.
The following keycodes provide a partial solution:
keycode 174 = Escape keycode 173 = Left keycode 171 = Right keycode 172 = P keycode 175 = R
Selecting a generic keyboard setting instead of "Logitech diNovo" reduces number of issues at least in Ubuntu 9.10.
The author will provide a more thorough approach once it becomes known to him. Mythbuntu 8.10 no longer automatically calls xmodmap, so it has to be configured to run manually. The XFCE documentation states that: "All programs (or symbolic links to programs) in ~/Desktop/Autostart/ will be run on startup". So this might be an easy way to call xmodmap.
The keyboard includes a row of extra buttons along the top, plus some alternate blue function buttons. At the time of writing (2008-08-22) these buttons are not natively supported under Mythbuntu Linux or MythTV. However it's possible to re-map these keys to something useful for MythTV using xmodmap.
The program xmodmap takes a plain text file of key-codes (determined with the xev program), and the keystroke this code should generate.
! DiNovo Mini Keyboard Mappings for MythTV ! ! Volume Down: keycode 174 XF86AudioLowerVolume ! Volume Up: keycode 176 XF86AudioRaiseVolume ! Mute: keycode 160 XF86AudioMute ! Record: keycode 177 XF86AudioRecord ! Skip Left: keycode 144 XF86AudioPrev ! Skip Right: keycode 153 XF86AudioNext ! Stop: keycode 164 XF86AudioStop ! Play/Pause: keycode 162 XF86AudioPlay ! Back: keycode 22 ?? Backspace ! -------------------------- ! Music: keycode 129 XF86Music ! Browser: keycode 178 XF86WWW ! Power: keycode 223 XF86Sleep ! keycode 174 = F10 keycode 176 = F11 keycode 160 = F9 keycode 177 = R keycode 144 = Left keycode 153 = Right keycode 164 = Escape keycode 162 = P keycode 129 = XF86Music keycode 178 = XF86WWW keycode 223 = XF86Sleep
(Note: The blue alt-keys (Music, Browser, Power) are not mapped to anything useful in MythTV, this is left as an exercise for the reader!)
Save the above to a file named .Xmodmap (or anything else, it doesn't matter). To bring the above functions up immediately enter:
Now you need to make sure the above will come up each time the MythTV system is rebooted. This is system dependent, but basically whenever mythfrontend is about to start xmodmap should be run. Mythbuntu seems to automatically do this for a ~/.Xmodmap for the user running the frontend.
Note: As of 7/1/10 some of these codes may have changed due to changes in the diNovo Mini itself. The following codes are what one user has found using a diNovo Mini under Mythbuntu 10.04:
Volume Down: keycode 122 Volume Up: keycode 123 Mute: keycode 160 Skip Left: keycode 173 Skip Right: keycode 171 Stop: keycode 174 Play/Pause: keycode 172 Media Center Button (bottom right): keycode 179
If in doubt run the xev program as mentioned above to determine the correct keycodes for your diNovo Mini.
With the current release of Ubuntu (8.10) no further configuration is needed to get the mouse-trackpad of the diNovo mini working. However With the previous Ubuntu versions the following changes will see it right.
Based on some great work by the myth-fans in AVSforums, repairing the problem is a simple configuration change.
As root (or via sudo) add the following line to /etc/modprobe.d/options -
For Ubuntu 8.10:
No update is necessary, it seems to work without modification.
For Ubuntu 8.04:
options usbhid quirks=0x046d:0xc71f:0x00080000
For Ubuntu 7.10: (not verified by the author)
options usbhid quirks=0x046d:0xc71f:0x00200000
Then rebuild your kernel startup ramdisk, because you need these options at boot-time:
- Using your own bluetooth adapter can cause problems with this keyboard. The author's own (inexpensive) bluetooth dongle failed to maintain a good link to the keyboard, and using other bluetooth devices (e.g.: a nearby Nintendo Wii console) would cause the link to drop-out. Using the dongle included with the keyboard solves these stability problems.
- On those rare occasions when the keyboard will not pair with the computer - remove the battery from the keyboard (and type a few keys to exhaust capacitors), before trying again. This usually does the trick.
After more than 10 months of using this keyboard exclusively with MythTV, the author has these observations on usability:
- For day-to-day operation it's great. It can sit on the arm of the lounge without being obtrusive.
- Less technical family members have no trouble with operation.
- Generally, it's ok to type on given it's size, but one must be careful.
- The Track-pad arrow keys are not as good as they could be. It seems that if the track-pad warms up under your finger, it becomes much less responsive to button pushes. Lifting your finger off for a few seconds restores operation, but that should not be necessary on such an expensive keyboard.
- After being 'asleep' overnight, it does take a few seconds to get it's ship together when you first open it up. Sometimes it seems to reboot itself if it fluffs the first bluetooth connection attempt (or something).
- The author would buy the same keyboard over again, given this knowledge.
- Update 2014 - The author's original keyboard lasted 7 years of hard labour in a household with young children. Apart from normal use, it was also dropped, jumped on, & chewed many many times. It has now been replaced with a 2nd-hand diNovo Mini unit, which are quite cheap.
In principle the following should not be necessary: bluetooth devices should remember each other. At worst, the first connect should synchronize the devices. Alas, on my system, running either built-from-scratch MythTV on Fedora or current pre-built MythBuntu, I have to search and connect on each boot. --dave c-b
As part of the process of ensuring resynchronization on MythBuntu boot, I added
- a directory and script, /etc/local.d/bluetooth, saying
# # bluetooth -- scan until a device is found, then connect # to a hard-coded address. # (set -x logger -p kern.info starting to connect to the keyboard. hidd --connect 00:07:61:D2:71:55 if [ $? -ne 0 ]; then logger -p kern.warn initial hidd connect 00:07:61:D2:71:55 failed, starting scan loop. else logger -p kern.info hidd connected the keyboard. exit 0 fi hcitool scan while [ $? -ne 0 ]; do logger -p kern.warn hcitool scan failed, retrying. hcitool scan done hidd --connect 00:07:61:D2:71:55 if [ $? -ne 0 ]; then logger -p kern.warn hidd connect 00:07:61:D2:71:55 failed, halting. else logger -p kern.info hidd connected the keyboard. fi exit 0) 2>&1 | tee /var/log/local.d.bluetooth.log
- the line "sh /etc/local.d/bluetooth &" to the end of /etc/rc.local
- a "bluetooth" script in my bin directory saying "sudo sh /etc/local.d/bluetooth"
This is still under development, but in principle should resynchronize quietly on reboot, and if not, when the "bluetooth" script is run. In practice hcitool seems to return 0 on error, so it's still in test for at least two edge cases...
I pressed the red button to make my keyboard discoverable then ran "bluetooth", After a few red flashes, the lights went green, and the second and subsequent presses on the cursor pad was seen by MythBuntu.
The syslog output of that (manual) run looked like:
Nov 27 10:21:46 pvr davecb: starting to connect to the keyboard. Nov 27 10:21:58 pvr hidd: New HID device 00:07:61:D2:71:55 (Logitech diNovo Mini Keyboard ) Nov 27 10:21:58 pvr kernel: [ 196.446928] input: Logitech diNovo Mini Keyboard as /devices/pci0000:00/0000:00:1a.1/usb4/4-1/4-1:1.0/bluetooth /hci0/hci0:42/input7 Nov 27 10:21:58 pvr kernel: [ 196.447142] generic-bluetooth 0005:046D:B30C.0003: input,hidraw2: BLUETOOTH HID v0.40 Mouse [Logitech diNovo Mini Keyboard ] on 00:1B:DC:02:0A:9B Nov 27 10:21:58 pvr davecb: hidd connected the keyboard.
(All trademarks property of their respective owners.)