MATLAB Answers

Error using R2019b version of the MATLAB

110 views (last 30 days)
jarul
jarul on 4 Oct 2019
Edited: Ben Cunningham on 3 Dec 2019
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.

  0 Comments

Sign in to comment.

Answers (6)

Ben Cunningham
Ben Cunningham on 7 Oct 2019
Edited: Ben Cunningham on 3 Dec 2019
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

Show 2 older comments
jarul
jarul on 14 Oct 2019
I have been trying to install the Linux version of the Xilinx Zynq Radio to run SDR software for single radio. I have spend several hours and still can not install the software version of the
R2019b version. After installing the communication tool box and Xilinx Radio library usually we see that the sign indicating the libraries are installed.
With the version R2019b the sign never appears on the library for communication tool box as well as Xilinx Radio library. I still get the following error:
Can not download the following library:
Xilinx Zynq Linux binaries
I presume that this library can not be downloaded or it is not available, I am not sure.
Can MATLAB group check this out for me?
When I run the matlab code meant for Single Radio, the receive function originally written as
sdrReceiver(); has been changed to capture(sdrReceiver, startuptime, "seconds");
in R2019b. It never gets executed and the program aburptly stops.
Can you kindly check the problem for me?
I have spend lot of time and can not run the matlab successfully with version R2019b.
Hopefully someone can respond to my question and solve this.
I have ran previously and setup the radio successfully with the version R2019a.
I am having problem with the latest version of R2019b.
Please do look into and solve this problem. I do appreciate. Thanks
Ben Cunningham
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
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

Sign in to comment.


jarul
jarul on 22 Oct 2019
To answer the above query:
I am using Ubuntu 18.04
The SDR hardware is Z706 and AD9361.
The libiio I am using the same since last year. My SDR worked perfectly with R2019a version.
I only deleted the old version and installed R2019b.
The library calls for transmitting and receiving has been changed since R2019b version.
They are not functioning well.
Try to figure out the error: Error using matlabshared.internal.ssh2client
The whole error is mentioned above.
The main problem is R2019b does not show that the SDR library is installed even after installing.
LTE transmit and receiver for zynq SDR is not working correctly.
Besides, the transmit and receive function does not work correctly.
Can not run any related code for SDR which worked perfectly for R2019a version.
Kindly check again. I have been reporting to Mathworks. But since sept 2019, the problem is not fixed.
Kindly check and please do help me. I am willing to respond to your query.

  0 Comments

Sign in to comment.


Ben Cunningham
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

jarul
jarul on 3 Dec 2019
As you mentioned, I have tried the following code:
This is done with the SD card image created by 23 May 2019 release (2018_R2)
dev = sdrdev('AD936x');
testConnection(dev,'192.168.3.6');
My host machine is on IP 192.168.3.6
My radio is on IP 192.168.3.2
After testing the above matlab code, I get the following error:
## Pinging host IP address
## Pinging radio IP address
## Checking compatibility of software with hardware
Error using comm.zynqradioshared.dev.Base/testConnection
Error attempting to connect to address '192.168.3.2'.
Error connecting to SSH server at 192.168.3.2
This could be due to:
- an improperly specified device IP address
- an unsuccessful boot from SD card image
- an improperly configured network card on the host
- an incompatible network card on the host
- host port blocking or anti-virus software
See the documentation to configure the host and SDR device for proper communication.
If I use the SD card created with the Step 4 Write Firmware, I get the following error:
## Testing data path from Zynq board to host
Error using comm.zynqradioshared.dev.Base/testConnection
Failed to find device: cf-ad9361-dds-core-lpc.
Error in comm.zynqradio.dev.Base/testConnection (line 64)
status = testConnection@comm.zynqradioshared.dev.Base(obj,varargin{:});
Error in testad9361 (line 6)
testConnection(dev,'192.168.3.6');
The above error tells that, it can not find device cf-ad9361-dds-core-lpc
How should I solve this problem? ADVISE me please. Thanks
jarul
jarul on 3 Dec 2019
Hai Ben,
Finally I got the problem solved with AD9361 SDR software.
The functions "transmitRepeat(sdrTransmitter,eNodeBOutput);"
and the "rxWaveform = capture(sdrReceiver, captureTime, 'Seconds');"
works fine.
The answer to that is as follows:
Create an SD card image with the following steps as shown in the weblink:
Then insert that SD in the Linux machine.
Create the image file using the steps shown in the following weblink.
Select a Drive and Write Firmware
Combine both into the same SD card. Then use that SD card on the Radio (FPGA).
Now it works successfully. These steps are not clear in the mathworks website.
Thanks a million Ben for your constant support and guide.
Now I am able to run the matlab code successfully. Thanks
Ben Cunningham
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

Sign in to comment.


