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 (Simulink Support Package for Raspberry Pi Hardware).
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.
When the hardware setup process completes, the hardware setup window displays the USB IP address. The USB IP address represents the static IP address of Raspberry Pi Zero W over USB. By default, the IP address assigned is 192.168.9.2.
Click Test Connection. A successful test connection status indicates that the Raspberry Pi Zero W is connected to your computer.
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.