On Jan 02 11:31:44, Alexandre Ratchov wrote:
> On Sat, Dec 31, 2011 at 04:44:19PM +0100, Jan Stary wrote:
> > The manual of the MIDI keyboard says:
> > 
> >         When using USB cable to connect UF keyboard to computer
> >         music system, you must install the UF driver to the computer;
> >         otherwise the system will not accept the device.
> > 
> > So, does
> > 
> > > Dec 31 15:11:04 box /bsd: ugen0 at uhub1 port 1 "vendor 0x7104 product
> > > 0x2202" rev 1.00/1.00 addr 2
> > 
> > meanly that my device (CME UF6) is not USB class compliant,
> > and therefore not supported by the umidi driver?
> > 
> 
> IIRC, certain devices use standard midi/usb messages, but they hide
> the fact that they use the same message format as class compliant ones
> to avoid triggering a bug in (very) old windows versions.
> 
> you can try to guess how your device works and if possible add a quirk
> to the umidi(4) driver, as follows:
> 
>  - figure out which usb endpoints appear to work, run:
> 
>       cat -u /dev/ugen0.N | hexdump -e '1/1 "%02x\n"'
> 
>    and play something on the keyboard until it prints 4-byte messages,
>    try it for N = 1..15

ugen0 at uhub1 port 1 "vendor 0x7104 product 0x2202" rev 1.00/1.00 addr 2

$ cat -u /dev/ugen0.00  
cat: /dev/ugen0.00: Operation not supported by device

$ cat -u /dev/ugen0.01  
^C

$ cat /dev/ugen0.02 
cat: /dev/ugen0.02: Input/output error

$ cat /dev/ugen0.03 
cat: /dev/ugen0.03: Device not configured

$ cat /dev/ugen0.04 
cat: /dev/ugen0.04: Device not configured

etc.  So the device seems to be /dev/ugen0.01; however, 
'cat -u /dev/ugen0.01' produces nothing when I play.
What does that mean?


>  - add the device to /usr/src/sys/dev/usb/usbdevs, run "make" in the
>    same directory to update .h files (keep strings short as they are
>    for other devices).
>  - add the corresponding "fixed endpoint" quirk in umidi_quirks.c
>    probably one similar to the "UM-1" one.

This is what I did:


Index: umidi_quirks.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umidi_quirks.c,v
retrieving revision 1.9
diff -u -p -r1.9 umidi_quirks.c
--- umidi_quirks.c      26 Jun 2008 05:42:19 -0000      1.9
+++ umidi_quirks.c      2 Jan 2012 19:45:26 -0000
@@ -338,6 +338,20 @@ UMQ_DEF(ROLAND, ROLAND_UA700, 3) = {
        UMQ_TERMINATOR
 };
 
+/*
+ * CME UF6
+ */
+UMQ_FIXED_EP_DEF(CME, CME_UF6, 2, 1, 1) = {
+       /* out */
+       { 0, 1 },
+       /* in */
+       { 1, 1 }
+};
+
+UMQ_DEF(CME, CME_UF6, 2) = {
+       UMQ_FIXED_EP_REG(CME, CME_UF6, 2),
+       UMQ_TERMINATOR
+};
 
 /*
  * quirk list
@@ -361,6 +375,7 @@ struct umidi_quirk umidi_quirklist[] = {
        UMQ_REG(ROLAND, ROLAND_SD20, 0),
        UMQ_REG(ROLAND, ROLAND_SD80, 0),
        UMQ_REG(ROLAND, ROLAND_UA700, 3),
+       UMQ_REG(CME, CME_UF6, 2),
        UMQ_TERMINATOR
 };
 
Index: usbdevs
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.567
diff -u -p -r1.567 usbdevs
--- usbdevs     1 Dec 2011 22:49:26 -0000       1.567
+++ usbdevs     2 Jan 2012 19:45:46 -0000
@@ -606,6 +606,7 @@ vendor ZINWELL              0x5a57  Zinwell
 vendor SITECOM         0x6189  Sitecom
 vendor ARKMICRO                0x6547  Arkmicro
 vendor 3COM2           0x6891  3Com
+vendor CME             0x7104  CME
 vendor EDIMAX          0x7392  EDIMAX
 vendor INTEL           0x8086  Intel
 vendor INTEL2          0x8087  Intel
@@ -1192,6 +1193,9 @@ product CISCOLINKSYS WUSBF54G     0x0024  WUS
 product CISCOLINKSYS WUSB200   0x0028  WUSB200
 product CISCOLINKSYS2 RT3070   0x4001  RT3070
 product CISCOLINKSYS3 RT3070   0x0101  RT3070
+
+/* CME products */
+product CME UF6                        0x2202  UF6
 

I upgraded to current, cvs up'd, made the above edits, make in usb,
and recompiled the kernel.