jarul
jarul on 25 Oct 2019
Just to respond to your answer:
Have been working on SDR AD9361 software quite sometime.
One host computer is setup Linux Ubuntu R2019a version of the matlab.
Two radios are as setup as follows:
Radio 1 using Z706 and AD9361.
Radio 2 using zedboard and AD9361.
Using the host machine with R2019a version, the old code of LTE transmit and receive works perfectly on a single Radio (1 or 2)
The old version of the “LTE transmit and receive for zynq SDR” code has the following functions for transmit and receive:
sdrTransmitter.transmitRepeat(eNodeBOutput);
The receiver is as follows:
[data,len,lostSamples] = sdrReceiver();
burstCaptures(:,:,frame) = data;
Using R2019a version works perfectly and the code for single Radio is fine.
Now, after introducing R2019b version, the code for Transmitter and receiver is as follows:
transmitRepeat(sdrTransmitter,eNodeBOutput);
The Receiver code is as follows:
rxWaveform = capture(sdrReceiver, captureTime, 'Seconds');
In another machine, R2019b version was installed to test the above function.
Every time I install a library, it does not show the symbol that the library is installed.
But in R2019b, after installing the libraries such as LTE toolbox and Xilinx zynq-based Radio, the symbol, install is not showing up on the library figures which was different from the pervious versions such as R2019a and so on.
I did the setup exactly as R2019a version for R2019b.
The R2019a version was updated to see if the above Transmit and receive works correctly.
After updating, the transmit function in the new version works correctly. Which means the radio is transmitting. However, when the following function, reaches executing stage, the code stop and the reason is that the function capture is not found.
Hence, R2019b version or updated R2019a version does not completely execute the LTE transmit and receive code using the radio. The problem is not setup the Radios.
The error when just I start the R2019b version is as follows:
Error using matlab.supportpackagemanagement.internal.getInstalledSupportPackagesInfo (line 47)
Java exception occurred:
java.lang.IllegalArgumentException
at java.util.Date.parse(Date.java:617)
at java.util.Date.<init>(Date.java:274)
I never got these errors in the previous version of Matlab such as R2019a or before versions.
Now, when the LTE transmit and receive code is run, 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
Could you help me trace the above two errors related to Matlab shared library errors?
Thank you very much for your help.

  1 Comment

Ben Cunningham
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.

Sign in to comment.


jarul
jarul on 26 Oct 2019
Thanks for your response.
My host machine is setup in 192.168.3.1
My radio is setup in 192.168.3.14
I can ping 192.168.3.14 and get correct response from my host machine.
I can also do ssh to the radio from the host machine. No problem.
I want to know why do I get the following error when I just start the Matlab R2019b?
_____________________________________________________________________________
Error using matlab.supportpackagemanagement.internal.getInstalledSupportPackagesInfo (line 47)
Java exception occurred:
java.lang.IllegalArgumentException
at java.util.Date.parse(Date.java:617)
at java.util.Date.<init>(Date.java:274)
_______________________________________________________________________________
When I run the simple code for capture which is as follows:
________________________________________________________________________________
stationCenterFrequency = 95e6;
deviceName = 'AD936x';
info(deviceName)
rx = sdrrx(deviceName,'IPAddress','192.168.3.14','BasebandSampleRate',528e3,...
'CenterFrequency',stationCenterFrequency,'OutputDataType','Double');
capture(rx,5,'Seconds','Filename','FMRecording.bb');
release(rx);
%%%%Demodulate FM Recording
bbr = comm.BasebandFileReader('FMRecording.bb');
bbr.SamplesPerFrame = 4400;
fmbDemod = comm.FMBroadcastDemodulator( ...
'AudioSampleRate', 48e3, ...
'SampleRate',bbr.Metadata.BasebandSampleRate,'PlaySound',true);
while ~isDone(bbr)
fmbDemod(bbr());
end
______________________________________________________________________________________
Why do I get the following error? (It mentions, matlabshared.internal.ssh2client), When I click the matlabshared.internal.ssh2client, it is trying to open an empty ssh2clinet.m file. It is not present among the library.
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.rx/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.rx_control/setupImpl
Error in comm.libiio.AD9361.rx/setupImpl
Error in comm.zynqradioshared.rx/setupImpl
Error in comm.libiio.AD9361.rx/capture
Error in capture1 (line 6)
capture(rx,5,'Seconds','Filename','FMRecording.bb');
Thanks for your effort in trying to help with this problem

  1 Comment

Ben Cunningham
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?

Sign in to comment.


jarul
jarul on 1 Nov 2019
This morning I reinstalled R2019b ones again deleting the previous install of R2019b.
I just ran the simple code to test the caputer function that has been used on many SDR codes.
The code is as follows:
stationCenterFrequency = 95e6;
deviceName = 'AD936x';
info(deviceName)
rx = sdrrx(deviceName,'IPAddress','192.168.3.14','BasebandSampleRate',528e3,...
'CenterFrequency',stationCenterFrequency,'OutputDataType','Double');
capture(rx,5,'Seconds','Filename','FMRecording.bb');
release(rx);
%%%%Demodulate FM Recording
bbr = comm.BasebandFileReader('FMRecording.bb');
bbr.SamplesPerFrame = 4400;
fmbDemod = comm.FMBroadcastDemodulator( ...
'AudioSampleRate', 48e3, ...
'SampleRate',bbr.Metadata.BasebandSampleRate,'PlaySound',true);
while ~isDone(bbr)
fmbDemod(bbr());
end
I still get the following error as I mentioned previously:
Error using matlabshared.internal.ssh2client
Error connecting to SSH server at 192.168.3.14
Why do I kept getting matlabshared.internal.ssh2client error?
It has something to do with matlabshared library.
can you figure it out for me?
As you mentioned try zynq, I have tried on the matlab R2019b.
I get the following error:
Error using codertarget.zynq.internal.LinuxShell/setupZynqHardware (line 531)
Could not connect to the hardware over Serial Port.
Check that USB cable is plugged into 'USB-to-UART' port of the hardware and the power switch is
turned on.
If this error persists, switch off the hardware, wait for 10 seconds, switch on the hardware
and then repeat this step.
Thanks for your help.

  0 Comments

Sign in to comment.

Sign in to answer this question.

Tags


Translated by