Avnu / OpenAvnu

OpenAvnu - an Avnu sponsored repository for Time Sensitive Network (TSN and AVB) technology
468 stars 289 forks source link

avnu-pipeline not working- Failed to initialize SRP #855

Closed shirArg closed 5 years ago

shirArg commented 5 years ago

Hi, I am using two linux machines with I210 nics (one on each one). The compuiters are connected using an Ethernet cable, without a switch in the middle(!).

I was able to run simple_talker and simple_listener, and they worked fine. Now, I'm trying to use the avtp_pipeline. I start the daemons using run_daemons.sh, and it seems that it works ok (I can see the processes in ps, for example). I also started the igb_avb mode using lib/igb_avb/kmod/startup.sh.

I compiled the avtp_pipeline without 'AVB_FEATURE_ENDPOINT=0' (meaning it equals 1).

When I run the run_avtp_pipeline.sh I get:

argu@SHIR2:~/git/OpenAvnu$ sudo ./run_avtp_pipeline.sh enp4s0 Starting AVTP Pipeline on enp4s0 ~/git/OpenAvnu ~/git/OpenAvnu ./run_avtp_pipeline.sh: line 20: ./openavb_avdecc: No such file or directory ~/git/OpenAvnu argu@SHIR2:~/git/OpenAvnu$ [1545662387:160489118 OPENAVB osalTime] INFO: local_time = 1545662384217555805 [1545662387:160498483 OPENAVB osalTime] INFO: ml_phoffset = 217191007, ls_phoffset = 2912851934 [1545662387:160507080 OPENAVB osalTime] INFO: ml_freqffset = 0.999997, ls_freqoffset = 0.999968 [1545662387:160509154 OPENAVB Endpoint] INFO: AVTP Pipeline: 0.1.3 (Development) [1545662387:162477606 OPENAVB Raw Socket] ERROR: Checking interface; ioctl(SIOCGIFFLAGS) failed: No such device [1545662387:162494267 OPENAVB Endpoint] ERROR: Invalid value: section=network, name=ifname, value=eth0 [1545662387:162513102 OPENAVB Endpoint] ERROR: Error in INI file: endpoint.ini, line 4 [1545662387:162573351 OPENAVB Talker / Listener] INFO: AVTP Pipeline: 0.1.3 (Development) [1545662387:162661099 OPENAVB Raw Socket] INFO: Using pcap implementation [1545662387:263136855 OPENAVB Endpoint] ERROR: Failed to initialize SRP [1545662387:343379350 OPENAVB Talker / Listener] INFO: Looking up symbol for function: openavbMapUncmpAudioInitialize [1545662387:343395175 OPENAVB Talker / Listener] INFO: Looking up symbol for function: openavbIntfAlsaInitialize [1545662387:343404718 OPENAVB 61883-6 Mapping] INFO: Rate:48000 [1545662387:343405942 OPENAVB 61883-6 Mapping] INFO: Bits:24 [1545662387:343406590 OPENAVB 61883-6 Mapping] INFO: Channels:8 [1545662387:343407311 OPENAVB 61883-6 Mapping] INFO: Packet Interval:8000 [1545662387:343407987 OPENAVB 61883-6 Mapping] INFO: Frames per packet:6 [1545662387:343408631 OPENAVB 61883-6 Mapping] INFO: Packing Factor:1 [1545662387:343409199 OPENAVB 61883-6 Mapping] INFO: Frames per MediaQ Item:8 [1545662387:343409882 OPENAVB 61883-6 Mapping] INFO: Sample Size Bytes:4 [1545662387:343566344 OPENAVB Talker / Listener] INFO: Looking up symbol for function: openavbMapUncmpAudioInitialize [1545662387:343569782 OPENAVB Talker / Listener] INFO: Looking up symbol for function: openavbIntfAlsaInitialize [1545662387:343574456 OPENAVB 61883-6 Mapping] INFO: Rate:48000 [1545662387:343575579 OPENAVB 61883-6 Mapping] INFO: Bits:24 [1545662387:343576154 OPENAVB 61883-6 Mapping] INFO: Channels:8 [1545662387:343576727 OPENAVB 61883-6 Mapping] INFO: Packet Interval:8000 [1545662387:343577291 OPENAVB 61883-6 Mapping] INFO: Frames per packet:6 [1545662387:343577920 OPENAVB 61883-6 Mapping] INFO: Packing Factor:256 [1545662387:343578443 OPENAVB 61883-6 Mapping] INFO: Frames per MediaQ Item:1536 [1545662387:343578970 OPENAVB 61883-6 Mapping] INFO: Sample Size Bytes:4 [1545662389:442629251 OPENAVB Endpoint MAAP] INFO: MAAP address range 38 acquired: 0x91e0f0004076-0x91e0f0004095 (Size 32) [1545662389:442730944 OPENAVB Endpoint] ERROR: Make sure that mrpd daemon is started. [1545662390:543417090 OPENAVB Endpoint] ERROR: Failed to initialize SRP [1545662392:637589776 OPENAVB Endpoint MAAP] INFO: MAAP address range 39 acquired: 0x91e0f000c3cf-0x91e0f000c3ee (Size 32) [1545662392:637690557 OPENAVB Endpoint] ERROR: Make sure that mrpd daemon is started. [1545662393:738218800 OPENAVB Endpoint] ERROR: Failed to initialize SRP

