Closed stanoba closed 3 years ago
Raspberry Pi Zero W + 3.5" TFT display. It has disabled WiFi and only one cable is attached:
Any way I could help test this?
Any way I could help test this?
Hi @EnDeRWiGiN, I think yes, but you need to update your code on SD card.
Here are steps that you need to follow:
Connect Raspberry Pi to internet (needed for installation).
Rename folder mobro-raspberrypi
to mobro-raspberrypi_old
and display-drivers
folder to display-drivers_old
:
mv mobro-raspberrypi mobro-raspberrypi_old
mv display-drivers display-drivers_old
3. Clone my `mobro-raspberrypi` fork and run installation script:
```sh
cd /home/modbros
git clone https://github.com/stanoba/mobro-raspberrypi.git
cd mobro-raspberrypi
chmod +x install.sh
sudo ./install.sh
Note: This step is better to do on RPI3 or RPI4 as Zero could be quite slow. After installation you can put SD card back to Zero.
Re-connect raspberry to your computer via USB port (not PWR).
Wait until boots, you should see new network interface in you computer.
Set IP address and net-mask to your new interface e.g. 192.168.7.10/255.255.255.0
Open http://192.168.7.2 in your browser and go through wizard.
After reboot, everything should be working.
Okay, so I followed your instruction and was able to do steps 1-3 smoothly. There was a problem once I tried to connect over USB. I was getting a "USB could not be deciphered" problem.
Knowing that it might be a config problem I checked the config.txt file and cmdline.txt. The config file was correct and had "dtoverlay=dwc2" but the cmdline.txt file did not have "modules-load=dwc2,g_ether" after rootwait. I added this and was able to proceed.
I was able to do steps 4-8 but afterward, the PI did not see the server even though I could go to the configurator and SSH into it.
I was able to set the network to private and ran the configuration multiple times but I could not get the Pi to see the modbros Client. I tried the static IP of the computer on that network adapter and the normal Network name but it could not find the client.
I ended up removing all the firewall rules and reinstalling modbros and I got it to work! (I have a feeling I messed up the firewall rules while tried to get other things working)
TLDR:
Add "modules-load=dwc2,g_ether" to cmdline.txt file
Make sure the new network interface has the PI's IP for the gateway. This way it is recognized as a valid network and you can set it to public or private.
Make sure the modbros application is configured properly with the firewall rules.
Enjoy! Thank you @stanoba
Thanks for putting in the work to implement this feature @stanoba 👍
I'll have a look at all of it once i find time to do so. But i I guess it will take a bit of time as I want to test it on multiple Pi models and make sure it doesn't interfere with normal network operation (wifi, ethernet) on the models that doesn't support OTG
Also we will need to update all of those Waveshare configuration files.. :/
Hi, every time I follow this guide I get the exact same log and Windows cant recognice my raspberry with conected USB, althoug modbros app finds it and it works through wifi, not USB. Attached the installation log, so if there is any error, somebody can help me.
@Ezero03 Did you make sure the config.txt file and the cmdline.txt file had correct lines to enable the USB port to become a network adapter?
Did you try the items in my post:
Okay, so I followed your instruction and was able to do steps 1-3 smoothly. There was a problem once I tried to connect over USB. I was getting a "USB could not be deciphered" problem.
Knowing that it might be a config problem I checked the config.txt file and cmdline.txt. The config file was correct and had "dtoverlay=dwc2" but the cmdline.txt file did not have "modules-load=dwc2,g_ether" after rootwait. I added this and was able to proceed.
I was able to do steps 4-8 but afterward, the PI did not see the server even though I could go to the configurator and SSH into it.
I was able to set the network to private and ran the configuration multiple times but I could not get the Pi to see the modbros Client. I tried the static IP of the computer on that network adapter and the normal Network name but it could not find the client.
I ended up removing all the firewall rules and reinstalling modbros and I got it to work! (I have a feeling I messed up the firewall rules while tried to get other things working)
TLDR:
- Add "modules-load=dwc2,g_ether" to cmdline.txt file
- Make sure the new network interface has the PI's IP for the gateway. This way it is recognized as a valid network and you can set it to public or private.
- Make sure the modbros application is configured properly with the firewall rules.
- Enjoy! Thank you stanoba
This PR should cover issue #1
Main changes:
Serial
number instead of MAC addressNote: USB Gadget is compatible with Raspberry Pi 0, 0W, A, A+, and 4 only. (Pi B, B+, 2, 3, 3A+, and 3B+ lack the required pin for OTG)