Error using R2019b version of the MATLAB
Show older comments
Just installed R2019b MATLAB.
SDR with AD9361 is attached to the Host machine.
The host machine's IP is set to 192.168.3.1
The radio is attached to 192.168.3.14.
Now I try to run the following matlab code:
"Transmit and Receive LTE MIMO Using Analog Devices AD9361/AD9364"
I get the following error:
Error using matlabshared.internal.ssh2client
Error connecting to SSH server at 192.168.3.14
Error in matlabshared.socutils.internal.ipcorereg.system
Error in matlabshared.socutils.internal.ipcorereg.IPCoreRegWrite/stepImpl
Error in comm.zynqradioshared.base/writeReg
Error in comm.zynqradioshared.base/initRegisters
Error in comm.zynqradioshared.tx/sdrDevPreInit
Error in comm.libiio.AD9361.base_control/configureChanBuffers
Error in comm.libiio.AD9361.base/configureChanBuffers
Error in matlabshared.libiio.base/setupImpl
Error in comm.libiio.AD9361.base_control/setupImpl
Error in comm.libiio.AD9361.base/setupImpl
Error in comm.libiio.AD9361.tx_control/setupImpl
Error in comm.libiio.AD9361.tx/setupImpl
Error in comm.zynqradioshared.tx/setupImpl
Error in comm.libiio.AD9361.tx/transmitRepeat
Error in finalMIMOad9361 (line 168)
transmitRepeat(sdrTransmitter,eNodeBOutput);
Can someone help me to solve this problem? I want to run two SDR connecting
and sending data on the air.
Answers (6)
Ben Cunningham
on 7 Oct 2019
Edited: Ben Cunningham
on 3 Dec 2019
0 votes
It looks like you are having trouble connecting to your radio. Can you verify that you can complete the Hardware Setup App or manually ping the device?
----------------
ANSWER:
I expect that what has happened in your case is that you had a corrupted SD card. To get it working you reformatted the SD card removing the issue. Then when you followed step 4 of the Manual Host-Radio Hardware Setup it worked correctly.
5 Comments
jarul
on 8 Oct 2019
Ben Cunningham
on 8 Oct 2019
Edited: Ben Cunningham
on 8 Oct 2019
I have not encountered any such issues with the 2019b release of the Xilinx Zynq-Based Radio Support Package.
As such it is likely to do with your setup. Please provide further specific details, including:
- OS MATLAB is running on
- The SDR Hardware being used
- Whether you are using the new Libiio or the Legacy mode
- If you have been through the Hardware Setup App successfully, including the final panel
- The code you are trying to run
- Exactly what happens when you run the code
- Anything else custom or otherwise relevant
jarul
on 14 Oct 2019
Ben Cunningham
on 14 Oct 2019
Hi Jarul,
This does not seem to be related to the question initially posed. To effectively answer your question we must try to restrict to a narrower scope.
Does this mean that the inital question is no longer blocking? What was your workaround?
There may have been a temporary third party download outage. I am not aware of any install issue on any OS at the moment.
You can still step the Rx system object exactly as you did in previous releases ie "sdrReceiver();".
Please reference the capture documentation for more information on the capture function. The basic syntax is "[data, metadata] = capture(sdrReceiver, captureLength, 'Seconds');"
I have no idea what code you are running so I'm afraid I cannot diagnose this further.
Cheers,
Ben
Ben Cunningham
on 22 Oct 2019
Hi Jarul,
I noticed you re-posted the same question again.
I'm happy to help but please provide the following details to help get us started.
- OS MATLAB is running on
- The SDR Hardware being used
- Whether you are using the new Libiio or the Legacy mode
- If you have been through the Hardware Setup App successfully, including the final panel
- The code you are trying to run
- Exactly what happens when you run the code
- Anything else custom or otherwise relevant
jarul
on 22 Oct 2019
0 votes
Ben Cunningham
on 23 Oct 2019
Edited: Ben Cunningham
on 23 Oct 2019
Thank you for getting back with the further details of your setup.
Please verify you can complete the steps outlined in the Manual Host-Radio Hardware Setup documentation page.
Completing this is important as the error you have been repeatedly posting seems to indicate that MATLAB is having trouble communicating to your radio. Completing the steps linked should set-up and verify that connection.
The changes to the transmit and receive/capture methods should not be the cause of the error.
Perhaps you could screenshot what you mean when you say that the SDR library is not showed as installed? Does the Xilinx Zynq-Based Radio HSP show in your Add-On Manager?
The 'LTE transmit and receiver for zynq SDR' will not work if 'the transmit and receive function does not work correctly' which will not work if MATLAB cannot connect to your radio. Please complete the linked steps and let me know if you can complete it successfully.
After completing successfully you could try some minimal code for example:
rx = sdrrx('AD936x')
capture(rx, 10, 'Samples')
27 Comments
Ben Cunningham
on 1 Nov 2019
Hi Jarul,
Please see this answer.
Run through the steps in the Manual Host-Radio Hardware Setup documentation page for your radio. Do not try changing the ip address from the default and disconnect any other radios. Complete all the steps which will include re-flashing your sd card.
Then, if you complete all the steps successfully, run the minimal code I provided you in the answer.
rx = sdrrx('AD936x')
capture(rx, 10, 'Samples')
jarul
on 4 Nov 2019
jarul
on 4 Nov 2019
Ben Cunningham
on 4 Nov 2019
Hi Jarul,
Please see this answer.
Run through the steps in the Manual Host-Radio Hardware Setup documentation page for your radio. Do not try changing the ip address from the default and disconnect any other radios. Complete all the steps which will include re-flashing your sd card.
Then, if you complete all the steps successfully, run the minimal code I provided you in the answer.
rx = sdrrx('AD936x')
capture(rx, 10, 'Samples')
Can you confirm you have followed the steps outlined?
jarul
on 5 Nov 2019
Ben Cunningham
on 5 Nov 2019
1)
>> The following communication tool box for linux can not be installed.
What do you mean by 'can not be installed'? After installation it should be listed in the Add-on manager with a small cog next to it.
2)
>> It can be setup for the Windows version. However, it is needed for the Linux version.
I have linked you to the Manual Host-Radio Hardware Setup documentation page which takes you through setup on Linux.
3)
>> The host machine is setup for 192.168.3.1 which can not be changed according to the setup files.
I have linked you to the Manual Host-Radio Hardware Setup documentation page which takes you through setup on Linux including the setting of the ipaddress.
4)
>> You can see from my above response that it connects to the radio ok.
Follow the steps in the Manual Host-Radio Hardware Setup documentation page to confirm and test the connection to your radio.
5)
>> However, the transmit and receive (capture in R2019b) function can not work until the above toolbox is installed.
That is correct, you cannot use functionality from a support package which is not installed. See (1).
jarul
on 8 Nov 2019
Ben Cunningham
on 11 Nov 2019
Hi Jarul,
Printing the properties of the system object does not verify connection to your radio. MATLAB will only try to connect when you attempt to use the IO. This is why I have been asking you to verify your setup and connection via the Manual Host-Radio Hardware Setup documentation page.
You can also connect to your radio by running setup on your receiver object, ie:
setup(rx)
However I would not expect any support package functionality to work without a complete successful installation.
It has been brought to my attention that there is currently some issues with certain support packages' interoperability. The Mathworks support team answer is here. If you need to get the Xilinx Zynq-based Radio support package installed you may try installing into a version of MATLAB without any other support packages.
All the best,
Ben
jarul
on 12 Nov 2019
Ben Cunningham
on 18 Nov 2019
A fix with the latest update solved the interoperability issue that arose last month. I am able to install and use the support package without any issue.
Please install and complete the steps outlined in the Manual Host-Radio Hardware Setup documentation page.
After completing the Manual Host-Radio Hardware Setup documentation page successfully you could try some minimal code for example:
rx = sdrrx('AD936x')
capture(rx, 10, 'Samples')
Let me know if that works.
Cheers,
Ben
jarul
on 19 Nov 2019
jarul
on 19 Nov 2019
Ben Cunningham
on 19 Nov 2019
The Embedded Coder Support Package for Xilinx Zynq Platform downloads from third partys and these links may get corrupted or broken for various reasons. I am glad you were able to install Xilinx Zynq-based radio now.
Ok, so just to be clear, you have been through the Manual Host-Radio Hardware Setup after your most recent install? Your problem may arise from an old or corrupted SD card image. The Manual Host-Radio Hardware Setup also includes a step that verifies MATLAB can connect to your radio. That may narrow down the problem.
Things to try:
- Complete the Manual Host-Radio Hardware Setup and tell me what happens during the test connection step?
- setup(rx)
- rx()
jarul
on 22 Nov 2019
jarul
on 22 Nov 2019
jarul
on 22 Nov 2019
Ben Cunningham
on 22 Nov 2019
When using the setup method are you initialising an AD936x system object?
e.g.
rx = sdrrx('AD936x')
setup(rx)
You do not require the Pluto radio HSP to do this.
When you went through the Manual Host-Radio Hardware Setup documentation page what happened during the test connection step?
jarul
on 25 Nov 2019
Ben Cunningham
on 25 Nov 2019
Edited: Ben Cunningham
on 25 Nov 2019
Hi Jarul,
The attached pdf shows a screenshot of the Hardware Setup Application for Embedded Coder Support package for Zynq. This is not the same as Communications Support Package for Xilinx Zynq-Based Radio.
Running Xilinx Zynq-Based Radio commands on a board set up for Embedded Coder Support Package for Zynq will not work as they are different things with different use-cases.
Please refer to the Manual Host-Radio Hardware Setup documentation page which details how to set up your radio for use with the Xilinx Zynq-Based Radio support package.
When you have set up your hardware correctly using the link I have provided you should not encounter any problems.
Cheers and all the best,
Ben
If you do encounter further problems with your setup you could contact technical support via a service request at https://uk.mathworks.com/support/contact_us.html.
jarul
on 26 Nov 2019
Ben Cunningham
on 26 Nov 2019
>> The communications Support Package for Xilinx Zynq-Based Radio does not have nay Manual Host Radio Hardware Setup.
Yes it does, follow the steps in https://uk.mathworks.com/help/supportpkg/xilinxzynqbasedradio/ug/manual-host-radio-hardware-setup.html
>> Even though it displays, Manual Host Radio Hardware Setup, but does not do any setup steps like the Embedded Coder Support Package for Zynq.
That is because you are on Linux. Please follow the steps in https://uk.mathworks.com/help/supportpkg/xilinxzynqbasedradio/ug/manual-host-radio-hardware-setup.html to set up your radio Hardware on Linux.
>> Finally, the Zynq radio setup does not work correctly. I am not sure if the Mathwork group is still trying to fix this problem or is it already fixed?
I think you might have misinterpreted what it was doing. Please note that you must follow the steps in the above documentation and not just run the application. Also, you cannot run the Embedded Coder Suppport Package for Zynq application as that is different.
>> Should I directly contact the technical support group or you can contact them and give me a response? Whatever is ok with me. Thanks for your response.
You will need to contact technical support yourself. If eligible, they can provide you access to further support.
jarul
on 2 Dec 2019
Ben Cunningham
on 2 Dec 2019
From the doc:
When calling testConnection, use the radio object that you created in Step 2. Set Up Support Package in MATLAB and the host IP address that you configured in Step 3. Configure Host Computer.
Hence if in step 3 you set the address to '192.168.3.6' then you should use that.
testConnection(dev,'192.168.3.6');
jarul
on 3 Dec 2019
Ben Cunningham
on 3 Dec 2019
Hi Jarul,
I'm glad you got it working!
You should not use the ADI image it will not work, you must use the Mathworks image as instructed in the Manual Host-Radio Hardware Setup.
I expect that what has happened in your case is that you had a corrupted SD card. As part of the workflow when you followed the ADI SD card image steps you probably reformatted it removing the issue. Then when you followed step 4 of the Manual Host-Radio Hardware Setup the Mathworks image was downloaded replacing the ADI image.
The steps should be clear in the Manual Host-Radio Hardware Setup however in your case your SD card needed reformatted. I will see if a note can be added to the documentation to suggest trying this as a troubleshooting step.
All the best,
Ben
jarul
on 25 Oct 2019
0 votes
1 Comment
Ben Cunningham
on 25 Oct 2019
Edited: Ben Cunningham
on 25 Oct 2019
Thank you for the further context.
The capture function is a 19b addition and therefore not present in 19a. Please reference 19a documentation and examples when using 19a to ensure compatibility. The 19b updates to the LTE transmit and receive example are not backwards compatible with 19a.
I am able to run the LTE transmit and receive example locally on my computer without any such issues.
As you have alluded to yourself I believe this is an install issue which is preventing you from connecting to your radios. Please go through the steps I linked you to in my previous response in your 19b install and verify this.
jarul
on 26 Oct 2019
0 votes
1 Comment
Ben Cunningham
on 31 Oct 2019
Hi Jarul,
It looks like you might have a corrupted install somewhere.
Are you using Embedded Coder and the Embedded Coder Zynq Support package?
You could see if the command
zynq
is able to connect to your hardware?
jarul
on 1 Nov 2019
Categories
Find more on Implement on Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!