donkey findcar command helps you locate your Raspberry Pi-based Donkeycar on your local network by scanning for devices with Raspberry Pi MAC addresses.
Usage
Description
This command performs a network scan to find Raspberry Pi devices on your local network. It’s useful when you don’t know the IP address of your car after booting it up or when the IP address has changed.How It Works
- Detects your computer’s IP address - Determines your local network IP
- Scans the network - Uses
nmapto scan for devices on your subnet (/24 network) - Filters for Raspberry Pi - Looks for MAC addresses starting with:
B8:27:EB- Raspberry Pi 3 and earlierDC:A6:32- Raspberry Pi 4
Requirements
Install nmap:Example Output
Connecting to Your Car
Once you have the IP address, you can:-
SSH into your car:
-
Access the web interface:
Troubleshooting
No devices found
No devices found
If no devices are found:
- Ensure your car is powered on and connected to the same network
- Check that your Raspberry Pi’s WiFi is configured correctly
- Verify nmap is installed:
which nmap - Try running with sudo:
sudo nmap -sP 192.168.1.0/24 - Your Raspberry Pi might be using a different MAC address prefix (check with
ifconfigon the Pi)
Command requires sudo
Command requires sudo
The nmap network scan typically requires elevated privileges. If you get permission errors, run the command with sudo or configure nmap to run without sudo.
Scan takes too long
Scan takes too long
The network scan can take 1-2 minutes depending on your network size. Be patient while it completes.
Alternative Methods
Iffindcar doesn’t work, try these alternatives:
- Check your router’s admin page - Most routers list connected devices with their IP addresses
- Use Angry IP Scanner - A GUI tool for network scanning
- Use a fixed IP - Configure your Raspberry Pi to use a static IP address
- mDNS/Bonjour - If configured, you can access your Pi at
raspberrypi.local
Related Commands
donkey createcar- Create a new car projectdonkey calibrate- Calibrate your car once you can connect to it
Source Code
Implemented indonkeycar/management/base.py:160-177