Loading ...
Sorry, an error occurred while loading the content.

Re: [Raspberry_Pi_4-Ham_RADIO] USB audio on RPi

Expand Messages
  • Ray Wells
    I m used to uptimes of in excess of 300 days with Linux installations. The 10 day limit (for me) is disappointing however I ll persevere for now and keep my
    Message 1 of 14 , Jan 20, 2013
    • 0 Attachment
      I'm used to uptimes of in excess of 300 days with Linux installations. The 10 day limit (for me) is disappointing however I'll persevere for now and keep my old P3 800MHz motherboard ready for a return to service, despite greatly increased input energy. Reliability is far more important.

      I'm using a TL-WN721N device but a Realtek clone fared no better in the reliability stakes on the RPi.

      Perhaps you were luckier than many with the particular USB/Ethernet chip on your RPi.

      I see that the 723 and 721 dongles identify differently.  Significant??


      vk2tv@vk2tv-RPi ~ $ lsusb
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
      Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
      Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
      Bus 001 Device 005: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC
      Bus 001 Device 006: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
      Bus 001 Device 007: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
      vk2tv@vk2tv-RPi ~ $

      Ray vk2tv


      On 20/01/13 23:25, Brian GW6WTK wrote:
      Hi guys
         I have had WiFi running a simplex node (GMSK) uninterrupted for months without any crashes, the WiFi dongle I have always used is a TP-Link TL-WN723N, it's current 'uptime' is 18 days because of a Christmas holiday.
      The R-PI is completely stand alone, with only the WiFi dongle and the USB to the GMSK connected directly to it, the power-supply to it is now dropped from the supply to the radio via a simple 5Volt regulator. I have no intention of shutting  down the R-PI in the near future as it appears to be extremely stable, logging is done automatically from ramdisk to remote webspace.

      Perhaps is just a case of the suitability of the dongle, this one has always worked well for me.

      Brian
      gw6wtk

      On 19/01/2013 21:43, Ray Wells wrote:
       

      Hi All,

      I'm not convinced that the power supply is the only problem.

      I run a RPi as an APRS gateway using a wifi link to my LAN. The RPi runs from a 7 port powered hub with a 2.1A supply. The supply is verified clean and stable with digital voltmeter and an oscilloscope. Feeding the hub is the RPi USB (in addition to its power suppy cable) and hanging from the hub is a four port USB/RS232 adapter for my TNC's (currently 2 but soon to be 3) and the wifi dongle.

      My RPi (I've tried both of the two I own) will run for up to 10 days before crashing and sometimes much less. I've been through the process of trying different power supplies and different supply arrangements - 1 supply or 2 supplies. I've even used 12v to 5v adapters to run the RPi from battery backup to eliminate mains spike issues.

      My "crash" is really a loss of the wifi link which appears to be up (green light on) but there is no activity. I now believe this is caused by USB failure and not complete failure of the RPi. I was running a cron job every 15 minutes to ping my router and write the results to a log. Even when the wifi link was lost  the RPi kept writing to the log file and reporting failed attempts.

      The salient point I observed from system logs was that, every time, prior to the wifi failure, the ethernet port had fallen over. I don't use ethernet but it remains available and configured.

      USB and Ethernet are controlled by the SAME chip.

      After lots of Googling I stumbled across a script that checks some /sys files every minute from a cron job and, depending on the script output takes action to restore the chip to working once again. I have had the script invoked for 4 days now and so far the script log has not reported a failure, but, being that the RPi has been able to go for 10 days without failure, I can't yet be sure if I've found the solution to my wifi failure.

      FWIW, take a look here ...
      https://github.com/raspberrypi/linux/issues/151

      Ray,
      vk2tv

      On 20/01/13 06:44, (KP4TR)Ramon Gonzalez wrote:
       

      You should use an external powered USB hub with a power supply rated at least 2 amps. I have done extensive tests and determined (in my situation) that even a 1 amp USB hub is not enough. I lose my USB after 1-2 hours of use, which includes the Ethernet module. By using one like the Belkin powered USB hub or the DLINK hub my Pi is very stable. A cheap powered USB hub I had didn't work well, but I replaced the cheap power supply with one from a Magellan GPS rated at 2 amps 5V and it solved my problem with stability as well.

      I know that in many forums they say it is not recommended to power the Pi using a USB powered hub, but I have gone against this thinking and has worked very well for me. My setup is an IRLP node with changes recently released by VE7LTD (Dave Cameron) at http://www.irlp.net/pi and has a wired IRLP board powered by the Pi itself. Also in the mix is a USB soundcard and an Edimax wireless USB adapter.

      Avoid cheap powered USB hubs. Their power supplies are bad and may not deliver enough current to keep the Pi stable.


      On 1/19/2013 4:20 AM, Kristoff Bonne wrote:
       

      Hi,

      As has been discussed and published a number of times on the net, there
      seams to be a pretty serious problem with USB on the RPi, which has its
      effects on using an USB audio-dongle on it.
      From what I have found, it seams to be related to using a USB 1.1
      device on the (USB 2.0) HUB of the Pi.

      This has been my experience sofar:
      - When I just plug in a USB audiofob on the RPi, I seams to be loseing
      audio-frames during audio-capturing. The number of frames dropped per
      second does differ quite a lot per device. On some devices (like a USB
      headset), I only have 17 to 18 audio-frames of 40 ms per second (instead
      of 25).

      - One trick seams to be to boot the Pi with the option set to limit the
      USB speed to USB 1.1).

      However, this seams to have a number of issues:
      - in some cases, USB does not work anymore. E.g. my USB keyboard does
      not work anymore.
      - I had rapports of people where there are problems with the video
      - When I use this trick and have 2 audio-devices active (both running at
      48 Kbps full-duplex) at the same time, I have problems that the devices
      says it does not have sufficient bandwidth for both sessions.
      I find this a bit odd as USB 1.1 is -as far as I know- 12 Mbps and even
      if you take the worse-case senario (2 * full-duplex stereo, 48 Khz
      sampling, 16 bits/sample), I only have 3 Mbps / second

      I use my RPi for developing the the c2_gmsk modem (codec2-based GMSK
      modem for VHF and UHF), so I do need two audio-connections (one for the
      headset for the user and one for the GMSK modem connection to the radio).

      What is the experience of people on this group about this?

      Some question:
      - is there somebody who has a revision 2.0 version of the RPi. Does it
      also have this USB issue?

      - Has somebody ever tried this with a USB 2.0 audio-device? As far as I
      read, the problem with the USB-bus is related to using a USB 1.1 device
      on the USB 2.0 bus. So does using a USB 2.0 device help?

      73
      Kristoff - ON1ARF





    • kb9mwr
      I have the model B rev 2 one. I can confirm that the SYBA SD-CM-UAUD USB CM119 audio adapter works and shows no lost audio frames using your tool. (And thanks
      Message 2 of 14 , Jan 20, 2013
      • 0 Attachment
        I have the model B rev 2 one.

        I can confirm that the SYBA SD-CM-UAUD USB CM119 audio adapter works and shows no lost audio frames using your tool. (And thanks for that tool by the way)

        I tried to document the setup here:
        http://kb9mwr.blogspot.com/2013/01/raspberry-pi-and-sound-input.html

        Setting up /etc/asound.conf is the part that baffled me the most.
        (And still does, as it's hard to figure out what to put in there)

        If I get real bored, I have several different USB adapters that I could test with your tool.

        My preference is to find someone who wants them and they could mess with them.

        --- In Raspberry_Pi_4-Ham_RADIO@yahoogroups.com, Kristoff Bonne wrote:
        >
        > Hi,
        >
        >
        >
        > As has been discussed and published a number of times on the net, there
        > seams to be a pretty serious problem with USB on the RPi, which has its
        > effects on using an USB audio-dongle on it.
        > From what I have found, it seams to be related to using a USB 1.1
        > device on the (USB 2.0) HUB of the Pi.
        >
        >
        > This has been my experience sofar:
        > - When I just plug in a USB audiofob on the RPi, I seams to be loseing
        > audio-frames during audio-capturing. The number of frames dropped per
        > second does differ quite a lot per device. On some devices (like a USB
        > headset), I only have 17 to 18 audio-frames of 40 ms per second (instead
        > of 25).
        >
        > - One trick seams to be to boot the Pi with the option set to limit the
        > USB speed to USB 1.1).
        >
        > However, this seams to have a number of issues:
        > - in some cases, USB does not work anymore. E.g. my USB keyboard does
        > not work anymore.
        > - I had rapports of people where there are problems with the video
        > - When I use this trick and have 2 audio-devices active (both running at
        > 48 Kbps full-duplex) at the same time, I have problems that the devices
        > says it does not have sufficient bandwidth for both sessions.
        > I find this a bit odd as USB 1.1 is -as far as I know- 12 Mbps and even
        > if you take the worse-case senario (2 * full-duplex stereo, 48 Khz
        > sampling, 16 bits/sample), I only have 3 Mbps / second
        >
        > I use my RPi for developing the the c2_gmsk modem (codec2-based GMSK
        > modem for VHF and UHF), so I do need two audio-connections (one for the
        > headset for the user and one for the GMSK modem connection to the radio).
        >
        >
        > What is the experience of people on this group about this?
        >
        >
        > Some question:
        > - is there somebody who has a revision 2.0 version of the RPi. Does it
        > also have this USB issue?
        >
        > - Has somebody ever tried this with a USB 2.0 audio-device? As far as I
        > read, the problem with the USB-bus is related to using a USB 1.1 device
        > on the USB 2.0 bus. So does using a USB 2.0 device help?
        >
        >
        >
        > 73
        > Kristoff - ON1ARF
        >
      • kenwaldek
        Thanks for this one, and the documentation Kenny vanbillemont
        Message 3 of 14 , Jan 21, 2013
        • 0 Attachment
          Thanks for this one, and the documentation

          Kenny vanbillemont 


          Op 21-jan.-2013 om 03:13 heeft "kb9mwr" <kb9mwr@...> het volgende geschreven:

           

          I have the model B rev 2 one.

          I can confirm that the SYBA SD-CM-UAUD USB CM119 audio adapter works and shows no lost audio frames using your tool. (And thanks for that tool by the way)

          I tried to document the setup here:
          http://kb9mwr.blogspot.com/2013/01/raspberry-pi-and-sound-input.html

          Setting up /etc/asound.conf is the part that baffled me the most.
          (And still does, as it's hard to figure out what to put in there)

          If I get real bored, I have several different USB adapters that I could test with your tool.

          My preference is to find someone who wants them and they could mess with them.

          --- In Raspberry_Pi_4-Ham_RADIO@yahoogroups.com, Kristoff Bonne wrote:
          >
          > Hi,
          >
          >
          >
          > As has been discussed and published a number of times on the net, there
          > seams to be a pretty serious problem with USB on the RPi, which has its
          > effects on using an USB audio-dongle on it.
          > From what I have found, it seams to be related to using a USB 1.1
          > device on the (USB 2.0) HUB of the Pi.
          >
          >
          > This has been my experience sofar:
          > - When I just plug in a USB audiofob on the RPi, I seams to be loseing
          > audio-frames during audio-capturing. The number of frames dropped per
          > second does differ quite a lot per device. On some devices (like a USB
          > headset), I only have 17 to 18 audio-frames of 40 ms per second (instead
          > of 25).
          >
          > - One trick seams to be to boot the Pi with the option set to limit the
          > USB speed to USB 1.1).
          >
          > However, this seams to have a number of issues:
          > - in some cases, USB does not work anymore. E.g. my USB keyboard does
          > not work anymore.
          > - I had rapports of people where there are problems with the video
          > - When I use this trick and have 2 audio-devices active (both running at
          > 48 Kbps full-duplex) at the same time, I have problems that the devices
          > says it does not have sufficient bandwidth for both sessions.
          > I find this a bit odd as USB 1.1 is -as far as I know- 12 Mbps and even
          > if you take the worse-case senario (2 * full-duplex stereo, 48 Khz
          > sampling, 16 bits/sample), I only have 3 Mbps / second
          >
          > I use my RPi for developing the the c2_gmsk modem (codec2-based GMSK
          > modem for VHF and UHF), so I do need two audio-connections (one for the
          > headset for the user and one for the GMSK modem connection to the radio).
          >
          >
          > What is the experience of people on this group about this?
          >
          >
          > Some question:
          > - is there somebody who has a revision 2.0 version of the RPi. Does it
          > also have this USB issue?
          >
          > - Has somebody ever tried this with a USB 2.0 audio-device? As far as I
          > read, the problem with the USB-bus is related to using a USB 1.1 device
          > on the USB 2.0 bus. So does using a USB 2.0 device help?
          >
          >
          >
          > 73
          > Kristoff - ON1ARF
          >

        • Kristoff Bonne
          Hi Steve, We seams to bumb into eachother at different places. ... I know your blogarticle. I m subscribed to the RSS feed of your blog and it was exactly that
          Message 4 of 14 , Jan 21, 2013
          • 0 Attachment
            Hi Steve,



            We seams to bumb into eachother at different places.


            On 21-01-13 03:13, kb9mwr wrote:
             

            I have the model B rev 2 one.

            I can confirm that the SYBA SD-CM-UAUD USB CM119 audio adapter works and shows no lost audio frames using your tool. (And thanks for that tool by the way)

            I tried to document the setup here:
            http://kb9mwr.blogspot.com/2013/01/raspberry-pi-and-sound-input.html

            I know your blogarticle. I'm subscribed to the RSS feed of your blog and it was exactly that article that pointed me to the yahoo-group. (for which my gratitude) :-)


            Two questions, just to be sure:
            - Is this device USB 1.1 orUSB 2.0?

            I found this trick to find detect this:
            $ lsusb
            Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
            Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
            Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
            Bus 001 Device 004: ID 0d8c:000e C-Media Electronics, Inc. Audio Adapter (Planet UP-100, Genius G-Talk)

            The last line is my audio-dongle.


            Then do this:
            $ lsusb -v -d 0d8c:000e
            (with the last argument being the USB device id).

            You'll get a long verbose dump of the characteristics of the device, but what we are looking for is this:
            bcdUSB               1.10

            According this page, "bcdUSB" (binary coded-decimal ???) is "USB Specification Number which device complies too."


            2/ Has the test you have done been done with the "limit USB-speed to USB 1.10" trick applied or not?


            Now, as said, for me, I need two audio-dongles and limiting the USB speed to USB 1.10 does not seams to solve it. When I run two full-duplex audio session at the same time, the Pi gives an error about not having enough bandwidth on the USB-bus. :-(

            Does anybody have a reference to a USB 2.0 audio-dongle that is good and -by preference- easy to get.


            BTW.
            Does anybody have a reference to a good audio-dongle for SDR? (e.g. providing sampling-rates of 96 or 192 Ksamples/sec).?


            73
            kristoff - ON1ARF
          Your message has been successfully submitted and would be delivered to recipients shortly.