Add support for MidiSport USB midi interfaces

Bug #27833 reported by James Gregory
42
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Baltix
New
Medium
Unassigned
midisport-firmware (Ubuntu)
Fix Released
Wishlist
Luke Yelavich

Bug Description

as per the summary line, please add support for the MidiSport USB-MIDI
interfaces. It was relatively straightforward to get them working in Breezy, but
since hotplug has been removed, it's now fairly fiddly.

First, the GPL firmware for the device will need to be added to the package
archive. The source code is available here:

    http://sourceforge.net/project/showfiles.php?group_id=17679

Under the "firmwarehotplug" fileset. I have until now been using the 'ezusbmidi'
package from the agnula/demudi project. The package, along with its sources are
available here:

    http://http.demudi.org/pool/demudi/woody/

The source packages there build just fine on my ubuntu-dapper install; they can
probably be imported directly.

Finally, some conversion will need to be done on the hotplug scripts in that
package so that udev will load the firmware when the MidiSport is plugged in
(and something needs to load the snd-usb-audio, snd-seq-midi, etc drivers as
well). If new scripts are to be written, they will need to invoke the 'fxload'
utility to upload the firmware

Note that the hotplug scripts included in that package made the device 'just
work' once plugged in. There's only a few lines in them; it should be a
straightforward port.

I will attach the 'lsusb -v' output relevant to the device, after the firmware
has been loaded and the kernel modules loaded.

Revision history for this message
James Gregory (ubuntu-bugs-james) wrote :

Created an attachment (id=5529)
lsusb -v output for MidiSport 2x2 USB-MIDI interface.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Ben, this is a request to add additional firmware to the kernel packages.

Changed in udev:
assignee: keybuk → kernel-team
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

My mistake, this needs fxload, so isn't kernel.

Changed in linux-source-2.6.15:
assignee: kernel-team → keybuk
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Wishlist only, no plans to implement this for dapper

Changed in udev:
status: Unconfirmed → Confirmed
Revision history for this message
Forest Bond (forest-bond) wrote :

I have already uploaded a midisport-firmware package to revu. Please see http://revu.tauware.de . This will probably be in edgy.

Revision history for this message
LevTermen (theremin) wrote :

Just a little update to add that it still doesn't work on Edgy for the two of us from here:
http://ubuntuforums.org/showthread.php?p=1741339

Revision history for this message
Forest Bond (forest-bond) wrote :

This didn't make it in time for edgy; look for it in feisty. Temporarily, a package for edgy can be downloaded from here:

http://apt.alittletooquiet.net/fab/pool/main/m/midisport-firmware/midisport-firmware_1.2-0ubuntu2_all.deb

Ignore the text in /usr/share/doc/midisport-firmware/README.Debian regarding /etc/fstab.

You may need to restart udev after booting in order for the device to be detected; I have not yet figured out why.

To restart udev:

$ sudo /etc/init.d/udev restart

-Forest

Revision history for this message
Forest Bond (forest-bond) wrote :

Correction: the instructions in /usr/share/doc/midisport-firmware/README.Debian are, in fact, correct. Restarting udev shouldn't be necessary.

-Forest

Revision history for this message
LevTermen (theremin) wrote :

Thank you for your time. Actually this package doesn't seem to help more than compiling and installing the source code.

I added the following in /etc/fstab as adviced on /usr/share/doc/midisport-firmware/README.Debian:
usbfs /dev/bus/usb usbfs defaults 0 0

I did, in disorder to meet all possibilities, reboot my system, restart udev, replug the device... nothing helps!

I can paste here the output of any command (lsusb; dmesg; cat /proc/asound/cards) by request.

Notice that I've followed the following tutorial:
https://help.ubuntu.com/community/UbuntuStudioPreparation
therefore my /etc/modprobe.d/alsa-base contains the following line:
options snd-usb-audio index=-2

I suspect we should rather look at the multiple soundcards issue, shouldn't we? The facts are here:
https://wiki.ubuntu.com/UbuntuStudio/HowToInstallTheLastAlsaDriverForProSoundCard

Changed in udev:
assignee: keybuk → nobody
Changed in udev:
assignee: nobody → forest-alittletooquiet
Revision history for this message
Erik Ridderby (paddlaren) wrote :

Hi!

The problem is that the fxload needs a device as arguemnt (-D /proc/bus/usb/XXX/YYY).

I have made a wrapper-script and a new udev-rules-file to be used. They works fine on my system but I'd like to have other test them as well.

The script have GLP 3 licence and feel free to include them in the package.

The attachment is a package with a fix for this problem. I will send this to the midi_sport mainatainer as well but the fix is designed to work on my Kubuntu 7.04. Please read the README file for installation description.

Please send feedback of the script. It works just fine on my computer. It made my Kubuntu with some packages from UbuntuStudio a darn good MIDI-studio!

Revision history for this message
Erik Ridderby (paddlaren) wrote :

By the way....
My fix assumes that the package: midisport-firmware is installed on the system.

Revision history for this message
Erik Ridderby (paddlaren) wrote :

And as always one find a simplier solution when one is done :)
Install the midisport-firmware-package

Change the following in the /etc/udev/roles.d/85-midisport-firmware.rules:
Within the brackets on each rule, add -D $env{DEVNAME} within the brackets.

Example for the Midisport 2x2 rule:
# MidiSport 2x2
ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0763", ATTRS{idProduct}=="1001", RUN+="/sbin/fxload -s /lib/firmware/maudio/MidiSportLoader.ihx -I /lib/firmware/maudio/MidiSport2x2.ihx"

Shall be change to:
# MidiSport 2x2
ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0763", ATTRS{idProduct}=="1001", RUN+="/sbin/fxload -s /lib/firmware/maudio/MidiSportLoader.ihx -I /lib/firmware/maudio/MidiSport2x2.ihx -D $env{DEVNAME}"

I add a modified rules-file with no guarantee what so ever. This is the small matter left before you have midi-support.

Revision history for this message
Forest Bond (forest-bond) wrote :

Aha! This wasn't necessary on my system. I'm not clear as to what makes this necessary; any ideas?

Unfortunately, I no longer have my MidiSport, as it was loaned to a friend. I can apply your changes to the package, and, if you can test them, I'll see if I can get the package uploaded for Gutsy...

-Forest

Revision history for this message
Erik Ridderby (paddlaren) wrote : Re: [Bug 27833] Re: Add support for MidiSport USB midi interfaces

It is a mysterium for me why this suddenly araise and why only some of us
seems to need it. But it is very obvius that the fxload needs a -D argument
with the devicepath so I am rather more impressed that it work without this
fix.

I will certain test the package if you give me a hint of where to find it.

Regards,
Erik

Revision history for this message
Forest Bond (forest-bond) wrote :

Hi,

On Fri, Aug 03, 2007 at 05:20:31AM -0000, Paddlaren wrote:
> It is a mysterium for me why this suddenly araise and why only some of us
> seems to need it. But it is very obvius that the fxload needs a -D argument
> with the devicepath so I am rather more impressed that it work without this
> fix.

Actually, the manpage indicates that if -D is not used, the environment variable
$DEVICE is used instead. I believe that either udev or the kernel sets this
variable, which is why it works on my system without the -D.

Are you sure the -D is necessary on your system?

What version of Ubuntu are you running? I believe there was a minor glitch on
Edgy (or was it Dapper?) that caused some USB devices requiring firmware to not
come up at boot time, but if udev was restarted (sudo /etc/init.d/udev restart),
the devices would then be able to load correcdtly. If I'm remembering
correctly, this was related to usbfs, and whether or not it was loaded at the
right time in the process.

Can you try changing your udev file back to the version without the -D and
rebooting? If your MidoSport doesn't work at that point, restart udev. If it
still doesn't work, I'd like to figure out why that is.

> I will certain test the package if you give me a hint of where to find
> it.

Ok, when/if I have one ready, I'll post a link.

thanks,
Forest
--
Forest Bond
http://www.alittletooquiet.net

Revision history for this message
Erik Ridderby (paddlaren) wrote :

Hi!

2007/8/3, Forest Bond <email address hidden>:
>
> Hi,
>
> On Fri, Aug 03, 2007 at 05:20:31AM -0000, Paddlaren wrote:
> > It is a mysterium for me why this suddenly araise and why only some of
> us
> > seems to need it. But it is very obvius that the fxload needs a -D
> argument
> > with the devicepath so I am rather more impressed that it work without
> this
> > fix.
>
> Actually, the manpage indicates that if -D is not used, the environment
> variable
> $DEVICE is used instead. I believe that either udev or the kernel sets
> this
> variable, which is why it works on my system without the -D.

Missed that.

