Subject:
|
Yes, the puzzle is solved - legousbtower + nqc for linux.
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Sat, 12 Jan 2002 04:00:14 GMT
|
Original-From:
|
PC CHAN <pc.chan@alcatelIHATESPAM.com>
|
Viewed:
|
1162 times
|
| |
| |
Dear Juergen and Andy,
I found the option to turn on data debugging on legousbtower this
evening. It all turned out to be an issue between uhci and legousbtower.
From the out_callback I could tell, it always sent 8 bytes no matter
what tower_send submitted. The RCX brick was probably choked by the
extra bytes.
Looking at the uhci code, I found that it was dma'ing acording to
urb->transfer_buffer_length instead of the urb->actual_length.
I don't have the specifications to tell what uhci should be looking at.
Anyway I modified tower_send to submitted bytes_to_write as
buffer_length as a workaround/fix.
It is now working!!!
As promised Juergen this morning, I am sending in the changes I made.
Please feel free to try and optimize them. (The usleeps I I added may
not be optimal nor accurate at all The locks I added may not be that
necessarily after all.)
Thank you very much again for your kind response and time.
Cheers,
P.C. Chan
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
P.S.
To use RCX_USBTowerPipe_linux.cpp, please put it into the rcxlib
directory under nqc-2.4.a4 and modify the Makefile to take
RCX_USBTowerPipe_linux.o instead of RCX_USBTowerPipe_none.o
To use legousbtower,
-> // please mknod /dev/tower0 c 240 180
// ( mknod /dev/tower1 c 240 181.. if you have more than 1 tower.)
( chmod if necessary.) before insmod.
-> It works with uhci but NOT usb-uhci.
---
***Sorry typos: mknod /dev/tower0 c 180 240
mknod /dev/tower1 c 180 241 ...
valid minor nodes 240 to 245 (but not yet registered.)
********************************************************************
--
MIME ATTACHMENTS DISCARDED:
1. Content-Type: application/octet-stream;
name="legousbtower.c-1.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="legousbtower.c-1.gz"
Content-Length: 9040
2. Content-Type: application/octet-stream;
name="RCX_USBTowerPipe_linu-1.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="RCX_USBTowerPipe_linu-1.gz"
Content-Length: 2077
|
|
Message has 2 Replies:
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|