WOW! Thank you very much. It worked! I can see that the Raspberry Pi is detected. Unfortunately, it seems that I can't connect to it via Matlab... Anyway...Is there a way to use the micro USB port (not the power one) as a Serial or something similar?
Yes. As long as you don't need the zero2w to be a USB host at the same time.
This assumes RPiOS.The Pi will now have a /dev/ttyGS0 serial port and your USB host should detect a serial device.
- Locate you config.txt and cmdline.txt. On Bookworm look in /boot/firmware. On Bullseye and earlier look in /boot
- Add the following to the end of config.txt:
Code:
dtoverlay=dwc2
- Add the following to the end of cmdline.txt:
Code:
modules-load=g_serial
- Reboot
There are also the ethernet gadget, the mass storage gadget, and others. Loading g_cdc will give both a serial port and an ethernet interface.
One word of caution: The +5v pins in both micor USB sockets and the GPIO header are directly connected together so if you connect the data port to a USB host and the power port to a PSU there will be a conflict and one supply will try to feed into the other.
Thank you for your warning about the power source. I was totally going to connect both USB.
Statistics: Posted by MessierW — Mon Feb 12, 2024 1:35 pm