Unlike other Raspberry Pi™ hardware, the Raspberry Pi Zero W does not have a built-in Ethernet port. To connect Raspberry Pi Zero W to your computer usually, you need multiple devices, such as Ethernet adapter, Ethernet cable, and On-The-Go (OTG) cable. However, with MathWorks® Raspbian image, you no longer need these devices to connect your computer to Raspberry Pi. You only need a micro-USB cable.
To connect to the Raspberry Pi Zero W board using a micro-USB cable:
On the MATLAB® Home tab, in the Environment section, select Add-Ons > Manage Add-Ons. If you have not installed the support package, follow the steps described in Install Support Package.
In the Add-On Manager window, start the hardware setup process by clicking the Setup button .
In the Select a Hardware Board dialog box, set Hardware
Raspberry Pi Zero W and
Select Setup hardware with Mathworks Raspbian image and follow the instructions on each page of the Hardware Setup window.
Ethernet over USB works only on MathWorks Raspbian image. If you select any other option, you will not be able to connect Raspberry Pi Zero W to your computer over USB.
Click Test Connection. If the connection is successful, the hardware setup window displays USB IP address as 192.168.9.2. The USB IP address represents the static IP address of Raspberry Pi Zero W over USB. If the connection is unsuccessful, no IP address is assigned to the hardware. Install Remote Network Driver Interface Specification (RNDIS) driver on your computer and then test the connection again.
You are not required to run this Hardware Setup process again the next time you want to access Raspberry Pi Zero W from your computer. You can directly connect to Raspberry Pi Zero W using the micro-USB cable and access the board using the same IP address specified in USB IP address.