From: Shaun J. <sja...@ho...> - 2001-07-07 21:19:49
|
Good work Seagull! Your port to Linux (libusb) looks great! Much cleaner than my own. The every-other-handshake failure persists though. It doesn't matter how much time is left between runs. It's likely related to short reads. I've been running through the samples: handshake - WORKS play - WORKS tracks - WORKS (w/ bugfix) playlists - WORKS pl - intermittent gettr - error bad track size 0 deltr - untested sendtr - untested It's a little hard to explain what happens when I run pl, but it sometimes kinda works, sometimes times out. The symptoms look kind of similar to the every-other-handshake problem. I haven't had much of a chance to troubleshoot yet. School is getting in the way of my education. Just thought you'd be interested in seeing some results from your work. Now the bugfixes... one to protocol.c and one to play.c Cheers, Shaun Index: src/protocol.c =================================================================== RCS file: /var/cvs/libnjb/src/protocol.c,v retrieving revision 1.1.1.2 diff -c -c -r1.1.1.2 protocol.c *** src/protocol.c 7 Jul 2001 20:44:39 -0000 1.1.1.2 --- src/protocol.c 7 Jul 2001 21:09:50 -0000 *************** *** 256,261 **** --- 256,262 ---- if ( song == NULL ) return NULL; song->trid= tagh->trackid; + return song; } int njb_get_playlist_header (njb_t *njb, njbplhdr_t *plh, int cmd) *************** Index: sample/play.c =================================================================== RCS file: /var/cvs/libnjb/sample/play.c,v retrieving revision 1.1.1.1 diff -c -c -r1.1.1.1 play.c *** sample/play.c 23 Jun 2001 09:40:40 -0000 1.1.1.1 --- sample/play.c 7 Jul 2001 20:47:27 -0000 *************** *** 53,75 **** printf("---> Hit ^C to exit <---\n"); ! i= 1; ! printf("Track ID %10.10s: 00:00:00\b\b\b\b\b\b\b", argv[i]); ! fflush(stdout); ! while ( repeat ) { ! NJB_Elapsed_Time(njb, &sec, &change); if ( change ) { i++; if ( i == argc ) { repeat= 0; } else { ! printf("\rTrack ID %10.10s: 00:00:00\b\b\b\b\b\b\b", argv[i]); fflush(stdout); } ! } hhmmss(sec, &hh, &mm, &ss); ! printf("%02u:%02u:%02u\b\b\b\b\b\b\b", mm, ss); fflush(stdout); sleep(1); --- 53,76 ---- printf("---> Hit ^C to exit <---\n"); ! change = 1; ! i = 0; ! while( repeat) { if ( change ) { i++; if ( i == argc ) { repeat= 0; } else { ! printf("\rTrack ID %10.10s: 00:00:00\b\b\b\b\b\b\b\b", argv[i]); fflush(stdout); } ! change = 0; ! } else ! NJB_Elapsed_Time(njb, &sec, &change); ! hhmmss(sec, &hh, &mm, &ss); ! printf("%02u:%02u:%02u\b\b\b\b\b\b\b\b", hh, mm, ss); fflush(stdout); sleep(1); On Saturday 07 July 2001 10:47, Enigma wrote: > There are a couple of things that need changing to port this to linux, > > they are all 1 line changes and are listed below, the start of each line > is what to change it to, then my comment so i know what i changed, then > what it used to be > > protocol.c:459: return 0; //Enigma hack NULL; > protocol.c:683: return 0; //Enigma hack NULL; > protocol.c:704: return 0; //Enigma hack NULL; > protocol.c:710: return 0; //Enigma hack NULL; > protocol.c:713: return 0; //Enigma hack NULL; > protocol.c:830: return 0; //Enigma hack NULL; > protocol.c:920: return 0; //Enigma hack NULL; > usb_byteorder.c:3:#include <endian.h> //Enigma hack #include > <machine/endian.h> > > this is because linux sees NULL as a pointer, and complains when returning > a point from a function that is prototyped to return an int :) > > the bottom line is just a different path to the file, after this it all > compliles fine, the only problem is the bulk timeouts now, i will have a > look at this > > thanks again to seagull > > cheers > > ________________________________________________________ > > PGP key is here -> http://www.computerbooth.com/pgp.html > > * If debugging is the process of removing bugs, then programming must be > the process of putting them in. > > > _______________________________________________ > Libusb-devel mailing list > Lib...@li... > http://lists.sourceforge.net/lists/listinfo/libusb-devel |