Are you sure the -D is necessary on your system?
>
> What version of Ubuntu are you running? I believe there was a minor
> glitch on
> Edgy (or was it Dapper?) that caused some USB devices requiring firmware
> to not
> come up at boot time, but if udev was restarted (sudo /etc/init.d/udev
> restart),
> the devices would then be able to load correcdtly. If I'm remembering
> correctly, this was related to usbfs, and whether or not it was loaded at
> the
> right time in the process.

I am using kubuntu 7.04 and have enabled the backport repositories. I have
also installed meta-packages for a music studio from UbuntuStudio
installed. The udev package have the version 108-0ubuntu4. fxload is version
0.0.20020411-1.

uname reports:
Linux kalle 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686
GNU/Linux

Can you try changing your udev file back to the version without the -D and
> rebooting? If your MidoSport doesn't work at that point, restart
> udev. If it
> still doesn't work, I'd like to figure out why that is.

Before I started to hack the udev-rules I installed the midisport-package
and failed to load the firmware. Then I rebooted my machine and still
failed.

I modified the script above to print $DEVICE and $DEVNAME into a log file
and $DEVICE is not set or contains no information.
It seems that one difference is that my fix uses $DEVNAME instead of
$DEVICE. Anybody knows why/when this is changed? Are there a setting for
this that can differ?

The trace-printout results in:
${DEVICE}:
${DEVNAME}: /dev/bus/usb/002/080

> I will certain test the package if you give me a hint of where to find
> > it.
>
> Ok, when/if I have one ready, I'll post a link.
>
> thanks,
> Forest
> --
> Forest Bond
> http://www.alittletooquiet.net
>
> --
> Add support for MidiSport USB midi interfaces
> https://bugs.launchpad.net/bugs/27833
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Forest Bond (forest-bond) wrote :

On Fri, Aug 03, 2007 at 02:32:54PM -0000, Paddlaren wrote:
> 2007/8/3, Forest Bond <email address hidden>:
> I modified the script above to print $DEVICE and $DEVNAME into a log file
> and $DEVICE is not set or contains no information.
> It seems that one difference is that my fix uses $DEVNAME instead of
> $DEVICE. Anybody knows why/when this is changed? Are there a setting for
> this that can differ?
>
> The trace-printout results in:
> ${DEVICE}:
> ${DEVNAME}: /dev/bus/usb/002/080

Interesting.

As I mentioned before, I don't currently have the hardware to test this with,
but it was working on my system. Perhaps something changed with udev...

I'll see if I can get some advice from someone who knows udev better than I do.

-Forest
--
Forest Bond
http://www.alittletooquiet.net

Revision history for this message
spart (germain) wrote :

Hi...
I experienced the same problem with a midisport 2x2 on a fresh kubuntu Feisty.

