file uploading

Help
kyled
2005-12-04
2013-04-23
  • kyled

    kyled - 2005-12-04

    So i thought I had everything working but apparently I missed the important thing--uploading.

    I am able to see my Rio, list all files, and delete with no problems at all.

    However, when i try to upload (single file or batch) the status bar starts up at 0% but never transfers.  I then get a time out error 'Incomplete: Connection Timed Out'. Anyone else have this issue?  I'm relatively new to linux so I'm sure this is something very simple that I'm bypassing.  i've checked permissions of the USB device but it's all correct.  any help would be appreciated.  Thanks!

     
    • Jeremy Sermersheim

      I'm having the same exact same issue.

      I was able to list, delete, format, check info but cannot upload.

      I'm using the Rio Nitrus player and I know the support is experimental.  Any suggestions?

      Thanks

       
    • Nathan Hjelm

      Nathan Hjelm - 2006-01-12

      I will be taking a look at this problem in the next few days. I should have a fix ready before the end of the week (if the problem shows itself under debian-ppc.)

      I will post to this topic after I have had a chance to test it.

      -Nathan

       
    • Nathan Hjelm

      Nathan Hjelm - 2006-01-13

      Just checked uploading with the cvs under linux-ppc. Seems to be working just fine. I don't know what could be going wrong under linux-x86.

      The machine is using libusb for transfer over a uhci high speed host. OS is debian etch with a 2.6 kernel.

       
    • Jeremy Sermersheim

      I read a lot of the code last night and began to understand it a bit more (it's been while since i've coded/read c). 

      I also verified that i can in fact download from the nitrus just not add/upload to the nitrus.

      here's the messages is see:

      init_upload_rio: finished
      bulk_upload_rio: entering
      Skipping 00000000 bytes of input
          o.a.r.01-heard_the_world.mp3 [7.6 MiB]: dir: Out data size: 0x00000040

      0000 : 43 52 49 4f 44 41 54 41 00 00 80 00 00 00 00 00 : CRIODATA........
      0010 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : ................
      0020 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : ................
      0030 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    : ...............

      Error -110: bulk_upload_rio error
      Incomplete: Connection timed out
      close_rio: entering...

       
    • Jeremy Sermersheim

      i'm stepping through the code with gdb (output below) and was wondering why the file_name variable says "Address 0X7 out of bounds"?

      add_song_rio (rio=0xbfcdca50, memory_unit=0 '\0', file_name=0x7 <Address 0x7 out of bounds>, artist=0x0,
          title=0x0, album=0x0) at song_management.c:185
      185         free(song_info.data);
      187         close (addpipe);
      189         UNLOCK(error);
      unlock_rio (rio=0x0) at rio.c:1164
      1164      rio->lock = 0;
      add_song_rio (rio=0xbfcdca50, memory_unit=0 '\0', file_name=0x7 <Address 0x7 out of bounds>, artist=0x0,
          title=0x0, album=0x0) at song_management.c:199
      199     }
      add_track (rio=0xbfcdca50) at main.c:597
      597         free (p->info.filename);
      599         if (ret == URIO_SUCCESS)
      602           printf(" Incomplete: %s\n", strerror (-ret));
                            System.mp3 [4.3 MiB]:  Incomplete:  Connection timed out

      the filename is "System.mp3" and the id3 tags are as follows:

      File: System.mp3
      Title:   Snowblind                      Track: 5
      Artist:  System of a Down
      Album:   Nativity in Black 2            Year:  2000
      Comment: #cMp3 [irc.dal.net]            Genre: Other [12]

      any ideas?

      jeremy

       
    • Nathan Hjelm

      Nathan Hjelm - 2006-01-16

      Ack, my Nitrus just died hard (solder joints came loose around the usb connector). Oh well, not really something new when it comes to Rio products.

      Thanks for the dump. From what I gather there is a problem a little higher up in the code (probably in main.c). Maybe something that manifests itself on some platforms and not others. I will take a look and see if I can see what may be going wrong.

      Just in case I am wrong it would be helpful to know what version of libusb you are using. Maybe I can figure out from that what is wrong. (run libusb-config --version).

      Thanks,
      -Nathan

       
    • Jeremy Sermersheim

      jsermer@hyperion ~ $ libusb-config --version
      0.1.10a

       
    • Nathan Hjelm

      Nathan Hjelm - 2006-01-26

      I made a small change today that might make a difference. Please give it a try and let me know if it works or runs into the same or a different problem.

      -Nathan

       
      • Jeremy Sermersheim

        Now when I try to add a file to the rio it returns with a seg fault.  Here's the gdb output when I stepped it through:

        Starting program: /usr/local/bin/rioutil -a oar-heard.mp3
        main (argc=3, argv=0xb7f12ca0) at main.c:119
        119       int mflag = 0, gflag = 0;
        (gdb)
        (gdb)
        (gdb) step
        115     int main (int argc, char *argv[]) {
        (gdb)
        118       int elvl = 0, bflag = 0;
        (gdb)
        115     int main (int argc, char *argv[]) {
        (gdb)
        117       int aflag = 0, apush = 0, dflag = 0, uflag = 0, nflag = 0;
        (gdb)
        118       int elvl = 0, bflag = 0;
        (gdb)
        117       int aflag = 0, apush = 0, dflag = 0, uflag = 0, nflag = 0;
        (gdb)
        122       char *title = NULL, *artist = NULL, *album = NULL, *name = NULL;
        (gdb)
        117       int aflag = 0, apush = 0, dflag = 0, uflag = 0, nflag = 0;
        (gdb)
        115     int main (int argc, char *argv[]) {
        (gdb)
        117       int aflag = 0, apush = 0, dflag = 0, uflag = 0, nflag = 0;
        (gdb)
        115     int main (int argc, char *argv[]) {
        (gdb)
        117       int aflag = 0, apush = 0, dflag = 0, uflag = 0, nflag = 0;
        (gdb)
        120       int Oflag = 0;
        (gdb)
        115     int main (int argc, char *argv[]) {
        (gdb)
        120       int Oflag = 0;
        (gdb)
        121       char *aopt, *uopt = NULL, *dopt = NULL, *copt = NULL;
        (gdb)
        122       char *title = NULL, *artist = NULL, *album = NULL, *name = NULL;
        (gdb)
        127       long int dev = 0;
        (gdb)
        131       int lflag = 0, hflag = 0, iflag = 0, vflag = 0, fflag = 0, cflag = 0;
        (gdb)
        118       int elvl = 0, bflag = 0;
        (gdb)
        122       char *title = NULL, *artist = NULL, *album = NULL, *name = NULL;
        (gdb)
        119       int mflag = 0, gflag = 0;
        (gdb)
        124       int pipeu = 0;
        (gdb)
        119       int mflag = 0, gflag = 0;
        (gdb)
        125       unsigned int mem_unit = 0;
        (gdb)
        122       char *title = NULL, *artist = NULL, *album = NULL, *name = NULL;
        (gdb)
        132       int jflag = 0;
        (gdb)
        131       int lflag = 0, hflag = 0, iflag = 0, vflag = 0, fflag = 0, cflag = 0;
        (gdb)
        122       char *title = NULL, *artist = NULL, *album = NULL, *name = NULL;
        (gdb)
        136       int recovery = 0;
        (gdb)
        124       int pipeu = 0;
        (gdb)
        138       struct option long_options[] = {
        (gdb)
        125       unsigned int mem_unit = 0;
        (gdb)
        138       struct option long_options[] = {
        (gdb)
        131       int lflag = 0, hflag = 0, iflag = 0, vflag = 0, fflag = 0, cflag = 0;
        (gdb)
        132       int jflag = 0;
        (gdb)
        138       struct option long_options[] = {
        (gdb)
        131       int lflag = 0, hflag = 0, iflag = 0, vflag = 0, fflag = 0, cflag = 0;
        (gdb)
        136       int recovery = 0;
        (gdb)
        138       struct option long_options[] = {
        (gdb)
        167       sprintf(dev_string, "Device");
        (gdb)
        174       is_a_tty = isatty(1);
        (gdb)
        288           usage();
        (gdb)
        178         switch(c){
        (gdb)
        180           if (apush == (aflag - 1)) {
        (gdb)
        188           aflag++;
        (gdb)
        189           aopt = optarg;
        (gdb)
        288           usage();
        (gdb)
        292       if (apush == (aflag - 1))
        (gdb)
        293         upstack_push(mem_unit, title, artist, album, aopt, 0);
        (gdb)
        upstack_push (mem_unit=0, title=0xbfd10e20 "�\005\b\001", artist=0x0, album=0x0,
            filename=0x0, recursive_depth=0) at main.c:976
        976       for ( p = &head ; (*p) ; p = &((*p)->next));
        (gdb)
        973               char *filename, int recursive_depth) {
        (gdb)
        976       for ( p = &head ; (*p) ; p = &((*p)->next));
        (gdb)
        973               char *filename, int recursive_depth) {
        (gdb)
        978       *p = (struct upload_stack *)malloc(sizeof(struct upload_stack));
        (gdb)
        980       (*p)->info.mem_unit = mem_unit;
        (gdb)
        981       (*p)->info.title    = strdup (title);
        (gdb)

        Program received signal SIGSEGV, Segmentation fault.
        0xb7e26473 in strlen () from /lib/tls/libc.so.6
        (gdb)
        Single stepping until exit from function strlen,
        which has no line number information.

        Program terminated with signal SIGSEGV, Segmentation fault.

        Listing the contents still operates correctly.

        Thanks

         
        • Nathan Hjelm

          Nathan Hjelm - 2006-02-03

          I have cleaned up much of the cli's code in cvs. Can you give this latest version a try?

           
    • Jeremy Sermersheim

      i grabbed the latest version from cvs, but still having the same issue.  did you commit the cvs updates, b/c according to the online view of cvs and the rioutil module, it doesnt look like anything has been updated except for the "mem leak" fix submitted 7 days ago?

      Jeremy

       
      • Nathan Hjelm

        Nathan Hjelm - 2006-02-03

        It woun't show up on the web immediately since it takes some time for the web interface update.

        I find it strange that there is still a problem with the upload stack (where the crash is happening). Make sure you are making a clean build and try it again (more code cleanups in cvs now).

        Post or message me a gdb dump if there is still a problem.

        -Nathan

         
    • Jeremy Sermersheim

      i'm still having the same problem.  before i grab the latest from cvs i remove the entire rioutil source/build directory and then re-fetch it with:

      cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/rioutil login
      cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/rioutil co -P rioutil

      am i doing something wrong?  also if your updating/cleaning up the code shouldnt the time stamps on the files you're editing be date/timestamped with todays date (for example main.c has a date timestamp of 2006-01-26 17:28), which is when u last updated it.

      could maybe you send me your tree in a tar file, because it doesnt appear that i'm getting the latest version of the tree.

      jeremy

       
    • Jeremy Sermersheim

      i now finally see the changes (maybe it took a bit to rsync to my closest mirror???).

      anyway now when i run just a listing of what's on the nitrus it displays the following:

      Attempting to open Rio and retrieve song list.... failed!
      Reason: No such file or directory.
      librioutil tried to use method: libusb

      when i run rioutil with -eee i see a bunch of errors that say:

      USB error: error submitting URB: No such file or directory
      Error -2: error reading from device (-2). resetting..
      Error -2: size = 64

      jeremy

       
      • Nathan Hjelm

        Nathan Hjelm - 2006-02-06

        I don't know why you would be getting usb errors since nothing has really changed in the libusb driver. The code is working under both OS and linux-ppc

        I hope this isn't an issue between the superior ppc platorm and the inferior intel platform. I will try and hunt down a x86 machine to see what if it is a platform issue.

         
    • Jeremy Sermersheim

      Here's a bit more debugging output from gdb.  This is the first time in the code that i see the 'address out of bounds'.  it appears to be a control message to the rio.

      send_command_rio (rio=0xbff8c230, request=96, value=0, index=0) at rioio.c:123
      123       if (cretry > 3)
      121       int ret = URIO_SUCCESS;
      123       if (cretry > 3)
      125       else if (!rio || !rio->dev)
      128       if (rio->debug > 1) {
      134       if (control_msg(rio, request, value, index, 0x0c, rio->cmd_buffer) < 0)
      control_msg (rio=0x60, request=96 '`', value=49712, index=65517, length=49880,
          buffer=0x60 <Address 0x60 out of bounds>) at driver_libusb.c:104
      104       struct rioutil_usbdevice *dev = (struct rioutil_usbdevice *)rio->dev;
      103                     u_int16_t index, u_int16_t length, unsigned char *buffer) {
      104       struct rioutil_usbdevice *dev = (struct rioutil_usbdevice *)rio->dev;
      103                     u_int16_t index, u_int16_t length, unsigned char *buffer) {
      110       ud = dev->dev;
      114       ret = usb_control_msg(ud, requesttype, request, value, index, (char *)buffer, length, 15000);
      117         return URIO_SUCCESS;
      116       if (ret == length)
      120     }
      send_command_rio (rio=0xbff8c230, request=96, value=0, index=0) at rioio.c:135
      135         return -ENODEV;
      134       if (control_msg(rio, request, value, index, 0x0c, rio->cmd_buffer) < 0)
      137       rio_log_data (rio, "Command", rio->cmd_buffer, 0xc);
      rio_log_data (rio=0xbff8c230, dir=0x8055d28 "Command",
          data=0xc <Address 0xc out of bounds>, data_size=-1074216232) at rio.c:111
      111       if (rio == NULL) {
      106     void rio_log_data (rios_t *rio, char *dir, unsigned char *data, int data_size) {

      i can provide more output upon your request.

      thanks
      jeremy

       
    • Jeremy Sermersheim

      with the latest version of cvs and stepping through gdb, i notice the following (NOTE: the gap in the gdb output is where it took some time for the gdb command prompt to return)

      init_upload_rio (rio=0xbfa91c60, memory_unit=0 '\0', upload_command=108 'l')
          at song_management.c:332
      332       if (strncmp((char *)rio->buffer, "SRIORDY", 7) != 0)
      (gdb)
      333         return -EBUSY;
      (gdb)
      332       if (strncmp((char *)rio->buffer, "SRIORDY", 7) != 0)
      (gdb)
      335       if ((int)rio->cmd_buffer[0])
      (gdb)
      338         return -1;
      (gdb)
      335       if ((int)rio->cmd_buffer[0])
      (gdb)
      336         read_block_rio(rio, NULL, 64, 64);
      (gdb)
      340       if (strncmp((char *)rio->buffer, "SRIODATA", 8) != 0)
      (gdb)
      336         read_block_rio(rio, NULL, 64, 64);
      (gdb)
      read_block_rio (rio=0xbfa91c60, ptr=0x0, size=64, block_size=64) at rioio.c:34
      34        buffer = (ptr) ? ptr : rio->buffer;
      (gdb)
      29      int read_block_rio (rios_t *rio, unsigned char *ptr, u_int32_t size, u_int32_t block_size) {
      (gdb)
      34        buffer = (ptr) ? ptr : rio->buffer;
      (gdb)
      34        buffer = (ptr) ? ptr : rio->buffer;
      (gdb)
      36        if (return_type_rio (rio) == RIONITRUS && block_size == RIO_FTS)
      (gdb)
      return_type_rio (rio=0xbfa91c60) at rio.c:348
      348       return ((struct rioutil_usbdevice *)rio->dev)->entry->type;
      (gdb)
      349     }
      (gdb)
      return_type_rio (rio=0xbfa91c60) at rio.c:348
      348       return ((struct rioutil_usbdevice *)rio->dev)->entry->type;
      (gdb)
      349     }
      (gdb)
      read_block_rio (rio=0xbfa91c60, ptr=0x0, size=64, block_size=64) at rioio.c:39
      39        if (size > block_size)
      (gdb)
      43          ret = read_bulk (rio, buffer, size);
      (gdb)
      read_bulk (rio=0xbfa91c60, buffer=0xbfa91c60 "X\225\005\b", buffer_size=64)
          at driver_libusb.c:138
      138       struct rioutil_usbdevice *dev = (struct rioutil_usbdevice *)rio->dev;
      (gdb)
      144       read_ep = dev->entry->iep | 0x80;
      (gdb)
      145       ud = dev->dev;
      (gdb)
      144       read_ep = dev->entry->iep | 0x80;
      (gdb)
      147       ret = usb_bulk_read(ud, read_ep, (char *)buffer, buffer_size, 8000);
      (gdb)
      144       read_ep = dev->entry->iep | 0x80;
      (gdb)
      147       ret = usb_bulk_read(ud, read_ep, (char *)buffer, buffer_size, 8000);
      (gdb)

      Breakpoint 2, 0xb7f5d880 in usb_bulk_read () from /usr/lib/libusb-0.1.so.4
      (gdb)
      Single stepping until exit from function usb_bulk_read,
      which has no line number information.
      0xb7f5d310 in usb_control_msg () from /usr/lib/libusb-0.1.so.4
      (gdb)
      Single stepping until exit from function usb_control_msg,
      which has no line number information.
      0xb7eba1b0 in gettimeofday () from /lib/tls/libc.so.6
      (gdb)
      Single stepping until exit from function gettimeofday,
      which has no line number information.
      0xb7f5d350 in usb_control_msg () from /usr/lib/libusb-0.1.so.4
      (gdb)
      Single stepping until exit from function usb_control_msg,
      which has no line number information.

      !!!!GAP!!!!

      Breakpoint 3, read_bulk (rio=0xbfa91c60,
          buffer=0xffffff92 <Address 0xffffff92 out of bounds>, buffer_size=64)
          at driver_libusb.c:148
      148       if (ret < 0) {
      (gdb)
      147       ret = usb_bulk_read(ud, read_ep, (char *)buffer, buffer_size, 8000);
      (gdb)
      148       if (ret < 0) {
      (gdb)
      149         rio_log (rio, ret, "error reading from device (%i). resetting..\n", ret);
      (gdb)
      rio_log (rio=0xbfa91c60, error=-110,
          format=0x8056258 "error reading from device (%i). resetting..\n") at log.c:36
      36        if (rio == NULL) {
      (gdb)
      31      void rio_log (rios_t *rio, int error, char *format, ...) {
      (gdb)
      36        if (rio == NULL) {
      (gdb)
      40          debug_out   = rio->log;
      (gdb)
      41          debug_level = rio->debug;
      (gdb)
      44        if ( (debug_level > 0) && (debug_out != NULL) ) {
      (gdb)
      49          if (rio == NULL)
      (gdb)
      52          if (error != 0)
      (gdb)
      53            fprintf(debug_out, "Error %i: ", error);
      (gdb)
      Error -110: 55      if ( (error == 0 && debug_level > 1) || error != 0 )
      (gdb)
      56            vfprintf (debug_out, format, arg);
      (gdb)
      error reading from device (-110). resetting..
      58          fflush (debug_out);
      (gdb)
      62      }
      (gdb)

      jeremy

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks