Can not connect raspberry pi 4 to matlab
조회 수: 36 (최근 30일)
이전 댓글 표시
I have a raspberry pi 4 model B 1GB RAM that I am trying to connect to matlab R2020a for processor in the loop simulation.
I downloaded the matlab support package for raspberry pi and followed the instructions multiple times carefully, but every time it fails to discover raspberry pi hardware and doesn't give any error messages except "could not detect raspberry pi hardware in allotted time". Even the "test connection" button fails.
I tried different network connections and different power supply and different SD card and redownloaded the raspbian image to make sure it is not corrupted, but always failed.
note: I was using raspbian image R20.1.0 as suggested by the support package instructions.
Any help would be appreciated.
댓글 수: 4
Prasanth Sunkara
2020년 5월 8일
Thank you for replying soon with the debugging information.
Here are my suggestions.
1) Good to know that the raspberry pi booted normally with MathWorks image when you connected a monitor. How is raspberry pi connected to the network at your home? Is the pi connected to your home wifi? Or did you do you use a USB to ethernet cable and connected the pi to your pc? Also I am curious to see what "Network setting" you have choosen in the setup wizard.
2) I see you are calling raspi obj as below:
r= raspi(raspberrypi-sfsdfsd,pi,raspberry); % this is incorrect way
% those values must be of character array type. Try the below instead.
r=raspi('your raspberrypi host name','pi','raspberry'); % correct way
Also, ensure that you pi is in the same network as your PC.
Check out the link below as well.
Thanks,
Prasanth
답변 (6개)
sihan du
2020년 5월 24일
Hello Mustafa
I have the same question with you,and I don't know how to solve it.Any help would be appreciated.Thank you.
댓글 수: 2
sihan du
2020년 5월 26일
I 'm sorry to reply to you in a few days.I've tried every one of these four methods in the past few days,but each failed in the end. At the end of each attempt,the hara ware could not be connected. My friend and I made the same attempt. My friend succeeded, but I failed. Maybe I should change a new computer. Thank you very muchufor your help. Ifi can solve this problem, I wil discuss my solution with you.Thank you again for your help.
Chew Wen Da
2021년 5월 31일
편집: Chew Wen Da
2021년 5월 31일
I was having the same issue too while using version R2020a. After updating the version to R2021a, I can finally reach my RPI. By the way, the firmware also updated to version (mathworks_raspbian_DL_R21.1.0), previously in R2020a is (mathworks_raspbian_DL_R20.1.0). These are from the download link given in the support window.This post helped me a lot, thanks!
Unfortunately after the IP is detected, my laptop just cannot establish the connection to the board and keep showing either these 2 lines of error. Furthermore, its taking 3 to 4 mins to show too. Please help!
Thanks in advance.
댓글 수: 1
Chew Wen Da
2021년 6월 3일
Hi, to update on this matter, the problem has been resolved! I tried to use MATLAB online to connect to my RPI and I follow through the process step by step including reinstallation of the firmware (you can follow the link below). In the end I get to connect and realized that my RPI model is not the same as written on my RPI 4B board, it was a RPI 2B instead. After this, I tried to make connection again with MATLAB R2021a and it works fine!
After all, I think the issue can be resolve by installing the MATLAB firmware from the terminal. You can access to your RPI interface using VNC Viewer. Just input the IP address, ID and password.
Connect to Raspberry Pi Hardware Board in MATLAB Online
https://www.mathworks.com/help/supportpkg/raspberrypiio/ug/connect-to-raspberry-pi-hardware-board-in-matlab-online.html
Nicholas Minnie
2021년 11월 1일
Hi, I had the same issue. I was able to resolve it by using the raspberry pi imager to write the original Raspbian OS to the SD card and using the advanced setting to enable headless setup and configure the network settings. Then using the hardware setup on MATLAB I was able to select "Customize the existing Raspbian OS on my hardware" and the Test connection was sucessful. Just ensure that you know the IP adress of both your Raspberry Pi and Network.
Hope this helps.
댓글 수: 0
位默
2023년 2월 11일
Hi dear, I need you to help me, I have encountered the same problem as your right, I can't find the package for Raspberry Pi 4 Model B in MATLAB,I used a Raspberry Pi 3 Model B+ but it fails:
Could not detect the Raspberry Pi hardware in allotted time. Try using "Test Connection" button.
Any help would be appreciated.
댓글 수: 0
sameer rafee
2023년 2월 11일
Hi dear, I need you to help me, I have encountered the same problem as your right, I can't find the package for Raspberry Pi 4 Model B in MATLAB,I used a Raspberry Pi 3 Model B+ but it fails:
Could not detect the Raspberry Pi hardware in allotted time. Try using "Test Connection" button.
Any help would be appreciated.
댓글 수: 0
sameer rafee
2023년 2월 11일
Hi dear, I need you to help me, I have encountered the same problem as your right, I can't find the package for Raspberry Pi 4 Model B in MATLAB,I used a Raspberry Pi 3 Model B+ but it fails:
Could not detect the Raspberry Pi hardware in allotted time. Try using "Test Connection" button.
Any help would be appreciated.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!