The proposed fix by Paddlaren (https://bugs.launchpad.net/ubuntu/+source/udev/+bug/27833/comments/12)
works fine for me.

BTW, this bug still has WHISHLIST status. That doesn't seem accurate?

Revision history for this message
Juan Carlos Inostroza (jci) wrote :

I can confirm the fix by Paddlaren solves the problem.

Revision history for this message
Richard Taylor (rsjtaylor) wrote :

Same problem in gutsy just so as you know. Not tried the solution yet but don't have the mentioned directory or file so not hugely optimistic, maybe I'm missing some package or other?

Revision history for this message
Forest Bond (forest-bond) wrote :

Ok, sorry for the delay. I'm not getting a response from The People That Would Know. It's a busy time for them.

I see two confirmations that Paddlaren's changes fix this issue:

* Paddlaren
* Juan Carlos Inostroza

Add one or two more to that list and I'm convinced; I'll see if I can upload the changes for Hardy.

James Gregory? Lev Terman?

Revision history for this message
Forest Bond (forest-bond) wrote :

I see further confirmation of this fix in #88923 (marked as duplicate of this bug now). Debdiff with fix attached.

Revision history for this message
carrasclin (fontanet9) wrote :

To Forest Bond.

I see in your attached debdiff something like...

<code>
# MidiSport 2x2
-ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0763", ATTRS{idProduct}=="1001", RUN+="@fxload@ -s @firmwaredir@/MidiSportLoader.ihx -I @firmwaredir@/MidiSport2x2.ihx"
+ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0763", ATTRS{idProduct}=="1001", RUN+="@fxload@ -s @firmwaredir@/MidiSportLoader.ihx -I @firmwaredir@/MidiSport2x2.ihx" -d $env{DEVNAME}
</code>

PLEASE, PLEASE, it is not correct!!!

the '-d $env{DEVNAME}' MUST be inside the quote commas. And the '-d' should be an upper case.

Like this...
<code>
ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0763", ATTRS{idProduct}=="1001", RUN+="@fxload@ -s @firmwaredir@/MidiSportLoader.ihx -I @firmwaredir@/MidiSport2x2.ihx -D $env{DEVNAME}"
</code>

If not this way, would not work.

I've also tried the '-D $tempnode' as pointed out by other colegue and also works OK.

It is interesting to know also that I have compiled from the source available on the sourceforge.net on an official Debian Etch and the original '42-midisport-firmware.rules.in' as ALSO the proposed modified one both work.
But on Ubuntu (both Feisty and Gutsy) the only way to make it work is with the above code, whether with -D $env{DEVNAME} or -D $tempnode.

Greetings.

Revision history for this message
Forest Bond (forest-bond) wrote :

> I see in your attached debdiff something like...
>
> # MidiSport 2x2
> -ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0763", ATTRS{idProduct}=="1001", RUN+="@fxload@ -s @firmwaredir@/MidiSportLoader.ihx -I @firmwaredir@/MidiSport2x2.ihx"
> +ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0763", ATTRS{idProduct}=="1001", RUN+="@fxload@ -s @firmwaredir@/MidiSportLoader.ihx -I @firmwaredir@/MidiSport2x2.ihx" -d $env{DEVNAME}
>
> PLEASE, PLEASE, it is not correct!!!
>
> the '-d $env{DEVNAME}' MUST be inside the quote commas. And the '-d' should be an upper case.

Right, sorry about that. Fixed version attached.

> It is interesting to know also that I have compiled from the source available on the sourceforge.net on an official Debian Etch and the original
> '42-midisport-firmware.rules.in' as ALSO the proposed modified one both work.
> But on Ubuntu (both Feisty and Gutsy) the only way to make it work is with the above code, whether with -D $env{DEVNAME} or -D $tempnode.

Yes, I think this is due to some Ubuntu-specific udev/kerenl stuff, although I don't really know enough about that to be sure.

Thanks,
Forest

Revision history for this message
silicium (silicium) wrote :

Hi
Thanks to Paddlaren's package with potential solution to the problem, I was able to start my Midisport 2x2 after moving firmware installed by usb-fw-midi from /usr/local/share/* to /lib/firmware/maudio, and edit procpath expression in /sbin/load_midisport: /proc/bus/usb is empty on my system, but fxload is successful with /dev/bus/usb/xxx/yyy. Debugging this was done with /etc/init.d/udev stop && udevd --debose.

Additional hardware information: my motherboard is an Asus CUR-DLS, running Ubuntu Studio 7.10, kernel 2.6.22-14-rt SMP PREEMPT RT, lots of PCI IRQs, needs boot option 'acpi=force' to prevent bad IRQ mapping (after install, the IRQ for USB host was stolen by another card and USB was completely disabled)

Revision history for this message
Forest Bond (forest-bond) wrote :

To be clear, silicium, you could've gotten your Midisport working by simply changing the udev rules file, as Paddlaren himself described a few posts after he posted his tarball.

-Forest

Revision history for this message
Luke Yelavich (themuso) wrote :

Could you please explain why this package pre-depends on bind9host? It also appears that this package has nothing in it other than documentation, and udev rules...

Changed in midisport-firmware:
status: Confirmed → Incomplete
Revision history for this message
Forest Bond (forest-bond) wrote :

You're knee deep in clues.

It downloads firmware during the install process. The firmware files are not licensed for distribution except as part of the archive on sourceforge.

-Forest

Revision history for this message
Forest Bond (forest-bond) wrote :

bind9-host is used to test internet connectivity before the download. In hindsight, this isn't really necessary, and internet connectivity might go away after the check, anyway. It doesn't really do any harm, though, and most machines have bind9-host installed, anyway.

Luke Yelavich (themuso)
Changed in midisport-firmware:
assignee: forest-alittletooquiet → themuso
status: Incomplete → In Progress
Revision history for this message
Luke Yelavich (themuso) wrote :

midisport-firmware (1.2+dsfg1-0ubuntu2) hardy; urgency=low

  [ Forest Bond ]
  * Added $env{DEVNAME} to fxload calls in udev rules file.
    - LP: #27833
  * Got rid of debian/bzr_release; this was some maintainer book-keeping that
    really is no longer relevant.

  [ Luke Yelavich ]
  * Update maintainer field as per spec.

 -- Luke Yelavich <email address hidden> Mon, 12 Nov 2007 22:43:55 +1100

Changed in midisport-firmware:
status: In Progress → Fix Released
Revision history for this message
PJ (eespjl) wrote :
Download full text (10.9 KiB)

udev does not load my oxygen8 or midisport2x2

Using hardy-alpha6

It has the $env{DEVNAME} in the rule file

I can fire up my midi by using fxload explicitly.

This is what I get when I plug in my midisport2x2

root@bunty:/etc/udev/rules.d# /etc/init.d/udev stop && udevd --verbose
 * Stopping kernel event manager... [ OK ]
[12412] parse_file: reading '/etc/udev/rules.d/05-options.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/05-udev-early.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/20-names.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/30-cdrom_id.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/40-permissions.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/45-fuse.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/50-libpisock9.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/50-xserver-xorg-input-wacom.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/55-hpmud.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/60-symlinks.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/65-persistent-input.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/65-persistent-storage-edd.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/65-persistent-storage-tape.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/65-persistent-storage.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/75-cd-aliases-generator.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/75-persistent-net-generator.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/80-programs.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/85-alsa.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/85-brltty.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/85-hdparm.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/85-hplj10xx.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/85-hwclock.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/85-ifupdown.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/85-midisport-firmware.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/85-pcmcia.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/90-modprobe.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/95-hal.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/95-udev-late.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/libmtp7.rules' as rules file
[12412] parse_file: reading '/etc/udev/rules.d/z60_hdapsd.rules' as rules file
[12412] main: initialize max_childs to 624
[12412] main: initialize max_childs_running to 24
[12412] msg_queue_insert: seq 5326 queued, 'add' 'usb'
[12425] udev_...

Revision history for this message
jof (general-midi) wrote :

I have problem too with midisport2x2 and oxygen8.

I install midisport-firmware and fxload with synaptic, restart my computer, plug my keyboard and midisport2x2.

None of my peripherals is recognized :( in Qjackctl

My config is :

Ubuntu I386 Hardy beta with kernel 2.6.24-15 generic and rt

Revision history for this message
carrasclin (fontanet9) wrote :

The problem seems due to that the usbfs is not mounted on /proc/bus/usb/ but only on /dev/bus/usb. So the udev scripts that use the /proc/bus/usb to upload the firmwares to the attached devices fail to do so since it do not found the respective nodes.

I have found a workaround that I've posted on the duplicate of this bug report here https://bugs.launchpad.net/ubuntu/+source/midisport-firmware/+bug/88923/comments/19

Revision history for this message
carrasclin (fontanet9) wrote :
Download full text (3.8 KiB)

It seem that the way as the udev rules are managed in Ubuntu have been chaged, interestengly making it more compatible with the original Midisport firmware package and with Debian itself. And thats the reason of the latest problems.

The fix consists of two steps.
First of all the usbfs must be properly set. On the Live CD it is not. So you have to isuue 'sudo mount usbfs -t usbfs /proc/bus/usb/'. And on a hard drive installation you have to open '/etc/fstab' and lookout for an entry 'proc /proc proc defaults 0 0'. If it is not pressent edit it and save. You con do it with 'sudo gedit /etc/fstab'

And next comes the firmware issue part:

Actually you have three ways to workaround the problem:

First of all and independent of the installation procedure 'apt-get install fxload'

1- Download the Debian 'precompiled' version from any Debian repo like http://ftp.us.debian.org/debian/pool/non-free/m/midisport-firmware/ and install it with GDebi clicking on it with the secondary mouse button.

2- Download the 'source' package from any Debian repo or from soruceforge.net http://sourceforge.net/project/showfiles.php?group_id=87777 . Actually since the package consists of binary firmware blob files there is no real 'source' package. The difference lies on that the 'source' one is installed with the make utility independently from the package management system.
So you unpack the tarball, enter to the unpacked directory and type the usual './configure && make && sudo make install'

3- Install the one from the Ubuntu repo but 'sudo nautilus' and go to '/etc/udev/rules.d' find a file '85-midisport-firmware.rules' , delete it and with a text editor copy and paste :
---------cut here-------------------------------------------------------------------------
# midisport-firmware.rules - udev rules for loading firmware into MidiSport devices

# DEVPATH=="/*.0" selects interface 0 only
# (some udev versions don't work with SYSFS{bInterfaceNumber})

# MidiSport 2x2
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1001/*", RUN+="/sbin/fxload -s /lib/firmware/maudio/MidiSportLoader.ihx -I /lib/firmware/maudio/MidiSport2x2.ihx"
# MidiSport 1x1
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1010/*", RUN+="/sbin/fxload -s /lib/firmware/maudio/MidiSportLoader.ihx -I /lib/firmware/maudio/MidiSport1x1.ihx"
# KeyStation
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1014/*", RUN+="/sbin/fxload -s /lib/firmware/maudio/MidiSportLoader.ihx -I /lib/firmware/maudio/MidiSportKS.ihx"
# MidiSport 4x4
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1020/*", RUN+="/sbin/fxload -s /lib/firmware/maudio/MidiSportLoader.ihx -I /lib/firmware/maudio/MidiSport4x4.ihx"
# MidiSport 8x8
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1031/110", RUN+="/sbin/fxload -s /lib/firmware/maudio/MidiSportLoader.ihx -I /lib/firmware/maudio/MidiSport8x8-2.10.ihx"
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1031/121", RUN+="/sbin/fxload -s /lib/firmware/maudio/MidiSportLoader.ihx -I /lib/firmware/maudio/MidiSport8x8-2.21.ihx"

# vim: ft=conf
--------cut here------------------...

Read more...

Revision history for this message
Forest Bond (forest-bond) wrote :

Issues mentioned here should be resolved by #213498.

Revision history for this message
jof (general-midi) wrote :

I try with the new package 1.2+dsfg1-0ubuntu4 and i have always problem in Qjackctl.

I type in a terminal lsusb and my peripheral is recognized.

Bus 002 Device 005: ID 0763:1001 Midiman Midisport 2x2.

I tried to load Midisport 2x2 with the script of this page
https://bugs.launchpad.net/ubuntu/+source/midisport-firmware/+bug/88923/comments/19
This does not solve the bug and i have this error in terminal

fxload -I /lib/firmware/maudio/MidiSport2×2.ihx -D /dev/bus/usb/002/005
/lib/firmware/maudio/MidiSportLoader.ihx: unable to open for input.

In the new package 1.2+dsfg1-0ubuntu4 you have changed /etc/udev/rules.d/ midisport-firmware.rules in 42. File 86-midisport-firmware.rules remains in /etc/udev/rules.d/. I have deleted with this command.

sudo rm /etc/udev/rules.d/86-midisport-firmware.rules

I restart my computer i have always problem.

I autoremove --purge and re install midisport-firmware with apt-get. At the end of the installation package,
I do not see the same thing at the installation package 1.2+dsfg1-0ubuntu3. I have not seen the command (Loading additional hardware drivers...) with the new package 1.2+dsfg1-0ubuntu4.

Revision history for this message
Al Buntu (biedermann2) wrote :

>
> I tried to load Midisport 2x2 with the script of this page
> https://bugs.launchpad.net/ubuntu/+source/midisport-firmware/+bug/88923/comments/19
> This does not solve the bug and i have this error in terminal
>
> fxload -I /lib/firmware/maudio/MidiSport2×2.ihx -D /dev/bus/usb/002/005
> /lib/firmware/maudio/MidiSportLoader.ihx: unable to open for input.
>
>

You must do that as Superuser!!
--
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx

Revision history for this message
PJ (eespjl) wrote :

/lib no longer contains the firmware it seems to have migrated to /usr/share/usb

Currently this is the workaround script that works for me (as superuser).

-------
#!/bin/sh
fw=/usr/share/usb/maudio/MidiSport2x2.ihx

bd=$( lsusb | grep Midisport | cut -d ' ' -f 2,4 | sed -e 's/ /\//' -e 's/://' )

dev=/dev/bus/usb/$bd

echo fxload -I $fw -D $dev
fxload -I $fw -D $dev
---------

Revision history for this message
jof (general-midi) wrote :

Thanks you PJ

I try with script

#!/bin/sh
fw=/usr/share/usb/maudio/MidiSport2x2.ihx

bd=$( lsusb | grep Midisport | cut -d ' ' -f 2,4 | sed -e 's/ /\//' -e 's/://' )

dev=/dev/bus/usb/$bd

echo fxload -I $fw -D $dev
fxload -I $fw -D $dev

My peripheral is recognized in Qjackctl :-) I'am very happy

Revision history for this message
Sivert Henriksen (sivert) wrote :

I get

fxload -I /usr/share/usb/maudio/MidiSport2x2.ihx -D /dev/bus/usb/001/002
can't modify CPUCS: Broken pipe

that last script.

What MidiSport*x*.ihx sould i use for Oxygen8? lsusb only says Midiman.

Also, in the last update of the MidiSport firmware in the Ubuntu repo, the firmware is in fact installed to /lib, and not to /usr/share.

Revision history for this message
PJ (eespjl) wrote :

Hi,

/usr/share/usb/maudio/MidiSportKS.ihx

PJ

On Sat, 2008-04-12 at 05:39 +0000, Xecuter88 wrote:
> I get
>
> fxload -I /usr/share/usb/maudio/MidiSport2x2.ihx -D /dev/bus/usb/001/002
> can't modify CPUCS: Broken pipe
>
> that last script.
>
> What MidiSport*x*.ihx sould i use for Oxygen8? lsusb only says Midiman.
>
> Also, in the last update of the MidiSport firmware in the Ubuntu repo,
> the firmware is in fact installed to /lib, and not to /usr/share.
>

Revision history for this message
Sivert Henriksen (sivert) wrote :

Thanks, but I'm still getting
can't modify CPUCS: Broken pipe

Tried restarting udev, as I read further up this page, but no difference?
Something else i should do?

Revision history for this message
carrasclin (fontanet9) wrote :

The message "can't modify CPUCS: Broken pipe" means that the device you intend to load the firmware does not accept it because it is incompatible.
I can reproduce it on my system:
When I issue lsusb with a USB sound card connetcted I get the following:
"remy@d4700:~$ su
Password:
d4700:/home/remy# lsusb
Bus 005 Device 003: ID 067b:2506 Prolific Technology, Inc.
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 004: ID 0d8c:0006 C-Media Electronics, Inc.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000"

so a C-Media's chip USB sound card is connected to Bus 002 Device 004

and then if I issue a stupid command attempting to load some MidiSport firmware to it:

"d4700:/home/remy# fxload -I /usr/share/usb/maudio/MidiSport8x8-2.10.ihx -D /dev/bus/usb/002/004"
then I get exactly:
"can't modify CPUCS: Broken pipe
d4700:/home/remy#"

After having taken a look at M-Audio's home page I see that the new versions of Oxygen keyborards such as 'Oxygen 8 v2 - 25-Key USB MIDI Controller' it says that are 'USB class-compliant'. That means that actually it does not need any driver at all. USB class-compliant devices are supposed --at least in theory-- that are supported with a generic set of drivers incorporated on the operating system. In my case I have a 'generic-no-brand' USB MIDI interface which it seems a replica of M-Audio Midi-Uno and it is automaticaly recognized on qjack control, same happens with the forementioned USB sound card which uses a CM106-L C-Media chip.

So my suggestion is to try to use it without trying to load any firmware and start qjack control and wait a minute or so and look out on the pop-up box after clicking on button 'Connect', tab MIDI, and click on 'Refresh'.

If the Oxygen is the original version 8 in principle the MidiSportKS.ihx firmware should work. But the "can't modify CPUCS: Broken pipe" message what in fact tells us is that inside the keyboard there is something which is not the original interface of first versions of that keyboard series. With the 'USB class-compliant" Oxygen 8 v2 the firmware loading with fxload certainly shall not work, and then the only hope is that it will be automatically recognized by the generic 'class-compliant' drivers provided with ALSA and the kernel.

Revision history for this message
Sivert Henriksen (sivert) wrote :

Okey! I actually got the Oxygen v2, probably should have mentioned it before...

But I've tried what you mentioned, and it doesn't seem to work.
So this means that I have to wait for new drivers to be written?

Revision history for this message
carrasclin (fontanet9) wrote :

I'am affraid it is so.
But in the previous post I've sayed to look at the qjack control tab marked as MIDI, instead you should look also at the tab marked ALSA and see after clicking on 'refresh' button if it shows some MIDI device appart from 'Midi Through'. If the answer is yes probably it is the Oxygen device, even if it is namend with an other name. In that case probably it will be recognaized and work with usual MIDI software such as Rosegarden and soft synths like ZynAddSubFX.

If it is not recognized in any way on qjack control, then the only hope is to wait for newer versions of ALSA that will incorporate generic 'class-compliant' driver support for the Oxygen 8 v.2. Since it is a popular brand there is hope that this could happen.

That is the usual way that goes with Linux. The most recent hardware --and the new version 2 of that particular keyboard it is a rather new-- have to wait some time untill is fully supported.

Of course there is a workaround to make the keyboard work in the meanwhile: since it has a standard MIDI out port you could use a generic USB MIDI interface of that sort that is usually found on eBay and the like and to interface the Oxygen with the computer through that.

Revision history for this message
Sivert Henriksen (sivert) wrote :

No there's no changes in Jack what so ever, so I'll have to go buy a MIDI-cable i guess.

Revision history for this message
Sivert Henriksen (sivert) wrote :

Good news!

I can now confirm that the Oxygen 8 v2 also works!
What the solution is, I'm not sure of, but I'ts one of the following:
 - I installed Ubuntu 8.04, and maybe it works out-of-the-box here
 - Or, I followed the Ubuntu Studio Preparation guide and did following: "sudo su -c 'echo options snd-usb-audio index=-2 >> /etc/modprobe.d/alsa-base'"

Someone might want to figure out which did it.

Revision history for this message
peter (register-tonhof) wrote :

PJ, Thanks a lot for the script:

#!/bin/sh
fw=/usr/share/usb/maudio/MidiSport2x2.ihx

bd=$( lsusb | grep Midisport | cut -d ' ' -f 2,4 | sed -e 's/ /\//' -e 's/://' )

dev=/dev/bus/usb/$bd

echo fxload -I $fw -D $dev
fxload -I $fw -D $dev

it works fine for me , however I had to replace Midisport with Midiman, I guess this is because my Midisport is about 8 years old.

By the way , the modifications of the rules script as described by Padlarren (that is adding -D $env{DEVNAME} ) did not load the firmware for me, only the explicit call to fxload did that.

Thanks again
peter

Revision history for this message
carrasclin (fontanet9) wrote :

With the latest firmware from the Hardy (8.04) repo it works OK without modifications on the scripts or any need in using the manual uploading script but the "/etc/fstab" configuration file needs to be fixed.

To do this you can type on a terminal:

echo "/dev/bus/usb/ /proc/bus/usb usbfs defaults 0 0"|sudo tee -a /etc/fstab

echo argument _needs_ quotes and pay attention at spaces.

or edit it with Alt+F2 >gksudo gedit >Open /etc/fstab and add a line with "/dev/bus/usb/ /proc/bus/usb usbfs defaults 0 0" without quotes and paying attention at spaces. It needs reboot or "sudo mount dev/bus/usb".

This is because the udev rules script uses device nodes mounted under "/proc/bus/usb" to upload firmware and Hardy only mounts the device nodes under "/dev/bus/usb". Former versions of Ubuntu and Debian mounted it on both.

Revision history for this message
Tito's (rcarrasco) wrote :

I have a midiman 1x1.

lsusb:
Bus 002 Device 009: ID 0763:1010 Midiman Midisport 1x1

midiman don't wake up

How can trace udev ??

What about this in syslog ?

Jul 5 17:38:54 TitosLaptop kernel: [ 3415.075481] usb 2-3.3: new full speed USB device using ehci_hcd and address 9
Jul 5 17:38:54 TitosLaptop kernel: [ 3415.184187] usb 2-3.3: configuration #1 chosen from 1 choice
Jul 5 17:38:54 TitosLaptop NetworkManager: <debug> [1215293934.457728] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_763_1010_noserial_0').
Jul 5 17:38:54 TitosLaptop NetworkManager: <debug> [1215293934.713743] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_763_1010_noserial_0_if0').

Revision history for this message
Jens Jensen (zerog2k) wrote :

This is very old, but I think this is worth mentioning how I got my Oxygen8 (keystation) working. This is a time-consuming issue.
I am on lucid lynx 10.04, and I too have the issue where udev is not autoloading the firmware, but manually loading via fxload works fine.
adding -D $env{DEVNAME} did not work for me.

I was able to debug by stopping udev (sudo service udev stop), and running it manually in non-daemon & debug mode: sudo udevd --debug. I was seeing that $env{DEVNAME} was not getting populated at the time this was executed, but if I ran:
udevadm info --query=property --path /devices/pci0000:00/0000:00:1d.3/usb5
I could see devname property was getting set: DEVNAME=/dev/bus/usb/005/001

Found this post which was helpful in determining that the udev rules for midisport firmware loader was too restrictive?
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/102631

I seemed to fix it by editing the line in /etc/udev/rules.d/42-midisport-firmware.rules for the KeyStation to this:
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="763/1014/*", RUN+="/sbin/fxload -s /usr/local/share/usb/maudio/MidiSportLoader.ihx -I /usr/local/share/usb/maudio/MidiSportKS.ihx"

(note that I removed the DEVPATH filter and added the ENV{DEVTYPE} filter).
This did the trick for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.