Paul, Progress! I actually have it working, although my current solution is a work around.
Since the read in getstatus is returning 32 bytes (or more if I give it a bigger buffer) of all repeating data, I put in a loop that would read it until I got something less than 32 bytes. This isn't perfect, as an error condition could cause this to break. But, until I figure out why reading EP1 is providing so much data, it's all I can do. I've added quite a few debug messages. The snibbit below is an example of what's happening. The DS9490_reset issues a command, and then calls getstatus to wait for the ready. The Count is the number of times through my read loop - this line is printed each time the Command or Ready to read bytes change. On the first loop my comparison values are set (from 0), but the first read get me the results of the prior command. This will happen on every getstatus call. The second item at Count 1 is the new command that was issued. In this case we had to loop twice to get a < 32 byte read the first time, and then it ran throught the getstatus loop again and had to do 17 more reads. The longer the time between the command and the read, the more loops. If I turn on ugen USB debugging too aggressively, the added logging will cause enough delay that the loop will run until there is a crazy short read, which is at the end of the buffer. It seems like a lower level process is honoring the polling interval (10ms in alternative 3) and just going crazy filling the buffer, as opposed to waiting until I poll. After each getstatus there is either another command, or a close, which is probably why there is only one extra command buffered up once I catch up. The clear_halt from libusb is not implemented on the BSD side, which is why that didn't work. I added in the code, but haven't gotten it to work properly yet (I'm sure I'm sending some incorrect paramenter). The usb_interrupt_read function is irrelevant, since the ugen driver makes that decision based on the endpoint type. But - this does actually run now! I have a device on the bus, and can query it... While I wait for some response from the FreeBSD USB experts regarding the looping issue, do you have any idea where I can find the code that is binding to IPv6 instead of IPv4? Also, when I kill owhttpd, it core dumps. Any ideas on where to look for that issue? Jul 21 13:25:09 bsdtest OWFS[47728]: DS9490_reset Jul 21 13:25:09 bsdtest OWFS[47728]: DS9490_getstatus: readlen=0 Jul 21 13:25:09 bsdtest OWFS[47728]: DS9490_getstatus: Count: 0 Command: 0->117, 0-> 8 Ready to read: 0-> 1 Jul 21 13:25:09 bsdtest OWFS[47728]: DS9490_getstatus: Count: 1 Command: 117->75, 8-> 8 Ready to read: 1-> 0 Jul 21 13:25:09 bsdtest OWFS[47728]: DS9490_getstatus: Loops/Return: 2/16 Jul 21 13:25:09 bsdtest OWFS[47728]: DS9490_getstatus: Loops/Return: 17/16 Jul 21 13:25:09 bsdtest OWFS[47728]: DS9490_getstatus: readlen=0 -- View this message in context: http://www.nabble.com/FreeBSD-6.1-Troubles...-tf1969732.html#a5439566 Sent from the OWFS - Dev forum at Nabble.com. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Owfs-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/owfs-developers
