LinuxMCE Forums

General => Installation issues => Topic started by: itsmeok on January 26, 2009, 11:19:07 pm

Title: Using additional button on Logitec MX Air (is this solution fine with LMCE ?)
Post by: itsmeok on January 26, 2009, 11:19:07 pm
Is there anyone who wants to support me on getting the F6, F7 and F8 button configured on a logitec MX Air mouse. It works out of the box with some of the buttons. Am using 7.10 RC2

I wanted to programm additional buttons as described on the wiki:
http://wiki.linuxmce.org/index.php/Use_Additional_Mouse_Buttons#Result

I checked with XEV application and it recognised until button 5. I changed the procedure to use B:2 B:4 and B:5 (last two are the scroll buttons)

I have done the troubleshooting instructions to see if that would help but no success

Can someone who has it working check the procedure if it is correct ?

The thing that suprised me was that with using the following instruction I created an new file. Is that correct ?
sudo nano -w /etc/apt/sources.list

In the wiki on the logitec MX AIR page there is a link to the following website http://www.hidpoint.com/ for a driver. I am a bit reluctant to install this as the demo does not show that you can program the additional buttons for the function keys.

Any ideas ?

Does changing xorg.conf do anything on my installation or is another config file used ? I have a configuration for the mouse from someone else with the same mouse. Changing that in xorg.conf is not doing anything on my system.
Title: Re: Using additional button on Logitec MX Air (Help Wanted)
Post by: itsmeok on January 27, 2009, 04:36:59 pm
changed question and additional info:

In the procedure you have to update the sources.list file. It was not in the mentioned directory. I found the file in another directory. Is this correct ?
/etc/debtags/sources.list
Title: Re: Using additional button on Logitec MX Air (Help Wanted)
Post by: Zaerc on January 28, 2009, 12:40:45 am
changed question and additional info:

In the procedure you have to update the sources.list file. It was not in the mentioned directory. I found the file in another directory. Is this correct ?
/etc/debtags/sources.list

No it isn't.
Title: Re: Using additional button on Logitec MX Air (Help Wanted to review procedure w
Post by: itsmeok on January 29, 2009, 09:02:19 pm
Not sure what you are meaning. The file on my system was not there. There was a file named like that on another place. I have installed using the standard LinuxMCE 7.10 RC2 DVD. I wonder what is going wrong then and why the file was not there ?

Title: Re: Using additional button on Logitec MX Air (Help Wanted to review procedure wiki)
Post by: colinjones on January 29, 2009, 09:25:46 pm
/etc/apt/sources.list is correct, don't change anything else....

yes it is there on your system, look again.. if it isn't then you must have screwed up your install somehow.
Title: Re: Using additional button on Logitec MX Air (Help Wanted to review procedure w
Post by: itsmeok on January 29, 2009, 10:19:24 pm
Well, what I will do this weekend I will reinstall from scratch again. Will look again afterwards and update. Thanks for your support.

Title: Re: Using additional button on Logitec MX Air
Post by: itsmeok on January 31, 2009, 12:02:34 am
Before I did the reinstall in thought why not try with BTNX for using additional buttons. No issues if I mess up my system. Am I getting myself into trouble by using BTNX ?

I have F6, F7 and F8 working now on my buttons.

If not I will document my instructions on the wiki
Title: Re: Using additional button on Logitec MX Air (is this solution fine with LMCE ?
Post by: tschak909 on February 01, 2009, 09:17:59 am
Thanks for your hard work. :)

Could someone Please look into doing a device template, as well as doing any package work so that the rest of us can have this as plug and play.

-Thom
Title: Re: Using additional button on Logitec MX Air (is this solution fine with LMCE ?
Post by: itsmeok on February 01, 2009, 12:33:11 pm
Is it difficult to create device templates. I am willing to help but will need some guiding from a specialist.

Send me a msg if I can help
Title: Re: Using additional button on Logitec MX Air
Post by: colinjones on February 01, 2009, 01:13:56 pm
Before I did the reinstall in thought why not try with BTNX for using additional buttons. No issues if I mess up my system. Am I getting myself into trouble by using BTNX ?

I have F6, F7 and F8 working now on my buttons.

If not I will document my instructions on the wiki

What's BTNX? (its late, couldn't be bothered wikipedia'ing it!)
Title: Re: Using additional button on Logitec MX Air (is this solution fine with LMCE ?
Post by: itsmeok on February 01, 2009, 02:01:36 pm
Well it is a piece of software. See the page for the Logitec MX AIR that I eddited:

http://wiki.linuxmce.org/index.php/Logitech_MX_Air

Or look on the webpage:

http://www.ollisalonen.com/btnx/

Let me know if using this troubles my LinuxMCE installation
Title: Re: Using additional button on Logitec MX Air (is this solution fine with LMCE ?)
Post by: colinjones on February 01, 2009, 07:30:12 pm
I see.

So what Thom is saying is, if you create a new device template for this device it will make the process automatic for others. Basically, I think this is the way it works.

1. Create a pnp script - this is responsible for detecting when that specific mouse is plugged in - I'm thinking that using an "lsusb" with a grep for the manufacturer:product IDs would be one way of doing this. Then you use MessageSend to send a DCE message to the router telling it that you successfully identified the device, and what its device template number is.

2. Create a device template with this template number, and configure it to install and configure the software BTNX

Not sure how the process kicks off, but I assume that when linux detects a new USB device being attached, LMCE hooks into this somehow and triggers its own pnp system. This then runs any associated pnp scripts for that connectivity (USB), one of which successfully detects its device and sends a message to the router telling it to add that device to the system. The process of adding the device kicks off the package installation and configuration that you have configured within that device template. The upshot is, you plug in one of those mice and LMCE will automatically detect it, install the BTNX software and configure it for you.
Title: Re: Using additional button on Logitec MX Air (is this solution fine with LMCE ?
Post by: itsmeok on February 02, 2009, 10:24:08 am
Well, I am willing to help but half you are saying I am not familiar with. I would need a lot of guidance, but for sure I want to help and test this.

Let me know if you have time for doing this together.


Title: Re: Using additional button on Logitec MX Air (is this solution fine with LMCE ?)
Post by: colinjones on February 02, 2009, 10:30:36 am
thom - do you know if there is a step by step guide for creating a new device template? They are quiet complex, and each category has very different fields. It isn't at all clear which fields do what, and which ones need to be configured, what they do etc.
Title: Re: Using additional button on Logitec MX Air (is this solution fine with LMCE ?
Post by: tschak909 on February 02, 2009, 10:43:54 am
all the info we have on creating device templates is in the wiki, do a search for device template.

-Thom

Title: Re: Using additional button on Logitec MX Air (is this solution fine with LMCE ?)
Post by: colinjones on February 03, 2009, 12:43:29 am
http://wiki.linuxmce.org/index.php/Edit_Device_Template and
http://wiki.linuxmce.org/index.php/Plug%26play

itsmeok - you don't actually have to write a script at all. Once you create a new device template you can enter the vendor/product IDs directly into the template in the Vendor Model ID field under the Plug n Play box. Just concatenate the 2 numbers together with no ':' into a single 32bit hex number. These 2 numbers come from running lsusb.

Then using the install package for the software, you can configure a new "package" for LMCE at the top of the template.

The Device responsible for generating these Device Detected events in the case of USB devices (and PCI, SCSI, etc) is the HAL device. It will send an event to the PNP Plugin, which registers it in the pnpQueue table, then - it uses the info supplied in these events to attempt to identify a group of applicable Device Templates. Then within those templates it uses the MAC address ranges, USB vendor/product IDs or even the specified pnp script further narrow down the list. This is then presented to the user in the wizard to confirm the device and configure it. At that point I assume it installs the package that you specified and configuration in the Device Template.

Thom - am I heading in the right direction with this?
Title: Re: Using additional button on Logitec MX Air (is this solution fine with LMCE ?
Post by: tschak909 on February 03, 2009, 01:03:34 am
Yes, but you'll need to use the Packages section to define a driver package for it. Look at some of the other packages, like the CreateDevice and CreateDevice Source packages to see how things are structured.

-Thom
Title: Re: Using additional button on Logitec MX Air (is this solution fine with LMCE ?)
Post by: colinjones on February 03, 2009, 01:50:37 am
I was looking at that section, but it was far from clear exactly what it was doing, which is why I was vague on that bit in my post!

I'm assuming that you can point it at any normal .deb or, as in some of the examples, at the online apt sources, and it will just do the equivalent of apt-get install or dpkg -i against whatever you point it at. There also seems to be a fall-through so that if the binary .deb isn't available, it will grab the source code and compile it. And this seems to be the bit that the dependencies section is for. Not at all clear on how to configure it -

complete speculation - but there seems to be a section for miscellaneous files. Perhaps, if the package you're installing gets its config from a .conf file. You specify your own custom one here, and it inserts it into the right location before starting the process? But that doesn't tell me how you can get device data (either template default, or entered through the UI) into a package.... is device data perhaps only for packages specifically designed to be a DCE device and therefore not applicable to this BTNX driver (unless you write a "wrapper" around it)?
Title: Re: Using additional button on Logitec MX Air (is this solution fine with LMCE ?
Post by: tschak909 on February 03, 2009, 03:11:14 am
Okay, I am reading through this bit by bit to figure out how to respond to you, but basically:

Yes, a package can have multiple sources... Which one is used, depends on whether the package is being built by MakeRelease (the source package), or being installed by the system (ConfirmDependencies), we currently use the Pluto Ubuntu Addons source for most of our stuff, but you can use an external URL source, etc, to download the package from elsewhere. Which ones are apropos still...need to be documented... :)

This whole system forms an abstraction so that later on, other linux distributions and other platforms can easily be coodinated, MakeRelease can build the appropriate packages for a given distribution, and ConfirmDependencies can automatically install for the right distribution.

Take note specifically of the individual folders, and their file components, note that you can use wildcards, but also note the use of the flip source checkbox. Binaries use it, source packages do not. It alters how the path fields are parsed. Pay attention and notice that the paths basically pick up where the paths in the sources area leave off.

As for miscellaneous files, notice that there are mkr_foo.sh scripts typically put there. This can also be used to install boot scripts into their appropriate places, etc. There are mkr_ scripts for preinst, postinst, prerm, and postrm. This is where you do any configuration required by the package that may be required like, setting it up as a system service, whatever. Look at examples of mkr_postinst.sh etc in the individual packages in src/ in the SVN.

-Thom