Now the device shows up as
ugen0 at uhub1 port 1 "vendor 0x7104 product 0x2202" rev 1.00/1.00 addr 2
but otherwise behaves the same: the only sensible dvice seems to be
ugen0.01, but playing the keyboard produces no output in cat -u.

Note that the umidi quirks are a blind copy of the Roland UM-1.
I don;t really know what USB 'quirks' are and I would like to
ask you for more guidance on what to try. Are the pairs in

        /* out */
        { 0, 1 },

supposed to correspond to ugenX.Y ?

        Thank you for your time

                Jan


OpenBSD 5.0-current (GENERIC) #0: Mon Jan  2 21:06:24 CET 2012
    r...@box.stare.cz:/usr/src/sys/arch/amd64/compile/GENERIC
RTC BIOS diagnostic error 80<clock_battery>
real mem = 1054593024 (1005MB)
avail mem = 1012461568 (965MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xe4410 (25 entries)
bios0: vendor Intel Corp. version "MOPNV10J.86A.0175.2010.0308.0620" date 
03/08/2010
bios0: Intel Corporation D510MO
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG HPET SSDT
acpi0: wakeup devices SLPB(S4) PS2M(S4) PS2K(S4) UAR1(S4) UAR2(S4) P32_(S4) 
ILAN(S4) PEX0(S4) PEX1(S4) PEX2(S4) PEX3(S4) UHC1(S3) UHC2(S3) UHC3(S3) 
UHC4(S3) EHCI(S3) AZAL(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Atom(TM) CPU D510 @ 1.66GHz, 1666.96 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF
cpu0: 512KB 64b/line 8-way L2 cache
cpu0: apic clock running at 166MHz
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 8 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 8
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 5 (P32_)
acpiprt1 at acpi0: bus 0 (PCI0)
acpiprt2 at acpi0: bus 1 (PEX0)
acpiprt3 at acpi0: bus 2 (PEX1)
acpiprt4 at acpi0: bus 3 (PEX2)
acpiprt5 at acpi0: bus 4 (PEX3)
acpicpu0 at acpi0: C1, PSS
acpibtn0 at acpi0: SLPB
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Pineview DMI" rev 0x02
vga1 at pci0 dev 2 function 0 "Intel Pineview Video" rev 0x02
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xe0000000, size 0x10000000
inteldrm0 at vga1: apic 8 int 16
drm0 at inteldrm0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x01: msi
pci1 at ppb0 bus 1
re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x03: RTL8168D/8111D (0x2800), 
apic 8 int 16, address 00:27:0e:07:09:9f
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x01: msi
pci2 at ppb1 bus 2
ppb2 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x01: msi
pci3 at ppb2 bus 3
ppb3 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x01: msi
pci4 at ppb3 bus 4
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x01: apic 8 int 23
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x01: apic 8 int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x01: apic 8 int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x01: apic 8 int 16
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x01: apic 8 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe1
pci5 at ppb4 bus 5
pcib0 at pci0 dev 31 function 0 "Intel Tigerpoint LPC" rev 0x01
ahci0 at pci0 dev 31 function 2 "Intel 82801GR AHCI" rev 0x01: msi, AHCI 1.1
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: <ATA, WDC WD6400BPVT-0, 01.0> SCSI3 0/direct 
fixed naa.50014ee25979e46a
sd0: 610480MB, 512 bytes/sector, 1250263728 sectors
sd1 at scsibus0 targ 1 lun 0: <ATA, WDC WD10TPVT-00H, 01.0> SCSI3 0/direct 
fixed naa.50014ee2aed8deca
sd1: 953869MB, 512 bytes/sector, 1953525168 sectors
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x01: apic 8 int 19
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-6400CL5
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
wbsio0 at isa0 port 0x4e/2: W83627THF rev 0x84
lm1 at wbsio0 port 0x290/8: W83627THF
mtrr: Pentium Pro MTRR support
umass0 at uhub0 port 5 configuration 1 interface 0 "RICOH USB2.0-FLASH Media" 
rev 2.00/0.01 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd2 at scsibus1 targ 1 lun 0: <RICOH, R5U880FlashMedia, 0000> SCSI2 0/direct 
removable serial.05ca1880R5U880-00003
sd2: 15614MB, 512 bytes/sector, 31978496 sectors
ugen0 at uhub1 port 1 "CME UF6" rev 1.00/1.00 addr 2
uaudio0 at uhub1 port 2 configuration 1 interface 0 "M Audio MobilePre" rev 
1.10/1.03 addr 3
uaudio0: audio rev 1.00, 9 mixer controls
audio0 at uaudio0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd2a (9dbfde9a4bdbbac7.a) swap on sd2b dump on sd2b

Reply via email to