Upload
others
View
16
Download
0
Embed Size (px)
Citation preview
Guide for Updating Firmware and Troubleshooting Connection Issues
This document provides detailed instructions for updating firmware and for troubleshooting for
connection issues with Raspberry Pi™ board. Updating firmware can be accomplished 1) as part of the
support package download and installation, or 2) separately by executing the “targetupdater” function
on the MATLAB® command line. The firmware update process is initiated with the following screen in
the Support Package Installer.
1. Update Firmware
Select “Raspberry Pi” and click “Next”.
2. Select a board
Select “Model B” and click “Next”.
Note: Model A version of the Raspberry Pi board is not supported at this time.
3. Get firmware
1. Choose “Download from Internet (recommended)” option.
2. Specify the “Download folder” location. For most uses, the default path is appropriate.
3. Click “Download”.
Troubleshooting common errors encountered at this step:
Selected option: Download from Internet (recommended)
No internet connection: Download process times out. You need to have an Internet
connection to download the firmware.
Temporary loss of Internet connection: Download process times out. Usually clicking on
“Download” button again will successfully resume the download process.
Download folder not writable: Change “Download folder” to a writable location.
Not enough disk space: Free up sufficient hard drive space. Firmware download is about
1.0 GB and uncompressed firmware is about 3.5 GB. So you need about 4.5 GB.
4. Configure board
Raspberry Pi will be connected to the host and MATLAB via Ethernet network, and will communicate
using TCP/IP protocol. The GUI shown above is used to set up the network connection between
Raspberry Pi and MATLAB.
The “Board name” parameter is a unique name assigned to your board. The default “Board name”
generated by the firmware update GUI will work just fine as long as it’s unique on your network (that is,
there is only one device with that name). Avoid generic names such as “raspberry” if you plan to add a
second Raspberry Pi board to your network in the future.
Typically, you will connect your Raspberry Pi board in one of the following ways:
1. Local area network as shown in Figure 1A, or home network as shown in Figure 1B
2. Peer-to-peer network as in Figure 2.
Ethernet
Ethernet
A) Local area network (LAN)
Modem / Router
B) Home network
Figure 1 Raspberry Pi is connected to an Ethernet network.
Ethernet
Figure 2 Raspberry Pi is connected to the host computer in a peer-to-peer network.
If your type of connection is as depicted by Figure 1A or Figure 1B, then choose “Automatically get IP
address” option for “IP Assignment”.
If your type of connection is as depicted by Figure 2, then choose “Manually enter IP address” for “IP
Assignment”.
Leave the “IP address”, “Network mask” and the “Default gateway” parameters at their
default values. Click “Next”.
[Note: We will configure your host computer’s static IP address later when the Raspberry Pi
board boots.]
5. Select a drive
Select drive letter. Click “Next”.
Troubleshooting common errors encountered at this step:
No drive is listed when SD card is inserted:
Card might not be properly seated onto the SD card slot. Remove and then re-insert the
SD card. Wait 15 seconds and click “Refresh” button.
Card might be defective and therefore not recognized. Replace SD card.
SD card reader is defective. Use a different SD card reader.
6. Write firmware
Click “Write”.
Troubleshooting common errors encountered at this step:
Card capacity too small: Replace SD card with one that has at least 4 GB of storage capacity.
The “Lock” button on the SD card is switched on: The “Lock” switch makes the SD card read-only.
If you have the “Lock” switch on, the firmware write operation will start but eventually time-out.
Fix: Remove the SD card. Move the “Lock” switch on the SD card to the un-locked position.
Reinsert the SD card and try again.
Removing the SD card while firmware write is in progress. Reinsert the SD card and try again.
7. Connect the Raspberry Pi Hardware
At this step, following the written instructions on the GUI, you will boot your Raspberry Pi board
with the SD card created in the preceding step. The SD card contains a Raspbian Wheezy Linux
image and the IP configuration information you supplied earlier in Step 4 - Configure board.
1. Remove the SD card from the host computer and securely seat the SD card in the SD card
slot on the Raspberry Pi board.
2. Connect the Ethernet cable to the board. Connect the other end of the Ethernet cable to a
LAN / Home network if you selected “Automatically get IP address” option in Step 4 or to
your host computer if you selected “Manually enter IP address” option.
3. Apply power using a micro-USB power adapter. Note that the power adapter must be rated
for at least 700mA.
4. Click “Next”.
If your Raspberry Pi is connected to your host computer as a peer-to-peer network as in Figure 2,
you need to configure the host computer’s Ethernet card according to the instructions in the
Appendix. We recommend you do this now, and then come back to the Support Package
Installer and the step below.
8. Confirm board configuration
In this step, network and login information for your Raspberry Pi board are displayed. You can verify
proper Raspberry Pi – host connection by following the instructions below.
Ping the Raspberry Pi board Ping the “Host name” listed in the GUI about a minute after applying power to the board. On the
MATLAB command line type:
>> !ping raspberrypi-ah-mbelge –n 2
Or if a numeric IP address is listed:
>> !ping 10.10.10.9 –n 2
You will see the following message for a successful connection:
Pinging 10.10.10.9 with 32 bytes of data:
Reply from 10.10.10.9: bytes=32 time<1ms TTL=128
Reply from 10.10.10.9: bytes=32 time<1ms TTL=128
……..
If you see the following:
Pinging raspberrypi-ah-mbelge with 32 bytes of data:
Request timed out.
or
Destination host unreachable.
The Ethernet connection between your Raspberry Pi and the host computer is not working properly. Try
these troubleshooting steps:
Improper Ethernet cable connection or defective cable:
1. Remove and then fully insert the Ethernet cable into the Ethernet connector on the
Raspberry Pi board.
2. Make sure that the other end of the Ethernet cable is securely connected to your router
or network jack (Figure 1) or your host computer (Figure 2).
3. Confirm 10M, FDX and LNK LEDs are active. If the cable is good the 10M and FDX LEDs
should glow solid and LNK LED should blink. If not, replace the Ethernet cable.
4. Test the connection by pinging the board again.
Raspberry Pi is not reachable by network name: In some cases, you may not be able to establish
Ethernet connection with your Raspberry Pi board using a network name such as “raspberrypi-
ah-mbelge”. You might instead need to specify a numeric IP address such as “192.168.1.9”.
1. To find out the numeric IP address of the Raspberry Pi board, connect a pair of
headphones / speakers to the analog audio connector of Raspberry Pi board.
2. Power cycle the Raspberry Pi board by removing and then re-inserting the power cable.
3. When the Raspberry Pi board boots, you will hear the board speak its IP address. Write
down the IP address.
4. Test the connection by pinging the board with the numeric IP address you just wrote
down.
Wrong network configuration was selected in Step 4 - Configure Board: Go back and make sure
you select proper IP Assignment option for your network configuration (Figure 1 or Figure 2).
1. Go back to Step 4 - Configure board by clicking the “Back” button and redo Steps 4 to 8.
2. Test the connection by pinging the board again.
If you followed the troubleshooting instructions above and you still cannot successfully ping your
Raspberry Pi board, please contact MathWorks technical support. If you suspect problems with the
Raspberry Pi board, you may want to consult the online troubleshooting guide maintained by the
Raspberry Pi foundation at the following site: http://elinux.org/R-Pi_Troubleshooting.
Common Errors
Cannot Run a Simulink Model on Raspberry Pi
Following error message is reported on the MATLAB command line when trying to run a Simulink model
on your Raspberry Pi board:
The call to realtime_make_rtw_hook, during the entry hook generated the following error:
Could not connect to the board at raspberrypi-ah-mbelge. Please check:
1: IP address, User name and Password are valid.
2: The board is powered up and connected to the network
Details:
SSH connection to host raspberrypi- ah-mbelge failed:
Unable to open connection:
Host does not exist
The build process will terminate as a result.
Caused by:
Could not connect to the board at raspberrypi- ah-mbelge. Please check:
1: IP address, User name and Password are valid.
2: The board is powered up and connected to the network
Details:
SSH connection to host raspberrypi- ah-mbelge failed:
Unable to open connection:
Host does not exist
The error message above indicates a problem with the Ethernet connection between your host
computer and the Raspberry Pi board. The most likely culprit is the incorrect network configuration
during firmware update. We recommend following the firmware update troubleshooting guide (Steps 1
through 8) to determine if you chose the correct network settings option in Step 4 - Configure Board of
the firmware update and repeat the firmware update process if necessary.
Error when Installing Raspberry Pi Support Package
You receive the following error message while installing the Raspberry Pi support package:
Error installing third party package 7-zip: Failed with error 193: %1 is not a valid Win32 application.
This error indicates that you do not have sufficient privileges to install 7-zip software. You need to run
MATLAB as administrator when installing the Raspberry Pi support package. Quit MATLAB and restart
MATLAB in administrator mode by right clicking on the MATLAB icon and selecting “Run as administrator”
option. Proceed with the installation of the Raspberry Pi support package as usual.
Appendix
Configuring host computer network settings for peer-to-peer connection with Raspberry Pi
If your Raspberry Pi is connected to your host computer as a peer-to-peer network as in Figure 2,
you should configure the host computer’s Ethernet card by following the instructions below:
1. After applying power to Raspberry Pi, wait up to a minute until the 10M/ FDX LEDs glow
solid and LNK LED starts blinking on the Raspberry Pi board. At this point, your host
computer should detect a new local area connection.
2. On your host computer, open “Control Panel > Network and Internet > Network and Sharing
Center”. You should see a screen as shown in Figure 3 below.
Figure 3 Network and Sharing Center. Local Area Connection 5 denotes the hard-wired Ethernet connection to the Raspberry Pi board.
3. Identify the network connection to the Raspberry Pi board: The network connection with
the Raspberry Pi board will be listed under “Unidentified network” connections. In most
cases, there will be single network connection listed. If you have multiple network
connections listed, eliminate obvious false positives such as VMWare adapters, etc. If you
know the brand / name of your network adapter you can identify the correct network
connection by finding out the name of the network adapter card in “Network connection
details”. To do this, click on the network connection and then click on the “Details” button
on the GUI that opens. You will find the name of the network adapter card next to the
“Description” section of this GUI as seen below.
4. Click on the network connection with the Raspberry Pi board. This brings up the network
status GUI as seen in Figure 4.
Figure 4 Network connection status.
5. Click on “Properties”.
Figure 5 Local Area Connection 5 Properties.
6. Select “Internet Protocol Version 4 (TCP/IPv4)” and then click on “Properties” button. Fill in
the IP address properties as shown in the following screen shot (IP address: 10.10.10.10,
Subnet mask: 255.255.255.0, Default gateway: 10.10.10.1):
Figure 6 Internet Protocol Version 4 (TCP/IPv4) Properties.
7. Click “OK” to complete the host computer network configuration.