I was managed to remove the first error (eth0 not found) by manualy editing the .ini files in /build/bin (but I couldn't find a way to make it not built this way...).

Regarding the second error- any idea why the SRP failes? mrpd seems to be working fine...

I also tried to build this with AVB_FEATURE_ENDPOINT=0. I didn't get the errors, but no data seemed to be sent, which was weird.

(BTW- the "make avtp_pipeline_clean" seemed to delete the openavb_avdecc folder from the avtp_pipeline, and it is not rebuilt when I use "make avtp_pipeline" again )

So my questions are:

  1. Should I use AVB_FEATURE_ENDPOINT=0 or not? If yes- why? Did that cause the problem?
  2. Is there a way to edit the default eth0 in the .ini files without editing each one manually?
  3. Any idea what happened to openavb_avdecc?
  4. Is it ok to use this system without a switch?
  5. Any more tips how to make it work? :)

    Thanks!

JXter commented 5 years ago

You need to change the interface name in endpoint.ini file to the one you are using, if you want to use endpoint. Setting AVB_FEATURE_ENDPOINT flag will enable the use of SRP, MAAP etc.

shirArg commented 5 years ago

Thanks! Regarding AVB_FEATURE_ENDPOINT - it is 1 by default, and I get all those errors. Should I turn it to 0? (tried it, didn't seem to work)

JXter commented 5 years ago

If you are connecting talker and listener directly (without switch in between), you can go with AVB_FEATURE_ENDPOINT=0 configuration. In this configuration, you need to set the configuration parameters in ini files correctly in both talker and listener. Without endpoint, you will not be able to communicate events on stream between talker and listener.

In case of AVB_FEATURE_ENDPOINT=1, your interface name in endpoint.ini doesn't match with the interface you are using, because of which you are getting those errors.

shirArg commented 5 years ago

OK, I checked it- I already changed the interface name in endpoint.ini file, but (I think) it is changed every time I rebuild the project, I asked if there was any way to change it constantly.

What does AVB_FEATURE_ENDPOINT stands for? what does it decide?

Thanks

shirArg commented 5 years ago

Update- it did work with a switch :) Thanks

pinealservo commented 5 years ago

AVB_FEATURE_ENDPOINT enables a chunk of functionality to manage other protocols aside from AVTP. Building without it is useful for non-standard uses of the streaming protocols for testing purposes or when you are using other tools to manage them, but it's required for full functionality.

The build process will overwrite a bunch of the ini files in the build directory, but you can always copy the ones you're using to an install directory and run from there so you don't have to re-edit them all the time.

shirArg commented 5 years ago

Thanks Everyone!

(this can be closed now)

chuanqima commented 5 years ago

Hi shirArg, I'd like to ask you how you solved this problem. Does the avtp_pipe you compiled work with endpoint files? Now I have a problem, which should be the same as yours, but I have no clue. I hope to get your help, and I am very grateful. Screenshot from 2019-07-08 11-45-45

