Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Chris Caudle
On Wed, April 26, 2017 12:22 pm, Frodo Jedi wrote:
> My goal is to send audio from the odroid board (master)
> to the mac (slave) using a direct ethernet connection.

The jackd master is the device with the audio hardware.  Are your problems
perhaps caused because you are following the setup instructions for master
on a device with no audio hardware? (saw later on that you tried the other
way around, so let's concentrate on that configuration).

> On the master:
> /usr/bin/jackd -P 70 -p96 -t 2000 -dalsa -dhw:CODEC -S -s
> -r48000 -p128 -n2

> jack_load netmanager


That is on the odroid?  What ALSA compatible hardware is on the odroid?

In any event, the short of it is that ALSA is the driver for the audio
hardware, so whichever device has speakers connected better be the device
where you are giving the driver argument as "-dalsa" or you won't hear any
sound.

> Actually, if can be of any help, I also tried to set the mac
> as master and the linux board as the slave.

That should be the correct configuration if you want to connect the mac to
an amplifier and speakers and you want the linux odroid system to just
send digital audio information to the mac and have the mac play the audio.

>  The result is that they seem to communicate,
> although jack on the mac crashes giving the error
> "Floating point exception: 8":

Can you run local jack aware software on the mac and play audio through
the mac audio hardware?  Make sure you can get that working first before
trying to bring networking into it.

> Default input and output devices are not the same !!
> Cannot open default device in duplex mode, so aggregate
> default input and default output
> Separated input = 'Built-in Microphone'
> Separated output = 'Built-in Output'

If you aren't going to use "Built-in Microphone" as an input device, you
could start with playback only.  That should get rid of the "input and
output devices are not the same !!" warning.   I think that would be -P
passed the coreaudio driver parameters, or maybe -Cno -Pyes, the manual
page is a little vaguely
worded and I don't have a machine with coreaudio to play with to try it out.

That is assuming you want to use the built in audio for the output,
otherwise the wrong device is selected and you need to sort that out
first.


> Takes physical 2 audio output(s) for slave
> Takes physical 0 MIDI input(s) for slave
> Takes physical 0 MIDI output(s) for slave
> Sending parameters to ...
> Floating point exception: 8

This is a modern mac with Intel processor?  Just making sure.  I don't
have a mac myself, but just in case someone else can help, which OS
version?

This is the default multicast address reported by the master:
> Starting Jack NetManager
> Listening on '225.3.19.154:19000'

But you specified a unicast address in the place where you would usually
specify a multicast address different than default:
> On the slave (linux board):
> jackd -R -d net -a 192.168.117.129 -p 19000

From the walk-through you linked:
Parameters for driver 'net' (all parameters are optional):
        -a, --multicast_ip      Multicast Address (default: 225.3.19.154)

You are giving a unicast address as the argument for the multicast address
to use.  Why did you think you needed to do that?
It seems the unicast address was ignored, because there is a message later
showing connected to macbook.

> Maximum number of input ports is reached for application ref = 0
> driver: cannot register port for system:midi_playback_769
> Can't allocate ports.
> Initing net driver fails...

That looks like the net backend driver is trying to register MIDI  ports
for some reason, but the documentation says the default is no MIDI ports.
From the walk-through page "The default configuration is a simple stereo
use, with no midi port."  Maybe one of the jack2 devs can comment on
whether the behavior and documentation have diverged.

If you do get rid of the internal microphone as an input port, you should
probably set the net backend to not expect any input ports.   I think that
would be adding -C 0 -P 2 to the arguments after -dnet.
I guess for good measure you could add -i 0 -o 0 to specify 0 MIDI in and
out ports, although that is supposed to be the default.

--
Chris Caudle


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Frodo Jedi
Dear Chris,
thanks a lot for your prompt reply,


On Wed, Apr 26, 2017 at 11:45 PM, Chris Caudle <[hidden email]> wrote:
On Wed, April 26, 2017 12:22 pm, Frodo Jedi wrote:
> My goal is to send audio from the odroid board (master)
> to the mac (slave) using a direct ethernet connection.

The jackd master is the device with the audio hardware.  Are your problems
perhaps caused because you are following the setup instructions for master
on a device with no audio hardware? (saw later on that you tried the other
way around, so let's concentrate on that configuration).


Actually, my goal is that of sending audio from the board to other connected devices, for the moment I am using a mac, it could be another pc with linux or windows.
I am going for a wired connection first, with the final aim to test netjack2 over wifi, and compare the wired and wireless behaviours under various conditions.

The odroid board (configured as master in the first case) has a beheringer soundcard perfectly working, I can record and listen audio using it. So I should be able to use the odroid + soundcard configuration as a master, and the mac as a slave. Right?

 

> On the master:
> /usr/bin/jackd -P 70 -p96 -t 2000 -dalsa -dhw:CODEC -S -s
> -r48000 -p128 -n2

> jack_load netmanager


That is on the odroid? 


yes

 
What ALSA compatible hardware is on the odroid?


U-CONTROL UCA222



 
In any event, the short of it is that ALSA is the driver for the audio
hardware, so whichever device has speakers connected better be the device
where you are giving the driver argument as "-dalsa" or you won't hear any
sound.

> Actually, if can be of any help, I also tried to set the mac
> as master and the linux board as the slave.

That should be the correct configuration if you want to connect the mac to
an amplifier and speakers and you want the linux odroid system to just
send digital audio information to the mac and have the mac play the audio.


Ok, but my goal is to have a networked configuration where the linux odroid system broadcast 
audio to various connected devices. My understanding is that the odroid must be the master and
all the other devices receiving and reproducing the audio signal must be the slave. Am I wrong?


 
>  The result is that they seem to communicate,
> although jack on the mac crashes giving the error
> "Floating point exception: 8":

Can you run local jack aware software on the mac and play audio through
the mac audio hardware?  Make sure you can get that working first before
trying to bring networking into it.



Of course, I successfully used jack2 on the mac, it perfectly works (for instance with Audacity or Max/MSP 7).

 
> Default input and output devices are not the same !!
> Cannot open default device in duplex mode, so aggregate
> default input and default output
> Separated input = 'Built-in Microphone'
> Separated output = 'Built-in Output'

If you aren't going to use "Built-in Microphone" as an input device, you
could start with playback only.  That should get rid of the "input and
output devices are not the same !!" warning.   I think that would be -P
passed the coreaudio driver parameters, or maybe -Cno -Pyes, the manual
page is a little vaguely
worded and I don't have a machine with coreaudio to play with to try it out.

That is assuming you want to use the built in audio for the output,
otherwise the wrong device is selected and you need to sort that out
first.


Ok I will try tomorrow and report to you. At the moment yes the mac's built in audio for the output  is what I want to test.



> Takes physical 2 audio output(s) for slave
> Takes physical 0 MIDI input(s) for slave
> Takes physical 0 MIDI output(s) for slave
> Sending parameters to ...
> Floating point exception: 8

This is a modern mac with Intel processor?  Just making sure.  I don't
have a mac myself, but just in case someone else can help, which OS
version?


Yes, I am using the very last macbook pro, with the very last and updated OS X (version 10.12.4).


 

This is the default multicast address reported by the master:
> Starting Jack NetManager
> Listening on '225.3.19.154:19000'

But you specified a unicast address in the place where you would usually
specify a multicast address different than default:
> On the slave (linux board):
> jackd -R -d net -a 192.168.117.129 -p 19000

From the walk-through you linked:
Parameters for driver 'net' (all parameters are optional):
        -a, --multicast_ip      Multicast Address (default: 225.3.19.154)

You are giving a unicast address as the argument for the multicast address
to use.  Why did you think you needed to do that?
It seems the unicast address was ignored, because there is a message later
showing connected to macbook.


I don't have the setup right now, I will re-test tomorrow, but if I correctly remember, I used the address 192.168.117.129
(which is the static address I gave to the mac) because simply using  jackd -R -d net (which takes the default) did not work.


 

> Maximum number of input ports is reached for application ref = 0
> driver: cannot register port for system:midi_playback_769
> Can't allocate ports.
> Initing net driver fails...

That looks like the net backend driver is trying to register MIDI  ports
for some reason, but the documentation says the default is no MIDI ports.
From the walk-through page "The default configuration is a simple stereo
use, with no midi port."  Maybe one of the jack2 devs can comment on
whether the behavior and documentation have diverged.


Yes it would be great if any jack developer could comment on this. I am available to contribute to the jack community 
by doing some tests on the mac if needed.

 

If you do get rid of the internal microphone as an input port, you should
probably set the net backend to not expect any input ports.   I think that
would be adding -C 0 -P 2 to the arguments after -dnet.
I guess for good measure you could add -i 0 -o 0 to specify 0 MIDI in and
out ports, although that is supposed to be the default.


I will try tomorrow and report. 


However, this is not the main goal I want to pursue, as I want to send audio from the linux odroid board.
Any further insight on this?


Cheers

 
--
Chris Caudle


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Frodo Jedi
Hi all,
so I did the test suggested by Chris and still I am in troubles. Here the outputs


Master: (mac OSX Sierra 10.12.4)

sh-3.2# jackd -R -d coreaudio -Cno -Pyes
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
Separated input = 'Built-in Microphone'
Separated output = 'Built-in Output'
Input channel = 0 ==> JACK input port = 0
Input channel = 1 ==> JACK input port = 1
JACK output port = 0 ==> output channel = 0
JACK output port = 1 ==> output channel = 1
CoreAudio driver is running...
Starting Jack NetManager
Listening on '225.3.19.154:19000'
Sending parameters to ...
Can't set net buffer sizes : Invalid argument
SetParams error...
Can't init new NetMaster...
Waiting for a slave...






Slave: (debian linux odroid board)

>jackd -R -d net -a 225.3.19.154 -p 19000 -C 0 -P 2 -i 0 -o 0

jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2015 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
NetDriver started in async mode without Master's transport sync.
Waiting for a master...
Initializing connection with ucas-MacBook-Pro-9.local...
Maximum number of input ports is reached for application ref = 0
driver: cannot register port for system:midi_playback_767
Can't allocate ports.
Initing net driver fails...




As you can see the issue of the MIDI ports is still there, despite I gave the options -i 0 -o 0.
More interesting is this part of the master's jackd output:

Sending parameters to ...
Can't set net buffer sizes : Invalid argument
SetParams error...
Can't init new NetMaster...
Waiting for a slave...







Any suggestion?


And... any insights regarding the more general questions I posed in the previous e-mail?


Thanks in advance

Cheers





On Thu, Apr 27, 2017 at 1:24 AM, Frodo Jedi <[hidden email]> wrote:
Dear Chris,
thanks a lot for your prompt reply,


On Wed, Apr 26, 2017 at 11:45 PM, Chris Caudle <[hidden email]> wrote:
On Wed, April 26, 2017 12:22 pm, Frodo Jedi wrote:
> My goal is to send audio from the odroid board (master)
> to the mac (slave) using a direct ethernet connection.

The jackd master is the device with the audio hardware.  Are your problems
perhaps caused because you are following the setup instructions for master
on a device with no audio hardware? (saw later on that you tried the other
way around, so let's concentrate on that configuration).


Actually, my goal is that of sending audio from the board to other connected devices, for the moment I am using a mac, it could be another pc with linux or windows.
I am going for a wired connection first, with the final aim to test netjack2 over wifi, and compare the wired and wireless behaviours under various conditions.

The odroid board (configured as master in the first case) has a beheringer soundcard perfectly working, I can record and listen audio using it. So I should be able to use the odroid + soundcard configuration as a master, and the mac as a slave. Right?

 

> On the master:
> /usr/bin/jackd -P 70 -p96 -t 2000 -dalsa -dhw:CODEC -S -s
> -r48000 -p128 -n2

> jack_load netmanager


That is on the odroid? 


yes

 
What ALSA compatible hardware is on the odroid?


U-CONTROL UCA222



 
In any event, the short of it is that ALSA is the driver for the audio
hardware, so whichever device has speakers connected better be the device
where you are giving the driver argument as "-dalsa" or you won't hear any
sound.

> Actually, if can be of any help, I also tried to set the mac
> as master and the linux board as the slave.

That should be the correct configuration if you want to connect the mac to
an amplifier and speakers and you want the linux odroid system to just
send digital audio information to the mac and have the mac play the audio.


Ok, but my goal is to have a networked configuration where the linux odroid system broadcast 
audio to various connected devices. My understanding is that the odroid must be the master and
all the other devices receiving and reproducing the audio signal must be the slave. Am I wrong?


 
>  The result is that they seem to communicate,
> although jack on the mac crashes giving the error
> "Floating point exception: 8":

Can you run local jack aware software on the mac and play audio through
the mac audio hardware?  Make sure you can get that working first before
trying to bring networking into it.



Of course, I successfully used jack2 on the mac, it perfectly works (for instance with Audacity or Max/MSP 7).

 
> Default input and output devices are not the same !!
> Cannot open default device in duplex mode, so aggregate
> default input and default output
> Separated input = 'Built-in Microphone'
> Separated output = 'Built-in Output'

If you aren't going to use "Built-in Microphone" as an input device, you
could start with playback only.  That should get rid of the "input and
output devices are not the same !!" warning.   I think that would be -P
passed the coreaudio driver parameters, or maybe -Cno -Pyes, the manual
page is a little vaguely
worded and I don't have a machine with coreaudio to play with to try it out.

That is assuming you want to use the built in audio for the output,
otherwise the wrong device is selected and you need to sort that out
first.


Ok I will try tomorrow and report to you. At the moment yes the mac's built in audio for the output  is what I want to test.



> Takes physical 2 audio output(s) for slave
> Takes physical 0 MIDI input(s) for slave
> Takes physical 0 MIDI output(s) for slave
> Sending parameters to ...
> Floating point exception: 8

This is a modern mac with Intel processor?  Just making sure.  I don't
have a mac myself, but just in case someone else can help, which OS
version?


Yes, I am using the very last macbook pro, with the very last and updated OS X (version 10.12.4).


 

This is the default multicast address reported by the master:
> Starting Jack NetManager
> Listening on '225.3.19.154:19000'

But you specified a unicast address in the place where you would usually
specify a multicast address different than default:
> On the slave (linux board):
> jackd -R -d net -a 192.168.117.129 -p 19000

From the walk-through you linked:
Parameters for driver 'net' (all parameters are optional):
        -a, --multicast_ip      Multicast Address (default: 225.3.19.154)

You are giving a unicast address as the argument for the multicast address
to use.  Why did you think you needed to do that?
It seems the unicast address was ignored, because there is a message later
showing connected to macbook.


I don't have the setup right now, I will re-test tomorrow, but if I correctly remember, I used the address 192.168.117.129
(which is the static address I gave to the mac) because simply using  jackd -R -d net (which takes the default) did not work.


 

> Maximum number of input ports is reached for application ref = 0
> driver: cannot register port for system:midi_playback_769
> Can't allocate ports.
> Initing net driver fails...

That looks like the net backend driver is trying to register MIDI  ports
for some reason, but the documentation says the default is no MIDI ports.
From the walk-through page "The default configuration is a simple stereo
use, with no midi port."  Maybe one of the jack2 devs can comment on
whether the behavior and documentation have diverged.


Yes it would be great if any jack developer could comment on this. I am available to contribute to the jack community 
by doing some tests on the mac if needed.

 

If you do get rid of the internal microphone as an input port, you should
probably set the net backend to not expect any input ports.   I think that
would be adding -C 0 -P 2 to the arguments after -dnet.
I guess for good measure you could add -i 0 -o 0 to specify 0 MIDI in and
out ports, although that is supposed to be the default.


I will try tomorrow and report. 


However, this is not the main goal I want to pursue, as I want to send audio from the linux odroid board.
Any further insight on this?


Cheers

 
--
Chris Caudle


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org



_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Thomas Brand
In reply to this post by Frodo Jedi
On Thu, April 27, 2017 01:24, Frodo Jedi wrote:

>
> Actually, my goal is that of sending audio from the board to other
> connected devices, for the moment I am using a mac, it could be another pc
>  with linux or windows. I am going for a wired connection first, with the
> final aim to test netjack2 over wifi, and compare the wired and wireless
> behaviours under various conditions.
>
> The odroid board (configured as master in the first case) has a
> beheringer soundcard perfectly working, I can record and listen audio
> using it. So I should be able to use the odroid + soundcard configuration
> as a master, and the mac as a slave. Right?
>

Hi,
if you just want to *send* audio and don't need synced JACK domains you
could consider using zita n2j / j2n. The resampling will be done on the
receiving end.
http://kokkinizita.linuxaudio.org/linuxaudio/downloads/zita-njbridge-0.4.1.tar.bz2
Greetings
Tom


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Frodo Jedi
Dear Thomas,
many thanks. I will try zita but my main goal is to use netjack2.

Cheers



On Thu, Apr 27, 2017 at 6:02 PM, Thomas Brand <[hidden email]> wrote:
On Thu, April 27, 2017 01:24, Frodo Jedi wrote:
>
> Actually, my goal is that of sending audio from the board to other
> connected devices, for the moment I am using a mac, it could be another pc
>  with linux or windows. I am going for a wired connection first, with the
> final aim to test netjack2 over wifi, and compare the wired and wireless
> behaviours under various conditions.
>
> The odroid board (configured as master in the first case) has a
> beheringer soundcard perfectly working, I can record and listen audio
> using it. So I should be able to use the odroid + soundcard configuration
> as a master, and the mac as a slave. Right?
>

Hi,
if you just want to *send* audio and don't need synced JACK domains you
could consider using zita n2j / j2n. The resampling will be done on the
receiving end.
http://kokkinizita.linuxaudio.org/linuxaudio/downloads/zita-njbridge-0.4.1.tar.bz2
Greetings
Tom




_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Chris Caudle
In reply to this post by Chris Caudle
On Wed, April 26, 2017 6:24 pm, Frodo Jedi wrote:
> Actually, my goal is that of sending audio from the board to
> other connected devices, for the moment I am using a mac,
> it could be another pc with linux or windows.

Jack is designed with the idea that the audio hardware controls all data
flow, since that is really the final location that the data has to either
get to the output device (D/A converter, S/PDIF output, etc.), or is sent
by the input device (A/D converter).  In jack terms what you are
describing is that the odroid would be sent to multiple master devices.
You either have to disconnect from one master and connect to another each
time you want to send audio to a different device, or you have to use a
bridge software to bridge between different jack master clock domains. The
jack walk-through that you linked to previously shows using the
audioadapter plugin for that, the zita-nj and zita-jn bridges work better.

>  I will try zita but my main goal is to use netjack2.

You should be very clear whether your goal is to use netjack2, or whether
your goal is to send audio from your odroid to various other devices. If
your goal is to use netjack2 you should pick a connection topology that
matches the expectations of the jack design.

If your goal is actually to send audio from the odroid to various other
devices, then you should use whatever tool is most appropriate for the
job.  If you need audio to be sent to multiple other devices with audio
hardware using jack, then zita bridge is probably what you need if you are
using jack.  Whether you should even be using jack is a separate question.

Is this a studio or audio production type setup?  Because if you are just
trying to setup distributed home audio then something like Logitech Media
Server and squeezebox lite software may be better suited for what you are
trying to do.

> I am going for a wired connection first, with the final aim to
> test netjack2 over wifi, and compare the wired and wireless
> behaviours  under various conditions.

Don't have high expectations for jack over WiFi.  Jack is designed around
low latency connections, and WiFi generally cannot sustain reliably low
latency connections.  There is work going on to get there, but unless you
have been following along with the bufferbloat and "make Wi-Fi fast" work
and are running bleeding edge drivers you are probably going to hit
latency spikes that will cause problems for jack.  You can have fun
figuring that out once wired connections are working OK.


> The odroid board (configured as master in the first case)
> has a beheringer soundcard perfectly working, I can record
> and listen audio using it. So I should be able to use the
> odroid + soundcard configuration as a master, and the
> mac as a slave. Right?

Yes, presumably.  Just to be clear, those terms mean you would have
something like Ardour running on the mac producing audio data, and the
data would be sent to the odroid which would play the audio through the
behringer/speakers.

> Ok, but my goal is to have a networked configuration where
> the linux odroid system broadcast audio to various connected devices.

With the various connected devices each having audio hardware and speakers
connected?  Then you will need bridge software such as audioadapter or
zita-njb and zita-jnb loaded to cross between the clock domains (since
each separate audio hardware will have its own sample clock running
independently and you don't have a way to synchronize all the clocks).

> My understanding is that the odroid must be the master and
> all the other devices receiving and reproducing the audio
> signal must be the slave. Am I wrong?

You are wrong.  In the jack terminology, the device with the fixed clock,
i.e. the audio hardware device, must control the flow of data, in other
words must be the master.
In the case of multiple devices playing out the audio you have in jack
terminology multiple masters, so you have to bridge between the masters.

Just for the sake of  completeness, there is a way to do what you thought
you wanted, used in studio and broadcast facilities, but it requires all
the audio playback devices to have the ability to synchronize their audio
clocks to a centralized clocking signal used for the entire studio or
broadcast facility.  Traditionally that was done by distributing a
synchronization signal to each piece of equipment used, more recently it
can be done by using IEEE 1588v2 "Precision Time Protocol" to synchronize
the local clock of each device over Ethernet.  That is a fairly
sophisticated setup, suffice to say that if you had equipment that could
do that you would already know how to set it up correctly, so that
topology does not apply here.

Jackd may not be the tool best suited for your use.  Do you actually need
low latency and the patch bay style features of jack?  If you just want to
be able to play audio from a central server to various audio playback
devices which do not need to be synchronized at the audio frame level then
some type of whole house audio design may be better suited to what you
want than jack, which is designed specifically for low latency audio
production use.  Either Logitech Media Server with squeezebox lite
instances as I mentioned, or an Icecast server running on the odroid and
VLC or something similar running on the other machines to pull the audio
they want.  That is the answer to a question you did not ask, just wanted
to mention it for completeness, since you have asked about getting netjack
running but it is not clear from some of your questions whether that is
really what would best serve your end goal (assuming your end goal really
is some arrangement of playing audio, and contrary to what you wrote
earlier running netjack2 is not actually a goal in itself).

>> You are giving a unicast address as the argument for the
>> multicast address
> I don't have the setup right now, I will re-test tomorrow,
> but if  I correctly remember, I used the address 192.168.117.129 (which
is the static address I gave to the mac) because simply
> using jackd -R -d net (which takes the default) did not work.

I'll have to try myself later.  My machines have multiple network
interfaces, which makes multicast setup a little tricky, I have to
remember how to tell the kernel which interface should be listening for
multicast, might take me a while to get that working properly.  But a
little worrying that the documentation does not seem to match the behavior
of the software.


> Master: (mac OSX Sierra 10.12.4)
>
> sh-3.2# jackd -R -d coreaudio -Cno -Pyes

Note that I'm not sure that the -C and -P arguments actually take a yes or
no value.  There were no error messages complaining, so maybe that is OK.
The documentation seems vague and I don't have a mac to verify the
coreaudio driver behavior.  See below...

> jackdmp 1.9.11
> Copyright 2001-2005 Paul Davis and others.
> Copyright 2004-2016 Grame.
> jackdmp comes with ABSOLUTELY NO WARRANTY
> This is free software, and you are welcome to redistribute it
> under certain conditions; see the file COPYING for details
> JACK server starting in realtime mode with priority 10
> self-connect-mode is "Don't restrict self connect requests"
> Separated input = 'Built-in Microphone'
> Separated output = 'Built-in Output'
> Input channel = 0 ==> JACK input port = 0
> Input channel = 1 ==> JACK input port = 1

That seems to indicate that there are two input channels, so the -Cno did
not seem to do anything.  Maybe just leave off the -C altogether and have
only -P.
Since you have only mentioned playing audio and not capturing audio, the
goal was to get the master configured for playback only to simplify the
configuration as much as possible.

> JACK output port = 0 ==> output channel = 0
> JACK output port = 1 ==> output channel = 1
> CoreAudio driver is running...
> Starting Jack NetManager
> Listening on '225.3.19.154:19000'
> Sending parameters to ...

> Can't set net buffer sizes : Invalid argument
> SetParams error...
> Can't init new NetMaster...

If I am interpreting that correctly, the message indicates that the
netjack driver could not start correctly.

> Slave: (debian linux odroid board)
> Initializing connection with ucas-MacBook-Pro-9.local...

So the odroid was able to detect that the MacBook was running netjack.
Possibly all the later error messages are because the MacBook is not
giving reasonable responses due to whatever caused the earlier messages
about not being able to set the net buffer sizes.

> Any suggestion?

The walk-through guide says this form will print more information:
 jack_load netmanager -i "-h"

Try that and see if there is useful information printed about the number
of channels which can be used, or the optimum period size for your system.

My suspicion after looking more closely is that this message:
> Can't set net buffer sizes : Invalid argument

Is that the audio parameters set force the netjack driver into attempting
to use invalid settings.  That message comes from this location in
JackNetInterface.cpp:

        try {

            // audio net buffers
            if (fParams.fSendAudioChannels > 0) {
                fNetAudioCaptureBuffer =
AudioBufferFactory(fParams.fSendAudioChannels, fTxData);
                assert(fNetAudioCaptureBuffer);
            }

            if (fParams.fReturnAudioChannels > 0) {
                fNetAudioPlaybackBuffer =
AudioBufferFactory(fParams.fReturnAudioChannels, fRxData);
                assert(fNetAudioPlaybackBuffer);
            }

        } catch (exception&) {
            jack_error("NetAudioBuffer on master allocation error...");
return false;
        }

        // set the new buffer size
        if (SetNetBufferSize() == SOCKET_ERROR) {
            jack_error("Can't set net buffer sizes : %s",
StrError(NET_ERROR_CODE));
            goto error;
        }

        return true;

    error:
        FreeNetworkBuffers();
        return false;
    }


So it appears that the jack side was able to set the buffer size with no
exception, but then after attempting to use that information to set the
network buffer size the network API gave an error.

I just looked back at your first email and that message was not present.
In the first configurations you explicity gave the -p128 -n2 parameters,
you did not show that in your most recent command output.  Perhaps you
introduced a new problem.
Typically when jackd starts it prints the sample rate, the sample format
(number of bits used), and the number of samples per frame and frames per
period.  I do not see  that in the most recent output you showed.
Did you truncate any output from the jackd messages, or did jackd really
not print out the buffer size information?

--
Chris Caudle














_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Chris Caudle
I had some firewall configuration problems preventing successful multicast
packet exchange between my test machines, but I got that sorted out by
temporarily just disabling the firewall on one machine.

This is the output I see from each machine.

On machine with USB interface attached (jackd master):

]$ /usr/bin/jackd -P70 -t2000 -dalsa -dhw:Lambda -r48000 -p1024 -n3 -Xseq
-zt -I376 -O376
jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 70
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ...
hw:Lambda|hw:Lambda|1024|3|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 3 periods
ALSA: final selected sample format for capture: 24bit little-endian
ALSA: use 3 periods for capture
ALSA: final selected sample format for playback: 24bit little-endian
ALSA: use 3 periods for playback
Using port names patch v0.1 (07.04.2010)
Trying to load portnames from /home/chris/.config/jack/cards/Lexicon
Lambda.ss.ports.in
Trying to load portnames from /home/chris/.config/jack/cards/Lexicon
Lambda.ports.in
Trying to load portnames from /etc/jack/cards/Lexicon Lambda.ss.ports.in
Trying to load portnames from /etc/jack/cards/Lexicon Lambda.ports.in
Trying to load portnames from /home/chris/.config/jack/cards/Lexicon
Lambda.ss.ports.out
Trying to load portnames from /home/chris/.config/jack/cards/Lexicon
Lambda.ports.out
Trying to load portnames from /etc/jack/cards/Lexicon Lambda.ss.ports.out
Trying to load portnames from /etc/jack/cards/Lexicon Lambda.ports.out
port created: Midi-Through:midi/playback_1
port created: Midi-Through:midi/capture_1
port created: Lexicon-Lambda:midi/playback_1
port created: Lexicon-Lambda:midi/capture_1

--------------------
in separate console loaded netmanager at this point.
output from netmanager load:
$ jack_load netmanager
netmanager is running.
client name = netmanager
--------------------

Starting Jack NetManager
Listening on '225.3.19.154:19000'

---------------------
slave machine jackd started at this point
This is still output from master side, just making a timing notation
---------------------

Takes physical 2 audio input(s) for slave
Takes physical 2 audio output(s) for slave
Takes physical 2 MIDI input(s) for slave
Takes physical 2 MIDI output(s) for slave
Sending parameters to oldchubb...
New NetMaster started
**************** Network parameters ****************
Name : oldchubb
Protocol revision : 8
MTU : 1500
Master name : chubb.cc-net
Slave name : oldchubb
ID : 1
Transport Sync : no
Send channels (audio - midi) : 2 - 2
Return channels (audio - midi) : 2 - 2
Sample rate : 48000 frames per second
Period size : 1024 frames per period
Network latency : 5 cycles
SampleEncoder : Float
Slave mode : async
****************************************************
Waiting for a slave...
Synching with latency = 0
Synching with latency = 1
Synching with latency = 2
Synching with latency = 3
Synching with latency = 4


Output from slave side:

$ /usr/bin/jackd -dnet
jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 20
self-connect-mode is "Don't restrict self connect requests"
NetDriver started in async mode without Master's transport sync.
Waiting for a master...
Initializing connection with chubb.cc-net...
**************** Network parameters ****************
Name : oldchubb
Protocol revision : 8
MTU : 1500
Master name : chubb.cc-net
Slave name : oldchubb
ID : 1
Transport Sync : no
Send channels (audio - midi) : 2 - 2
Return channels (audio - midi) : 2 - 2
Sample rate : 48000 frames per second
Period size : 1024 frames per period
Network latency : 5 cycles
SampleEncoder : Float
Slave mode : async
****************************************************


So it seems that contrary to the documentation netjack2 will create MIDI
channels by default, and at least on my system (where the interface does
support duplex mode) I can start netjack with no arguments and the default
behavior will successfully create a connection.

So I think at this point my guess is that the last output shown by the
original poster indicates some kind of mismatch between the jack ALSA
parameters and the allowed netjack parameters:
>> Can't set net buffer sizes : Invalid argument
>> SetParams error...
>> Can't init new NetMaster...

I thought maybe the buffer size was too large, but the original post was
using -p128 -n2, and at least on my machine I use -p1024 -n3 and that did
not have a problem.

But again, the last message from the original post did not show the
"configuring for..." output line from jackd, so either the jackd output
was truncated in the posting, removing information necessary to help
debug, or the ALSA backend did not actually start correctly.

--
Chris


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Frodo Jedi
Dear Chris,
many thanks for all your info and suggestions. For the moment I want to test netjack2, I will definitively try the zita bridge asap.

Regarding your questions, I have never truncated the commands outputs.


Firstly, the -Cno -Pyes commands remove the warning "Default input and output devices are not the same !!", while having only -P does not.
I have specified the parameters for coreaudio. I did various trials, I report the outputs below.


TRIAL 1 ----------------------------------------------------
On the master (Mac computer)

sh-3.2# jackd -P 70 -p96 -t 2000 -dcoreaudio  -s -r48000 -p128 -n2 -Cno -Pyes
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 70
self-connect-mode is "Don't restrict self connect requests"
Separated input = 'Built-in Microphone'
Separated output = 'Built-in Output'
Clock drift compensation was asked but is not needed (devices use the same clock domain)
Ignore incorrect channel mapping value = 2
Input channel = 0 ==> JACK input port = 0
Input channel = 1 ==> JACK input port = 1
JACK output port = 0 ==> output channel = 0
JACK output port = 1 ==> output channel = 1
DeviceNotificationCallback kAudioDeviceProcessorOverload
CoreAudio driver is running...
Starting Jack NetManager
Listening on '225.3.19.154:19000'
Takes physical 2 audio output(s) for slave
Takes physical 0 MIDI input(s) for slave
Takes physical 0 MIDI output(s) for slave
Sending parameters to ...
Floating point exception: 8



On the slave (the linux odroid board):


> jackd -R -d net
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2015 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
NetDriver started in async mode without Master's transport sync.
Waiting for a master...
Initializing connection with ucas-MacBook-Pro-9.local...
Maximum number of input ports is reached for application ref = 0
driver: cannot register port for system:midi_playback_769
Can't allocate ports.
Initing net driver fails...









TRIAL 2 ----------------------------------------------------

On the master (Mac computer)


sh-3.2# jackd -P 70 -p96 -t 2000 -dcoreaudio  -s -r48000 -p128 -n2 -Cno -Pyes
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 70
self-connect-mode is "Don't restrict self connect requests"
Separated input = 'Built-in Microphone'
Separated output = 'Built-in Output'
Clock drift compensation was asked but is not needed (devices use the same clock domain)
Ignore incorrect channel mapping value = 2
Input channel = 0 ==> JACK input port = 0
Input channel = 1 ==> JACK input port = 1
JACK output port = 0 ==> output channel = 0
JACK output port = 1 ==> output channel = 1
DeviceNotificationCallback kAudioDeviceProcessorOverload
CoreAudio driver is running...
Starting Jack NetManager
Listening on '225.3.19.154:19000'
Sending parameters to ...
Can't set net buffer sizes : Invalid argument
SetParams error...
Can't init new NetMaster...
Waiting for a slave...


On the slave (the linux odroid board):


> jackd -R -d net -a 225.3.19.154 -p 19000 -C 0 -P 2 -i 0 -o 0
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2015 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
NetDriver started in async mode without Master's transport sync.
Waiting for a master...
Initializing connection with ucas-MacBook-Pro-9.local...
Maximum number of input ports is reached for application ref = 0
driver: cannot register port for system:midi_playback_767
Can't allocate ports.
Initing net driver fails...





TRIAL 3----------------------------------------------------

On the master (Mac computer)

jack_load netmanager -i "-h" gives:

Internal client parameters:
-a, --multicast-ip Multicast address (default: 225.3.19.154)
-p, --udp-net-port UDP port (default: 19000)
-c, --auto-connect Auto connect netmaster to system ports (default: false)
-s, --auto-save Save/restore netmaster connection state when restarted (default: false)


Therefore I typed: jack_load netmanager -i "-c true"
netmanager is running.
client name = netmanager

The result does not change....


sh-3.2# jackd -P 70 -p96 -t 2000 -dcoreaudio  -s -r48000 -p128 -n2 -Cno -Pyes
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 70
self-connect-mode is "Don't restrict self connect requests"
Separated input = 'Built-in Microphone'
Separated output = 'Built-in Output'
Clock drift compensation was asked but is not needed (devices use the same clock domain)
Ignore incorrect channel mapping value = 2
Input channel = 0 ==> JACK input port = 0
Input channel = 1 ==> JACK input port = 1
JACK output port = 0 ==> output channel = 0
JACK output port = 1 ==> output channel = 1
CoreAudio driver is running...
Starting Jack NetManager
Listening on '225.3.19.154:19000'
Sending parameters to ...
Can't set net buffer sizes : Invalid argument
SetParams error...
Can't init new NetMaster...
Waiting for a slave...






On the slave (the linux odroid board):


> jackd -R -d net -a 225.3.19.154 -p 19000 -C 0 -P 2 -i 0 -o 0
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2015 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
NetDriver started in async mode without Master's transport sync.
Waiting for a master...
Initializing connection with ucas-MacBook-Pro-9.local...
Maximum number of input ports is reached for application ref = 0
driver: cannot register port for system:midi_playback_767
Can't allocate ports.
Initing net driver fails...




TRIAL 4 ----------------------------------------------------


I used a different buffer size 1024 and with or without specifying the maximum number of port of jackd

jackd -P 70  -t 2000 -dcoreaudio  -s -r48000 -p1024 -n2 -Cno -Pyes

jackd -P 70  -p96  -t 2000 -dcoreaudio  -s -r48000 -p1024 -n2 -Cno -Pyes


The result are the same of before.,...





TRIAL 5 ----------------------------------------------------

Notably if I just us:  jackd -R -d net  or  jackd -R -d net -a 225.3.19.154 -p 19000 or 

the crashing error "Floating point exception: 8" arises, while it does not specifying jackd -R -d net -a 225.3.19.154 -p 19000 -C 0 -P 2  (see TRIAL 6) :





On the master (Mac computer)

sh-3.2# jackd -P 70 -p96 -t 2000 -dcoreaudio  -s -r48000 -p128 -n2 -Cno -Pyes
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 70
self-connect-mode is "Don't restrict self connect requests"
Separated input = 'Built-in Microphone'
Separated output = 'Built-in Output'
Clock drift compensation was asked but is not needed (devices use the same clock domain)
Ignore incorrect channel mapping value = 2
Input channel = 0 ==> JACK input port = 0
Input channel = 1 ==> JACK input port = 1
JACK output port = 0 ==> output channel = 0
JACK output port = 1 ==> output channel = 1
DeviceNotificationCallback kAudioDeviceProcessorOverload
CoreAudio driver is running...
Starting Jack NetManager
Listening on '225.3.19.154:19000'
Takes physical 2 audio output(s) for slave
Takes physical 0 MIDI input(s) for slave
Takes physical 0 MIDI output(s) for slave
Sending parameters to ...
Floating point exception: 8



On the slave (the linux odroid board):


> jackd -R -d net
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2015 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
NetDriver started in async mode without Master's transport sync.
Waiting for a master...
Initializing connection with ucas-MacBook-Pro-9.local...
Maximum number of input ports is reached for application ref = 0
driver: cannot register port for system:midi_playback_769
Can't allocate ports.
Initing net driver fails...















TRIAL 6 ----------------------------------------------------



On the master (Mac computer)

sh-3.2# jackd -P 70 -p96 -t 2000 -dcoreaudio  -s -r48000 -p128 -n2 -Cno -Pyes
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 70
self-connect-mode is "Don't restrict self connect requests"
Separated input = 'Built-in Microphone'
Separated output = 'Built-in Output'
Clock drift compensation was asked but is not needed (devices use the same clock domain)
Ignore incorrect channel mapping value = 2
Input channel = 0 ==> JACK input port = 0
Input channel = 1 ==> JACK input port = 1
JACK output port = 0 ==> output channel = 0
JACK output port = 1 ==> output channel = 1
CoreAudio driver is running...
Starting Jack NetManager
Listening on '225.3.19.154:19000'
Takes physical 0 MIDI output(s) for slave
Sending parameters to ...
Can't set net buffer sizes : Invalid argument
SetParams error...
Can't init new NetMaster...
Waiting for a slave...




On the slave (the linux odroid board):


> jackd -R -d net -a 225.3.19.154 -p 19000 -C 0 -P 2
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2015 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
NetDriver started in async mode without Master's transport sync.
Waiting for a master...
Initializing connection with ucas-MacBook-Pro-9.local...
Maximum number of input ports is reached for application ref = 0
driver: cannot register port for system:midi_playback_767
Can't allocate ports.
Initing net driver fails...









Still the problems persists. I can't proceed... Any further suggestion to make work the two jackified units?



Cheers



On Mon, May 1, 2017 at 6:00 PM, Chris Caudle <[hidden email]> wrote:
I had some firewall configuration problems preventing successful multicast
packet exchange between my test machines, but I got that sorted out by
temporarily just disabling the firewall on one machine.

This is the output I see from each machine.

On machine with USB interface attached (jackd master):

]$ /usr/bin/jackd -P70 -t2000 -dalsa -dhw:Lambda -r48000 -p1024 -n3 -Xseq
-zt -I376 -O376
jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 70
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ...
hw:Lambda|hw:Lambda|1024|3|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 3 periods
ALSA: final selected sample format for capture: 24bit little-endian
ALSA: use 3 periods for capture
ALSA: final selected sample format for playback: 24bit little-endian
ALSA: use 3 periods for playback
Using port names patch v0.1 (07.04.2010)
Trying to load portnames from /home/chris/.config/jack/cards/Lexicon
Lambda.ss.ports.in
Trying to load portnames from /home/chris/.config/jack/cards/Lexicon
Lambda.ports.in
Trying to load portnames from /etc/jack/cards/Lexicon Lambda.ss.ports.in
Trying to load portnames from /etc/jack/cards/Lexicon Lambda.ports.in
Trying to load portnames from /home/chris/.config/jack/cards/Lexicon
Lambda.ss.ports.out
Trying to load portnames from /home/chris/.config/jack/cards/Lexicon
Lambda.ports.out
Trying to load portnames from /etc/jack/cards/Lexicon Lambda.ss.ports.out
Trying to load portnames from /etc/jack/cards/Lexicon Lambda.ports.out
port created: Midi-Through:midi/playback_1
port created: Midi-Through:midi/capture_1
port created: Lexicon-Lambda:midi/playback_1
port created: Lexicon-Lambda:midi/capture_1

--------------------
in separate console loaded netmanager at this point.
output from netmanager load:
$ jack_load netmanager
netmanager is running.
client name = netmanager
--------------------

Starting Jack NetManager
Listening on '225.3.19.154:19000'

---------------------
slave machine jackd started at this point
This is still output from master side, just making a timing notation
---------------------

Takes physical 2 audio input(s) for slave
Takes physical 2 audio output(s) for slave
Takes physical 2 MIDI input(s) for slave
Takes physical 2 MIDI output(s) for slave
Sending parameters to oldchubb...
New NetMaster started
**************** Network parameters ****************
Name : oldchubb
Protocol revision : 8
MTU : 1500
Master name : chubb.cc-net
Slave name : oldchubb
ID : 1
Transport Sync : no
Send channels (audio - midi) : 2 - 2
Return channels (audio - midi) : 2 - 2
Sample rate : 48000 frames per second
Period size : 1024 frames per period
Network latency : 5 cycles
SampleEncoder : Float
Slave mode : async
****************************************************
Waiting for a slave...
Synching with latency = 0
Synching with latency = 1
Synching with latency = 2
Synching with latency = 3
Synching with latency = 4


Output from slave side:

$ /usr/bin/jackd -dnet
jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 20
self-connect-mode is "Don't restrict self connect requests"
NetDriver started in async mode without Master's transport sync.
Waiting for a master...
Initializing connection with chubb.cc-net...
**************** Network parameters ****************
Name : oldchubb
Protocol revision : 8
MTU : 1500
Master name : chubb.cc-net
Slave name : oldchubb
ID : 1
Transport Sync : no
Send channels (audio - midi) : 2 - 2
Return channels (audio - midi) : 2 - 2
Sample rate : 48000 frames per second
Period size : 1024 frames per period
Network latency : 5 cycles
SampleEncoder : Float
Slave mode : async
****************************************************


So it seems that contrary to the documentation netjack2 will create MIDI
channels by default, and at least on my system (where the interface does
support duplex mode) I can start netjack with no arguments and the default
behavior will successfully create a connection.

So I think at this point my guess is that the last output shown by the
original poster indicates some kind of mismatch between the jack ALSA
parameters and the allowed netjack parameters:
>> Can't set net buffer sizes : Invalid argument
>> SetParams error...
>> Can't init new NetMaster...

I thought maybe the buffer size was too large, but the original post was
using -p128 -n2, and at least on my machine I use -p1024 -n3 and that did
not have a problem.

But again, the last message from the original post did not show the
"configuring for..." output line from jackd, so either the jackd output
was truncated in the posting, removing information necessary to help
debug, or the ALSA backend did not actually start correctly.

--
Chris


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Chris Caudle
On Tue, May 2, 2017 8:11 am, Frodo Jedi wrote:
> Regarding your questions, I have never truncated the commands outputs.

OK, maybe the coreaudio backend just doesn't dump out as much information
as the ALSA backend.  Just looks odd because on an ALSA machine you
usually get confirmation of what format and sample rate was set (sometimes
the hardware does not support what you requested, and the ALSA backend
will adjust to find the closest setting allowed by the hardware).

> I did various trials, I report the outputs below.

I see some variations in output even when it looks like the jackd
parameters are the same.  I don't quite understand why that might happen.

Trial 1 and 2 show this:

> TRIAL 1 ----------------------------------------------------
> On the master (Mac computer)
> sh-3.2# jackd -P 70 -p96 -t 2000 -dcoreaudio  -s -r48000 -p128 -n2 -Cno
> -Pyes
...
> CoreAudio driver is running...
> Starting Jack NetManager
...
> Floating point exception: 8

So after netmanager is loaded jackd dies with an exception.  Searching
google references to that exception number indicates that it can be
triggered by divide by 0 errors for integer or floating point, it is not
exclusively a floating point error.

Trial 2 looks like the same startup parameters were used for jackd, but no
exception that time, but the netmanager crashes with bad socket
parameters:

> TRIAL 2 ----------------------------------------------------
> On the master (Mac computer)
> sh-3.2# jackd -P 70 -p96 -t 2000 -dcoreaudio  -s -r48000 -p128 -n2 -Cno
> -Pyes
...
> CoreAudio driver is running...
> Starting Jack NetManager
> Listening on '225.3.19.154:19000'
> Sending parameters to ...
> Can't set net buffer sizes : Invalid argument
> SetParams error...

I don't see anything on the jackd command line to explain why they failed
in two different ways.
I think someone with more experience with jackd on Mac will need to chime in.

I don't think you need to spend any time even starting jack on the odroid
yet.

> TRIAL 1 ----------------------------------------------------
> On the master (Mac computer)
...
> Floating point exception: 8

> TRIAL 2 ----------------------------------------------------
> On the master (Mac computer)
...
> SetParams error...
> Can't init new NetMaster...

> TRIAL 3----------------------------------------------------
> On the master (Mac computer)
...
> Sending parameters to ...
> Can't set net buffer sizes : Invalid argument
> SetParams error...
> Can't init new NetMaster...

> TRIAL 4 ----------------------------------------------------
> The result are the same of before.,...

> TRIAL 5 ----------------------------------------------------
> On the master (Mac computer)
> Floating point exception: 8

> TRIAL 6 ----------------------------------------------------
> Can't set net buffer sizes : Invalid argument
> SetParams error...
> Can't init new NetMaster...

You obviously are not going to be able to get the odroid to connect to the
Mac until jackd can start the netmanager without crashing on the mac.

Nothing obvious stands out as a cause, what is needed is more verbose
output from jackd to help determine the underlying cause of the crash in
netmanager.

I don't know how directly comparable the messages from a linux computer
are to a mac build, but I had some trouble getting multicast packets
passed between machines, you may see if omping is available for MacOS, it
will verify that multicast traffic is enabled between the two devices.  I
had to build it for my ARM device running debian, it was available from
the Fedora repositories for my workstation.  Building from source was
simple on my ARM device, I just copied the source over and ran make, no
configuration necessary.

This article indicates that multicast is not enabled by default on MacOS:
http://blogs.agilefaqs.com/2009/11/08/enabling-multicast-on-your-macos-unix/

That article is several years old, it may not be accurate for current
versions of MacOS, but definitely something to check.   On my linux
machines I got output messages to the effect that there seemed to be a
network problem, which is the point I went off and found omping and
figured out my firewall problems.  The messages on MacOS don't seem nearly
as helpful.

--
Chris Caudle


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Frodo Jedi
Dear Chris,
many thanks. Yes we would really need some feedback from jack developers at this point.

If someone can direct me towards some specific procedures to solve the problem I would be grateful. 

I have already verified that multicast is enabled on my mac (latest macbook pro October 2016 with OS X Sierra 10.12.4), 
both on wireless and ethernet (with adaptor...) ports.

Cheers



On Tue, May 2, 2017 at 5:28 PM, Chris Caudle <[hidden email]> wrote:
On Tue, May 2, 2017 8:11 am, Frodo Jedi wrote:
> Regarding your questions, I have never truncated the commands outputs.

OK, maybe the coreaudio backend just doesn't dump out as much information
as the ALSA backend.  Just looks odd because on an ALSA machine you
usually get confirmation of what format and sample rate was set (sometimes
the hardware does not support what you requested, and the ALSA backend
will adjust to find the closest setting allowed by the hardware).

> I did various trials, I report the outputs below.

I see some variations in output even when it looks like the jackd
parameters are the same.  I don't quite understand why that might happen.

Trial 1 and 2 show this:

> TRIAL 1 ----------------------------------------------------
> On the master (Mac computer)
> sh-3.2# jackd -P 70 -p96 -t 2000 -dcoreaudio  -s -r48000 -p128 -n2 -Cno
> -Pyes
...
> CoreAudio driver is running...
> Starting Jack NetManager
...
> Floating point exception: 8

So after netmanager is loaded jackd dies with an exception.  Searching
google references to that exception number indicates that it can be
triggered by divide by 0 errors for integer or floating point, it is not
exclusively a floating point error.

Trial 2 looks like the same startup parameters were used for jackd, but no
exception that time, but the netmanager crashes with bad socket
parameters:

> TRIAL 2 ----------------------------------------------------
> On the master (Mac computer)
> sh-3.2# jackd -P 70 -p96 -t 2000 -dcoreaudio  -s -r48000 -p128 -n2 -Cno
> -Pyes
...
> CoreAudio driver is running...
> Starting Jack NetManager
> Listening on '225.3.19.154:19000'
> Sending parameters to ...
> Can't set net buffer sizes : Invalid argument
> SetParams error...

I don't see anything on the jackd command line to explain why they failed
in two different ways.
I think someone with more experience with jackd on Mac will need to chime in.

I don't think you need to spend any time even starting jack on the odroid
yet.

> TRIAL 1 ----------------------------------------------------
> On the master (Mac computer)
...
> Floating point exception: 8

> TRIAL 2 ----------------------------------------------------
> On the master (Mac computer)
...
> SetParams error...
> Can't init new NetMaster...

> TRIAL 3----------------------------------------------------
> On the master (Mac computer)
...
> Sending parameters to ...
> Can't set net buffer sizes : Invalid argument
> SetParams error...
> Can't init new NetMaster...

> TRIAL 4 ----------------------------------------------------
> The result are the same of before.,...

> TRIAL 5 ----------------------------------------------------
> On the master (Mac computer)
> Floating point exception: 8

> TRIAL 6 ----------------------------------------------------
> Can't set net buffer sizes : Invalid argument
> SetParams error...
> Can't init new NetMaster...

You obviously are not going to be able to get the odroid to connect to the
Mac until jackd can start the netmanager without crashing on the mac.

Nothing obvious stands out as a cause, what is needed is more verbose
output from jackd to help determine the underlying cause of the crash in
netmanager.

I don't know how directly comparable the messages from a linux computer
are to a mac build, but I had some trouble getting multicast packets
passed between machines, you may see if omping is available for MacOS, it
will verify that multicast traffic is enabled between the two devices.  I
had to build it for my ARM device running debian, it was available from
the Fedora repositories for my workstation.  Building from source was
simple on my ARM device, I just copied the source over and ran make, no
configuration necessary.

This article indicates that multicast is not enabled by default on MacOS:
http://blogs.agilefaqs.com/2009/11/08/enabling-multicast-on-your-macos-unix/

That article is several years old, it may not be accurate for current
versions of MacOS, but definitely something to check.   On my linux
machines I got output messages to the effect that there seemed to be a
network problem, which is the point I went off and found omping and
figured out my firewall problems.  The messages on MacOS don't seem nearly
as helpful.

--
Chris Caudle




_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Chris Caudle
On Tue, May 2, 2017 10:40 am, Frodo Jedi wrote:
> I have already verified that multicast is enabled on my mac (latest
> macbook pro October 2016 with OS X Sierra 10.12.4),
> both on wireless and ethernet (with adaptor...) ports.

How is the default route determined if multicast is enabled on both adapters?
I am not experienced with multicast configuration yet, I was under the
impression that you need to define a default route for multicast traffic,
and that would not work well with multiple adapters enabled for multicast.
Maybe off topic if you have verified it is working.
--
Chris Caudle


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Frodo Jedi
Actually I have not said that I checked that multicasting is working, but that it is enabled on both machines... 

The results I get are the same either that I specify the default ip multicast address or not.

How could I verify that multicast is actually working? If it was not working then how the two machines could see each other?




On Tue, May 2, 2017 at 6:21 PM, Chris Caudle <[hidden email]> wrote:
On Tue, May 2, 2017 10:40 am, Frodo Jedi wrote:
> I have already verified that multicast is enabled on my mac (latest
> macbook pro October 2016 with OS X Sierra 10.12.4),
> both on wireless and ethernet (with adaptor...) ports.

How is the default route determined if multicast is enabled on both adapters?
I am not experienced with multicast configuration yet, I was under the
impression that you need to define a default route for multicast traffic,
and that would not work well with multiple adapters enabled for multicast.
Maybe off topic if you have verified it is working.
--
Chris Caudle




_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Chris Caudle
On Tue, May 2, 2017 6:40 pm, Frodo Jedi wrote:
> How could I verify that multicast is actually working?

This is the tool I used, open multicast ping:
https://github.com/troglobit/omping

It was easy to compile on an ARM board running debian, available in the
repositories for my Fedora machine.  I don't know how easy to get it
running on mac.  If you have gcc and gmake installed might be as easy as
downloading the source and running make, but I could not find any
reference online that implied MacOS was known to work.
I'm not sure what other tool might be available on MacOS, you would have
to find someone more knowledgeable about Mac network setup.

--
Chris Caudle


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Frodo Jedi
Thanks Chris, 
I will try it.

Hope that some jack developers could chime in the discussion too


Cheers


 

On Wed, May 3, 2017 at 1:53 AM, Chris Caudle <[hidden email]> wrote:
On Tue, May 2, 2017 6:40 pm, Frodo Jedi wrote:
> How could I verify that multicast is actually working?

This is the tool I used, open multicast ping:
https://github.com/troglobit/omping

It was easy to compile on an ARM board running debian, available in the
repositories for my Fedora machine.  I don't know how easy to get it
running on mac.  If you have gcc and gmake installed might be as easy as
downloading the source and running make, but I could not find any
reference online that implied MacOS was known to work.
I'm not sure what other tool might be available on MacOS, you would have
to find someone more knowledgeable about Mac network setup.

--
Chris Caudle




_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Chris Caudle
In reply to this post by Frodo Jedi
> How could I verify that multicast is actually working? If it was not
> working then how the two machines could see each other?

When I first attempted to connect two machines with netjack I found that
one machine could transmit and receive multicast, one machine could
transmit but not receive, so the status messages were confusing, e.g. one
machine would report that the connection was working, but then report
errors when it got no responses later.

I found these links which may be useful.  I don't have a mac, so I can't
say how useful.
This seems like the most likely to be useful, an implementation of
multicast ping similar to omping but for Mac:
http://bdunagan.com/2010/03/31/multicast-ping-on-a-mac/

Since you mentioned that your machine has two interfaces (I think you said
wired and wireless) you may want to turn off the wireless interface and
check with just the wired interface first.  On a unicast connection there
is a default route that your operating system uses to know where to send
packets with an address that is not known to be on the local network.
Usually an interface, and the address of a router.  For multicast the
operating system needs something similar, it needs to know which interface
to use when given a multicast packet to send.  I think with only one
interface enabled that should occur with no intervention, but with two
interfaces enabled you will probably have to configure the default route
to use for multicast addresses.

I think this link explains how to do that from a terminal.  There may be
some network configuration GUI program which can do the same thing, but I
don't know.
http://blogs.agilefaqs.com/2009/11/08/enabling-multicast-on-your-macos-unix/


--
Chris Caudle


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Failures in connecting mac OSX Sierra and an embedded board with linux via netjack2

Frodo Jedi
Hi Chris,
many thanks! I will have a look to your links and try your suggestion.

I am aware about the default route, indeed in my tests I first tried the wired connection while disabling the wireless interface.


Cheers

On Thu, May 4, 2017 at 11:49 PM, Chris Caudle <[hidden email]> wrote:
> How could I verify that multicast is actually working? If it was not
> working then how the two machines could see each other?

When I first attempted to connect two machines with netjack I found that
one machine could transmit and receive multicast, one machine could
transmit but not receive, so the status messages were confusing, e.g. one
machine would report that the connection was working, but then report
errors when it got no responses later.

I found these links which may be useful.  I don't have a mac, so I can't
say how useful.
This seems like the most likely to be useful, an implementation of
multicast ping similar to omping but for Mac:
http://bdunagan.com/2010/03/31/multicast-ping-on-a-mac/

Since you mentioned that your machine has two interfaces (I think you said
wired and wireless) you may want to turn off the wireless interface and
check with just the wired interface first.  On a unicast connection there
is a default route that your operating system uses to know where to send
packets with an address that is not known to be on the local network.
Usually an interface, and the address of a router.  For multicast the
operating system needs something similar, it needs to know which interface
to use when given a multicast packet to send.  I think with only one
interface enabled that should occur with no intervention, but with two
interfaces enabled you will probably have to configure the default route
to use for multicast addresses.

I think this link explains how to do that from a terminal.  There may be
some network configuration GUI program which can do the same thing, but I
don't know.
http://blogs.agilefaqs.com/2009/11/08/enabling-multicast-on-your-macos-unix/


--
Chris Caudle




_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org