Hi all:
We (Me and a university mate) am developing a MP3 player based on compact
flash (http://web.salleurl.edu/~is04607/) and USB1.1. I will use linux to
control the device so I am developing a linux driver.
We use the USBN9604 from national Semiconductor to comunicate with the usb
bus and a fujitsu processor. We have a mp3 decoder, compact flash socket,
display and the rest of electronic components.
I can comunicate with all the componets without problems. So it seems that
the hardware works ok.
My idea is that this device will be a block device so we will be able to
mount the compact flash from linux in this way:
$ mount -t XXXX /dev/ourdeviceinputfile /mnt/mp3player
Then we will be able to write date on the compact flash (mp3 files or
other kind of files). If we put any mp3 file we well be able to play it
on the mp3player but we can put any other kind of file and use this device
as storage system.
All the hardware appears to work and know I am developing a little driver
to test bus speed. This driver is called "devuelta". I do that to load the
driver:
# modprobe usbcore
# modprobe usb-ohci
# insmod ./devuelta.o
This driver it is based in the skeleton-usb driver that we can found in
the linux sources.
I want that the driver will get the information that the user writes
through the open/write system calls and send them to the device. When the
device recive this information it has to resend the information to the
computer.
The firmware in the device has only 1 configuration with 1 interface that
has 2 EndPoints. One of them is a IN epoint and the other a OUT endpoind.
This firware is very simple for the moment, it gets the information that
comes from OUT endpoint and write it to the IN endpoint. So If all would
work well I will be able to do:
$ cp /tmp/dummy.txt /dev/mp3device
and from other console
$ cat /dev/mp3device > /tmp/dummy2.txt
In dummy2 we have the same contents that dummy.
Firmware writes information about USB interrupts on the display so I can
see when they happend.
My problem is: When I launch this command:
$ cp /tmp/dummy.txt /dev/mp3device
My device doesn't recive anything but when I launch the same command but
with strace, it recives the information well.
$ strace cp /tmp/dummy.txt /dev/mp3device
I am a bit disconcerted about this.
By the way, the enumeration process works perfectly and usb subsytem see
my device an reads its devices:
Oct 31 20:19:53 ligero kernel: hub.c: USB new device connect on bus1/1,
assigned device number 4
Oct 31 20:19:53 ligero kernel: devuelta.c: El Fabricante/Vendor hace macht...
Oct 31 20:19:53 ligero kernel: devuelta.c: He encontrado un IN endpoint @81
Oct 31 20:19:53 ligero kernel: devuelta.c: He encontrado un OUT endpoint @2
Oct 31 20:19:53 ligero kernel: devuelta.c: USB TurbioMP3 sera controlador
por devuleta DD: 0
And it also detects when my device is unplugged:
Oct 31 20:21:11 ligero kernel: usb.c: USB disconnect on device 4
Oct 31 20:21:11 ligero kernel: devuelta.c: USB Skeleton #0 now disconnected
Let me give you more information about the computer where I am developing
my project (Yes, it is my final degree project.):
- kernel : 2.4.19
- modutils : 2.4.18-3.7x
- modulils devel: 2.4.14-3
- gcc : gcc version 2.96 20000731
(Yes I know it, it sucks!!!)
- make : GNU Make version 3.79.1
- binutils : 9.2.1-1.7x.2
- libc : 2.2.5-40
- Usb modules loaded:
Module Size Used by Tainted: PF
devuelta 7044 0
usb-ohci 20160 0 (unused)
usbcore 77280 0 [devuelta usb-ohci]
I know that you need much more information to answer me. Send me the
questions and I will answer it.
Besides to answer about this question I would like to know if someone has
experiences with the USB model and developing USB Block devices that we
are using.
What do you think about the dificult of the project? Especially about
developoing the Block device driver. Can you point me about any with
the same objectives that my project (Free Project, for sure)?
Comments and questions in general are welcome too.
Thank you some much for read this.
P.S: Apologize about my english level, I know it sucks.
-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel