Avnu / OpenAvnu

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

talker<-->switch<-->listener does not work!! #846

Closed zhengwei215 closed 5 years ago

zhengwei215 commented 6 years ago

I try to use the no endpoint (AVB_FEATURE_ENDPOINT ?= 0) to test on my avb switch, but the listener can not receive the audio frame. is there anyone can tell me the reason? Talker <--> Listener is OK,the listener can play the audio stream. do I have to make AVB_FEATURE_ENDPOINT ?= 1? to use the SRP?

tengandreaxu commented 6 years ago
  1. Is the switch AVB compliant?
  2. For the AVB_FEATURE_ENDPOINT take a look here https://github.com/AVnu/OpenAvnu/issues/798#issuecomment-397960608. But I don't think that is the problem.
zhengwei215 commented 6 years ago

hello TengXu94

thanks for your reply!!

the switch is SJA1105T. I have another question, is the mrpd daemon work normally? when I debug the openavb_host with AVB_FEATURE_ENDPOINT ?= 1 , I got the below log: [1534402787:776985486 OPENAVB Endpoint] ERROR: Failed to initialize SRP [1534402787:777007528 OPENAVB Endpoint] ERROR: Make sure that mrpd daemon is started.

I think the reason is that the MRP attributes is null, how can I make the mrpd daemon work?

thanks a lot!!

tengandreaxu commented 6 years ago

I personally don't know the switch, but from a first look should be AVB capable. How are you running the daemons?

zhengwei215 commented 6 years ago

I just compile and run the daemon of mrpd. I checked the source code, the mrpd need to received the S+? ,S++ etc. but there is not the process to send the S++ or S+? in the openavb source code. am I right?

Did you test the mrpd before? would you please tell me the methods to make the daemon mrpd work?

I personally don't know the switch, but from a first look should be AVB capable. How are you running the daemons?

pinealservo commented 6 years ago

Have you looked at the .sh files at the top level of the repository? They were tested in a number of configurations to successfully start a talker and listener across an AVB-capable switch. Also, have you looked at the readme file in the avtp_pipeline directory? https://github.com/AVnu/OpenAvnu/tree/master/lib/avtp_pipeline

You will need to use AVB_FEATURE_ENDPOINT=1 to use SRP. When you include this option, the Linux-specific endpoint integration for SRP (found here: https://github.com/AVnu/OpenAvnu/blob/master/lib/avtp_pipeline/platform/Linux/endpoint/openavb_endpoint_osal_srp.c) should talk to the MRP daemon, if you've launched it correctly. The code in that file should call into https://github.com/AVnu/OpenAvnu/blob/master/lib/avtp_pipeline/openavb_common/mrp_client.c which forms and sends the correct command strings to the MRP daemon (e.g. S+?, S++, etc.). Hopefully these pointers will help you figure out where your setup is going wrong.

The avtp_pipeline code is more of a framework for building an endpoint than a complete solution, although we tried to supply a complete working example. Hardware/software configurations and desired options in real endpoints vary too much to make something that's guaranteed to work out of the box, though it should be close.

tengandreaxu commented 6 years ago

I run all the mrpd via the .sh file in the top repository "run_daemon.sh". You can also check the correctness of mrpd daemons by running "mrpValidate" in monitor mode. I would also suggest to check the switch configuration, in my case gPTP and MRP protocols were disabled by default in Netgear Switch.

zhengwei215 commented 5 years ago

Thank you!! I set the talker and listener both to GM, and the communication is OK. (I use the AVB_FEATURE_ENDPOINT= 0) In my understanding, there should be only one GM in a local network, am I right?

pinealservo commented 5 years ago

If you force both talker and listener to be GM, they are not actually synchronizing time. If you build with AVB_FEATURE_ENDPOINT=0, there's no SRP negotiation for reservations. So you're not actually doing AVB right now, you're just using AVTP to stream media over ethernet.

You're correct that in PTP, there's only one GM per PTP domain. Figure out how to get PTP working first. You probably need to figure out how to get AVB diagnostic information out of your switch and examine PTP traffic via Wireshark to see what's going wrong.

Once you can get PTP endpoints to negotiate a GM correctly and get time synchronized, then fire up mrpd and see if you can get a reservation established through your switch. Again, you will probably need to look at your switch's diagnostic information and packet dumps.

Once those things are working, then try the avtp_pipeline code again with AVB_FEATURE_ENDPOINT=1 and the included scripts.

zhengwei215 commented 5 years ago

Thank you so much for your explanation,and I also understood the doubt about SRP. Thanks for everyone.

chuanqima commented 5 years ago

hi,zhengwei215 I have a problem, similar to the one you have encountered. Can you solve this problem? Can you share it? My problem is: on two directly connected PCs (both I210 NICs), if I use AVB_FEATURE_ENDPOINT=0 to build avtp_pipeline, then I can use the command sudo ./openavb_harness -I enp1s0 wav_file_talker.ini, intf_nv_file_name=ringtone1 .wav plays music on one of my talkers, then transmits it to the listener through the avb network and listens to the sound on the listener. But all this seems to be impossible when I build avtp_pipeline with AVB_FEATURE_ENDPOINT=1. At this time, there are two cases:

1: I edit presured=1 under the [srp] option in the endpoint.ini file, comment it, run the command Screenshot from 2019-07-11 11-36-09 And through wiresharke, there is no voice packet delivery. Screenshot from 2019-07-11 11-39-54

  1. I edit preconfigured=1 under the [srp] option in the endpoint.ini file, release its comments, run the command Screenshot from 2019-07-11 11-51-36 Through the wireshark can see the audio packets transmitted through the avb network Screenshot from 2019-07-11 11-51-40

I am confused about the avtp_pipeline running related command in this endpoint.ini file and SRP and AVB_FEATURE_ENDPOINT=1 or 0, I hope I can get some help. Thank you very much