Blog

Microsoft Bluetooth Notebook Mouse 5000 on Fedora 17

This is just a quick post on how to get the Microsoft Bluetooth Notebook Mouse 5000 to work on Fedora 16/17. I found a blog post describing a similar method for Ubuntu 8.10, however I wanted to enshrine the slightly different and more involved process for Fedora users like myself.

  1. Plugin and/or enable your computer's bluetooth radio.
  2. Switch on the mouse and press and hold the bluetooth pairing button for a few seconds.
  3. Open up a terminal window and execute the following to scan for available bluetooth devices:
    $ hcitool scan
    
  4. Look for the hardware address for the "Microsoft Bluetooth Notebook Mouse 5000", eg:
    Scanning ...
            00:1D:D8:91:09:E2        Microsoft Bluetooth Notebook Mouse 5000
    
    Note that my my mouse's hardware address is "00:1D:D8:91:09:E2".
  5. Open the "rfcomm.conf" bluetooth configuration file - e.g. in Vim:
    $ sudo vi /etc/bluetooth/main.conf
    
  6. Add the following to the "rfcomm.conf" configuration file:
    device HARDWARE_ADDRESS {
            name “Microsoft Bluetooth Notebook Mouse 5000”;
    }
    
    Be sure to replace "HARDWARE_ADDRESS" with your mouse's hardware address.
  7. Save the configuration file and restart the bluetooth service:
    $ sudo service bluetooth restart
    
  8. Pair the mouse to your system:
    $ sudo hidd --search
    
    This should output something similar to:
    Searching ...
            Connecting to device 00:1D:D8:91:09:E2
    
  9. Your mouse should now be fully functional! However, you will want to shut off the mouse now and see if it auto re-connects. If it doesn't start working right away, you just need to go through the 'normal' processes of adding the mouse via the bluetooth system tray icon:
    1. Click the bluetooth system tray icon.
    2. Click "Set up a New Device..."
    3. Press and hold the mouse's bluetooth pairing button for a few seconds.
    4. When the mouse shows up in the window, select it and click the "Continue" button.
    5. The window will state it is connecting, but might freeze on this screen. That is OK. Just close the dialog after about 20 seconds of it just sitting on this message.
    6. Click the bluetooth system tray icon again and notice that the mouse is showing up in this bubble.
    7. Click the mouse and toggle the connection slider to enable the connection.
    8. After a few seconds the mouse should work.

Your mouse should now be fully functional! Let me know if you ran into any issues while following this how-to.


An All New BlakeRohde.com!

I am happy to present an all new, fully redesigned BlakeRohde.com! This marks the first time I have spent a significant number of hours designing and overall developing this personal site and I am very proud of the results. This post aims to highlight a few of the new features and, hopefully unbeknownst to you, new technologies I am using in this latest revision.

One of the particularly fun aspects of the new design is that I have designed the layout so that any HTML element can be used as a full-screen backdrop. This not only allows me to theme the site with photos and images but also with subtle time-lapse videos or even dynamically drawn images using JavaScript and the HTML5 canvas tag. Feel free to dive into my HTML and CSS to figure out how I went about doing this. If time permits I may post a short how-to in the future.

Blake Rohde Logo
The all-new logo!

Another particularly fun aspect of the new design was in the creation of my new logo. The new logo is comprised of two characters "i" and "o" positioned in a way that resembles a "b". I think it goes without saying but the "i" and "o" are significant as they typically represent the abbreviation for input/output in the realm of software and hardware design.

Each blog post and project page has a recommend count which you can click to increment to show that you liked the relevant article. This is powered by the jQuery Recommend Plugin I built and released open source about six months ago. The plugin has been rebuilt from the ground up and you can check out the source code on GitHub if you are interested in adding similar functionality to your site or blog. The structure of the new version of this plugin closely follows the jQuery Core Structure Guidelines and subsequently a great jQuery plugin template I stumbled upon a while back.

HTML5 Logo
About the HTML5 Logo

With the latest iteration of this site I am now making use of the new HTML5 elements and CSS3 features that have been largely supported by modern browsers for a while now. I highly recommend Dive into HTML5 if you are considering using HTML5 in your next project. Mozilla also has great resources on the Mozilla Developer Network, and in specific, HTML5 and CSS. Note though that Internet Explorer versions 8 and older do not properly handle the new HTML5 elements by default so I also recommend using the HTML5Shiv to easily add HTML5 support for those browsers.

As I note in the new about page, I am now using LESS to make CSS development easier. LESS is a CSS preprocessing language that allows you to use variables and function constructs not yet found in CSS. LESS comes with a JavaScript plugin and Node.js package for compiling the LESS files into vanilla CSS in-browser (for development) and server-side (for production), respectively. I personally have a nice and clean Makefile-based work flow that allows me to compile and minify all LESS into CSS without even thinking about it.