shirArg commented 5 years ago

Hi chuanqima- I'm sorry but I can't remember anything I did besides what is written in this thread. I think the solution really was to use an AVB enabled switch (I used Extreme Summit X430-8p). Sorry I can't give any further help...

chuanqima commented 5 years ago

hi,shirArg,Thank you for your reply. My current situation is that two PCs are directly connected to the environment and I have not used the AVB enabled switch. I solved this problem now, I have some configuration in my endpoint.ini file, and I am running commands on two PCs now,I can receive the avb protocol at the listener , but I am confused. There is no sound. Can you give me a direction to try? Thank you. this is on my talker side: Screenshot from 2019-07-08 16-07-43 this is on my listener side : q@Q:~/Work/TimeStamp_OpenAvnu/lib/avtp_pipeline/build/bin$ sudo ./openavb_harness -I enp4s0 -a 6c:b3:11:52:30:53 alsa_listener.ini,sr_class=A,max_transit_usec=2000,map_nv_sparse_mode=0,intf_nv_audio_endian=big,report_seconds=0q Opening: alsa_listener.ini,sr_class=A,max_transit_usec=2000,map_nv_sparse_mode=0,intf_nv_audio_endian=big,report_seconds=0q,stream_addr=6c:b3:11:52:30:53,ifname=enp4s0 Configuring: alsa_listener.ini,sr_class=A,max_transit_usec=2000,map_nv_sparse_mode=0,intf_nv_audio_endian=big,report_seconds=0q,stream_addr=6c:b3:11:52:30:53,ifname=enp4s0 Starting: alsa_listener.ini,sr_class=A,max_transit_usec=2000,map_nv_sparse_mode=0,intf_nv_audio_endian=big,report_seconds=0q,stream_addr=6c:b3:11:52:30:53,ifname=enp4s0 ALSA <-> PulseAudio PCM I/O Plugin Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : S16_BE subformat : STD channels : 2 rate : 44100 exact rate : 44100 (44100/1) msbits : 16 buffer_size : 22050 period_size : 4410 period_time : 100000 tstamp_mode : NONE tstamp_type : GETTIMEOFDAY period_step : 1 avail_min : 22050 period_event : 1 start_threshold : 8820 stop_threshold : 22050 silence_threshold: 0 silence_size : 0 boundary : 6206523236469964800 [1562571426:542537404 OPENAVB osalTime] INFO: local_time = 18756700912570 [1562571426:542541967 OPENAVB osalTime] INFO: ml_phoffset = 81507860637, ls_phoffset = 1562552669716564031 [1562571426:542548590 OPENAVB osalTime] INFO: ml_freqffset = 0.999994, ls_freqoffset = 1.000043 [1562571426:542550000 OPENAVB Endpoint] INFO: AVTP Pipeline: 0.1.3 (Development) [1562571426:542614211 OPENAVB Talker / Listener] INFO: AVTP Pipeline: 0.1.3 (Development) [1562571426:542661940 OPENAVB Talker / Listener] ERROR: Invalid value: name=report_seconds, value=0q [1562571426:542672384 OPENAVB Talker / Listener] INFO: Looking up symbol for function: openavbMapUncmpAudioInitialize [1562571426:542676886 OPENAVB Talker / Listener] INFO: Looking up symbol for function: openavbIntfAlsaInitialize [1562571426:542682553 OPENAVB 61883-6 Mapping] INFO: Rate:44100 [1562571426:542683222 OPENAVB 61883-6 Mapping] INFO: Bits:16 [1562571426:542683849 OPENAVB 61883-6 Mapping] INFO: Channels:2 [1562571426:542684442 OPENAVB 61883-6 Mapping] INFO: Packet Interval:7350 [1562571426:542685070 OPENAVB 61883-6 Mapping] INFO: Frames per packet:6 [1562571426:542685661 OPENAVB 61883-6 Mapping] INFO: Packing Factor:0 [1562571426:542686246 OPENAVB 61883-6 Mapping] INFO: Frames per MediaQ Item:8 [1562571426:542686827 OPENAVB 61883-6 Mapping] INFO: Sample Size Bytes:4 [1562571426:542691557 OPENAVB Endpoint] WARNING:
[1562571426:542693535 OPENAVB Endpoint] WARNING: Configuration 'preconfigured = 1' is set. [1562571426:542694386 OPENAVB Endpoint] WARNING: SRP is disabled. Streams MUST be configured manually [1562571426:542695006 OPENAVB Endpoint] WARNING: on each and every device in the network, without exception. [1562571426:542695529 OPENAVB Endpoint] WARNING: AN AVB NETWORK WILL NOT FUNCTION AS EXPECTED UNLESS ALL [1562571426:542696051 OPENAVB Endpoint] WARNING: STREAMS ARE PROPERLY CONFIGURED ON ALL NETWORK DEVICES. [1562571426:542696576 OPENAVB Endpoint] WARNING:
[1562571426:542835808 OPENAVB Listener] INFO: Attach 6c:b3:11:52:30:53/1 [1562571426:542843597 OPENAVB Endpoint] INFO: SRP listener callback uid=1: tlkrDecl=1 [1562571426:542845623 OPENAVB Endpoint] INFO: Statically Configured Streams: [1562571426:542846299 OPENAVB Endpoint] INFO: | SR | Destination | ----Max Frame(s)--- | [1562571426:542847010 OPENAVB Endpoint] INFO: Role | Stream Id | Class | Address | Size | Per Interval | [1562571426:542848208 OPENAVB Endpoint] INFO: Listener | 6c:b3:11:52:30:53 - 1 | - | --:--:--:--:--:-- | -- | -- | [1562571426:543042389 OPENAVB Endpoint Shaper] INFO: Shaper daemon available [1562571426:543910582 OPENAVB Listener] INFO: Endpoint Configuration requires manual stream configuration on listener [1562571426:543912200 OPENAVB Listener] INFO: Listener configured dest_addr is 91:e0:f0:00:5e:06 [1562571426:543912996 OPENAVB Listener] INFO: Listener configured max_interval_frames = 1, max_frame_size = 1500 [1562571426:543913898 OPENAVB Listener] INFO: Starting stream: 6c:b3:11:52:30:53/1 [1562571426:543915561 OPENAVB Endpoint] INFO: Statically Configured Streams: [1562571426:543917633 OPENAVB Endpoint] INFO: | SR | Destination | ----Max Frame(s)--- | [1562571426:543918409 OPENAVB Endpoint] INFO: Role | Stream Id | Class | Address | Size | Per Interval | [1562571426:543919704 OPENAVB Endpoint] INFO: Listener | 6c:b3:11:52:30:53 - 1 | - | --:--:--:--:--:-- | -- | -- | [1562571426:556130228 OPENAVB Raw Socket] INFO: Using pcap implementation [1562571428:689341889 OPENAVB Endpoint MAAP] INFO: MAAP address range 16 acquired: 0x91e0f0005e06-0x91e0f0005e25 (Size 32) Screenshot from 2019-07-08 16-11-15

Sorry, a little messy..I just want to get a little help.

chuanqima commented 5 years ago

If you are connecting talker and listener directly (without switch in between), you can go with AVB_FEATURE_ENDPOINT=0 configuration. In this configuration, you need to set the configuration parameters in ini files correctly in both talker and listener. Without endpoint, you will not be able to communicate events on stream between talker and listener.

In case of AVB_FEATURE_ENDPOINT=1, your interface name in endpoint.ini doesn't match with the interface you are using, because of which you are getting those errors. Hi,JXter My test environment is directly connected to two PCs using I210 network card. When compiling, use AVB_FEATURE_ENDPOINT=0, and then implement the 61883-6 example provided in the README.md file in avtp_pipeline under the lib folder. It is completely ok. Play a wav audio file on the talker side and listen on the listener side. But when I try to use AVB_FEATURE_ENDPOINT=1 (modify the interface name in the relevant .ini file), I can't achieve the desired effect when running the example of 61883-6. Why is this? (I wonder if I can modify the file configuration to achieve the purpose of this example?) Any help from you is very meaningful, thank you. look forward to your reply.