hpb

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: Unable to stream audio from Raspberry Pi to Mac #23014
    Avatarhpb
    Participant

    Yesterday I hooked up a USB gaming headset to my Mac.  The audio from my voice made it into the radio and I actually talked to another amateur radio operator over the air!  And  I did not hear my voice coming back at me through the headphones, so there is no chance of feedback.  This all works.  Thanks so much for the help.  I will be writing a set of tech notes for the amateur radio community on  how to integrate a Raspberry Pi, NoMachine, and a transceiver.  When I have this done, maybe in a few weeks, I’ll submit it to NoMachine for review to make sure I am using your product correctly.

    I took my iPad to a local coffee shop today and connected to my station through their wi-fi network.  I made high frequency contacts with Germany and Belgium using a digital mode named FT8.  Lots of radio fun.  I was able to hear the audio received from my station clearly on my iPad.  The day before I took my iPad to a Starbucks and made a Morse Code contact.

    in reply to: Unable to stream audio from Raspberry Pi to Mac #22971
    Avatarhpb
    Participant

    I believe I  have found a better way to send and receive audio to and from my amateur radio tranceiver.  The problem with the way we were doing it meant that received audio coming from device alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo.monitor,  the input of my USB soundcard, was being redirected to the output of the same soundcard, device alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo.  It seemed to me like there was potential for feedback.  It also bothered me that we had both ouput and input audio on the output of the USB soundcard at the same time, this just didn’t seem right.

    Instead I created a dummy sink, made it the default sink, and assigned the output of the USB soundcard to the dummy sink:

    pactl load-module module-null-sink sink_name=dummy

    pacmd set-default-sink dummy

    pacmd load-module module-loopback source=alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-mono sink=dummy

    This gets received audio from the radio’s headphone jack picked up by the nx_voice_out sink because dummy is now the default sink and the received audio is sent back  to the speakers/headphones of the Mac.

    Next, I send audio from my Mac to the output of the USB soundcard to be input into the mic jack of my transmitter:

    pactl load-module module-loopback source=nx_voice_out.monitor sink=alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo

    This appears  to work and I don’t have output audio from the ham transceiver also on the 0utput of the USB soundcard going back to the radio’s mic.  The key here is use of the dummy sink using module-null-sink.

    Does this all make sense?

     

    in reply to: Unable to stream audio from Raspberry Pi to Mac #22939
    Avatarhpb
    Participant

    And, the output of the NoMachine audio can be redirected using the Playback tab on pauvcontrol.  But this is still better than running a pauvcontrol command.

    in reply to: Unable to stream audio from Raspberry Pi to Mac #22938
    Avatarhpb
    Participant

    Yes, I can now hear audio from my Mac’s mic on the output of the USB soundcard.  Thank you!  One less PulseAudio command to run.

    in reply to: Any way to have a static NX URL? #22937
    Avatarhpb
    Participant

    Thank you!  I have registered to be notified when NoMachine network is implemented.  In the meantime I will investigate these dynamic DNS solutions.

    in reply to: Unable to stream audio from Raspberry Pi to Mac #22919
    Avatarhpb
    Participant

    One final question, I want to understand why the command you gave me earlier works.

    pacmd load-module module-loopback source=alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-mono

    There is no sink specified.  According  to the PulseAudio docs, when this happens, the source is sent to the default sink which on my system is:

    * index: 0
    name: <alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo>

    The * before index means this is the default sink.

    So, my question is, this works because NoMachine automatically connects to the default sink on the Pi and this is how audio gets back to NoMachine on the Mac, right?  Or at least this is what appears to be happening.

    Right now I’m happy this all works, but I’m trying to understand why it works so that I can troubleshoot on my own.

    in reply to: Unable to stream audio from Raspberry Pi to Mac #22918
    Avatarhpb
    Participant

    To close the loop on this topic so that it is properly documented for anybody searching for a solution….

    I have figured out how to get voice audio from the mic of my MacBook Pro into the output of the USB soundcard connected to my Pi.  This means that I’ll be able to use my Mac as a mic to talk to my amateur radio transceiver.

    The final piece of the puzzle is the following PulseAudio command:

    pactl load-module module-loopback source=nx_voice_out.monitor sink=alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo

    When I plug in a set of headphones into the output of the USB soundcard and use pavucontrol to enable NoMachine output and increase the output, I hear the output of my Mac’s mic!

    Thank you so much for the help and teaching me how to configure PulseAudio.  I have many years of experience as a Linux admin, but in a business environment, so I never had the opportunity to work with PulseAudio before.

    in reply to: Unable to stream audio from Raspberry Pi to Mac #22915
    Avatarhpb
    Participant

    It works!  Thanks you so much, especially since PulseAudio support is outside typical NoMachine usage.

    I am an amateur radio operator who is looking at operating my station remotely using NoMachine.  I operate mostly modern digital modes and Morse Code, which is all generated on my Raspberry Pi.  It would be nice to be able to operate voice remotely, but I can very much live without it.

    This is excellent support, especially for something that cost me nothing to download.  Thanks!

    in reply to: Unable to stream audio from Raspberry Pi to Mac #22905
    Avatarhpb
    Participant

    One more datapoint…I removed disconnected the USB soundcard and played a YouTube video on the Pi.  I hear audio coming  out  of the Pi when I connect headphones to the Pi’s audio jack but I hear nothing on my Mac.

    I actually removed NoMachine from my Pi and reinstalled it so that it would be aware of Pulseaudio.  I also performed this command on the Pi that I saw in another support  thread:

    sudo /usr/NX/scripts/setup/nxnode --audiosetup

    in reply to: Unable to stream audio from Raspberry Pi to Mac #22890
    Avatarhpb
    Participant

    If this will help, here is  the output of my list of sources.  I believe this shows my USB mic input set as the default source.

    pacmd list-sources | grep -e ‘index:’ -e device.string -e ‘name:’

    * index: 1
    name: <alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-mono>
    device.string = “hw:1”
    index: 2
    name: <alsa_output.platform-soc_audio.analog-stereo.monitor>
    device.string = “0”
    index: 3
    name: <alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo.monitor
    device.string = “1

    in reply to: Unable to stream audio from Raspberry Pi to Mac #22889
    Avatarhpb
    Participant

    I installed PulseAudio but still have problems.

    I now realize part of the problem is that I did not supply enough details about what I’m trying to accomplish.  I have the output audio from a radio going into the mic input of a USB soundcard.  I would like to hear this radio’s audio on the speakers of my Mac.

    I believe PulseAudio is correctly configured with the mic input of the USB soundcard as a source.  When I look at the Recording tab on pavucontrol,  I  see the audio varying in volume.  When I  reduce the volume on the radio the PulseAudio audio level in pavucontrol goes down and when I increase the volume on the radio the audio level in pavucontrol goes up.  So I believe PulseAudio is capturing the audio output from the radio.

    Am I misunderstanding how NoMachine’s audio forwarding works?  Is the audio from the PulseAudio mic input on my Pi not going to be forwarded to my Mac?  Is there a way to redirect this input audio stream on the Pi so that I can hear it on the Mac?

    Thanks.

    in reply to: Unable to stream audio from Raspberry Pi to Mac #22883
    Avatarhpb
    Participant

    No, I do not have PulseAudio installed on the Pi.  Thank you.  I will give this a try and get back to you.

Viewing 12 posts - 1 through 12 (of 12 total)