I am now using Sidewalk to aggregate all my public social media data to display as a list of my most recent activities on the home page and site footer. I created an activity processor for each social media site, such as Twitter, GitHub, and Google+. Each processor is executed periodically to check for new posts from the service's API. Each processor compares date-timestamps with the last local database entry for that service, and if new entries exist, creates a new entry for each item. I am also using Sidewalk to send email alerts when comments have been created and are pending approval for publication. On a side note, some of these activity processors will probably work their way into Sidewalk's documentation as examples in the near future.

Another note-worthy change is that I am no longer using Disqus for comments within blog posts and project pages. I found that Disqus' service does not provide reliable SSL support, and thus viewers of this website would quite frequently be alerted that the connection to this site was 'partially encrypted'. As a result I now self-host all comments with an all new commenting system which allows for faster page load times, reliable SSL support site-wide, and easier comment moderation.

Aside from the new contact page and a complete revamp of the back-end logic, that just about covers all the new features and technologies introduced in this latest site revamp. I put a lot of time, effort, and thought into every aspect of this site and I hope you enjoy it as much as I did creating it. As always, I would appreciate any feedback and constructive criticism or recommendations!


Gamepads, Joysticks on Fedora 17

I realize that you most likely ended up here via a Google search or similar due to programs and games not recognizing your gamepad or joystick. So, I will spare you the details of my painful, countless hour adventure as to figuring out why my PS3 and Xbox 360 controllers weren't being recognized by my favorite games.

The Problem

As of Fedora 17, the default kernel no longer includes the joydev kernel module. As a result, when you plug in your gamepad or joystick, the device's associated /dev/input/jsX device path is not created and thus applications and games do not see the device.

The Solution

Luckily, when Fedora developers ripped out the joydev kernel module from the default Fedora 17 kernel, they put it into an easily installable package in the core repository used by yum. The following commands will allow you to install the 'kernel-modules-extra' package that contains the needed joydev kernel module, and install the 'joystick' package which allows you to test your gamepad and joystick to verify your system is able to read all button presses and movements:

$ sudo yum install kernel-modules-extra
$ sudo yum install joystick

After installing these packages and plugging in your gamepad or joystick, you should see the device's associated device path show up as jsX in the /dev/input directory. You can test your gamepad or joystick using the 'jstest' command-line program that comes with the joystick package. To test the device, run the following command:

$ jstest --event /dev/input/jsX

If you are prompted with a permissions error, execute:

$ sudo chmod 666 /dev/input/jsX

Installing Qjoypad (optional)

If, like me, you are new to using gamepads and joysticks in Linux, you will want to learn about and install qjoypad. Qjoypad allows you to easily map button presses and other actions with your gamepad or joystick with simulated keyboard key presses or mouse movements. This comes in handy when a game you are trying to play doesn't support your controller, or doesn't offer the ability for you to customize the controls. There are a couple of alternatives to qjoypad, however I found qjoypad to be the most intuitive to use at the time of writing this article. If you want to install qjoypad to your system, you will want to do so by following these steps:

  1. Install dependent Qt packages (version 4+):
    $ sudo yum install qt qt-devel
    
  2. Download the latest version of qjoypad
  3. Un-tar the package:
    $ tar xvfz qjoypad-VERSION.tar.gz
    
  4. Get into the src/ directory of the un-tarred package
  5. Comment out lines 14 through 17 in the 'config' file -- this is an unneeded check that doesn't work properly if 'qt-devel' installs 'qmake' with a differnent name e.g. 'qmake-qt4' -- e.g.:
    #if ( ! qmake ); then
    #    echo "Error: you need qmake!";
    #    exit 1;
    #fi;
    
  6. Execute the 'config' file to generate the 'Makefile' file:
    $ ./config
    
  7. Add '-lX11' without quotes to the end of line 19 in the newly-generated 'Makefile' file and be sure to include a space between the new flag and '-lpthread' -- e.g.:
    LIBS = $(SUBLIBS)  -L/usr/lib64 -lXtst -lQtGui -lQtCore -lpthread -lX11
    
  8. Build the package and install it to your system:
    $ sudo make install
    
  9. Run qjoypad!
    $ qjoypad
    

Qjoypad should now be running and an icon should have been added to your system tray. You can double click the icon to begin mapping your gamepad or joystick's button presses/actions with simulated keyboard keys and mouse movements.

Hopefully your gamepad or joystick is now working as expected. Although the solution to this problem was quite simple, the problem was very difficult to troubleshoot for a self-proclaimed Linux-gaming-novice like myself as there were virtually no search results hinting at solutions to this issue. Hopefully this post and discussions I participated in on reddit and gaming.stackoverflow.com make their way to the top of future search results to help others. I hope this helped you out and feel free to ask questions in the comments section below if you ran into any problems.