Add fix command and troubleshooting for errno=16 error
- Add 'fix' command to diagnose CEC connection issues - Add detailed troubleshooting section for common errors - Fix handles errno=16 (device busy) by checking processes and trying sudo - Document solutions for CEC permission and connection issues Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
46
README.md
46
README.md
@@ -37,6 +37,7 @@ chmod +x cec-control.sh
|
||||
| `scan` | Scan for CEC devices | `./cec-control.sh scan` |
|
||||
| `status` | Show CEC adapter status | `./cec-control.sh status` |
|
||||
| `info` | Show TV information | `./cec-control.sh info` |
|
||||
| `fix` | Troubleshoot connection issues | `./cec-control.sh fix` |
|
||||
| `raw <command>` | Send raw CEC command | `./cec-control.sh raw 4f:82:10:00` |
|
||||
| `help` | Show help message | `./cec-control.sh help` |
|
||||
|
||||
@@ -55,9 +56,48 @@ chmod +x cec-control.sh
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- **CEC not working**: Make sure CEC is enabled in your TV settings
|
||||
- **Permission denied**: Run with `sudo` if needed
|
||||
- **Device not found**: Check HDMI connection and try rescanning with `scan` command
|
||||
### Common Issues
|
||||
|
||||
**ioctl CEC_S_MODE failed - errno=16 (Device or resource busy)**
|
||||
|
||||
This error means something else is using the CEC device. Try these solutions:
|
||||
|
||||
1. Run the built-in fix command:
|
||||
```bash
|
||||
./cec-control.sh fix
|
||||
```
|
||||
|
||||
2. Kill any existing CEC processes:
|
||||
```bash
|
||||
sudo killall cec-client
|
||||
```
|
||||
|
||||
3. Check what's using the device:
|
||||
```bash
|
||||
sudo lsof /dev/cec0
|
||||
```
|
||||
|
||||
4. Try running with sudo:
|
||||
```bash
|
||||
sudo ./cec-control.sh scan
|
||||
```
|
||||
|
||||
5. If using Kodi or LibreELEC, CEC may be enabled in the application. Disable it or stop the application first.
|
||||
|
||||
**CEC not working**
|
||||
- Make sure CEC is enabled in your TV settings (often called "HDMI Control", "CEC Control", or branded names like "Bravia Link", "Anynet+", etc.)
|
||||
- Try a different HDMI port on your TV
|
||||
- Check that the HDMI cable is properly connected
|
||||
|
||||
**Permission denied**
|
||||
- Add your user to the `video` group: `sudo usermod -aG video $USER`
|
||||
- Then log out and back in
|
||||
- Or run with `sudo`
|
||||
|
||||
**Device not found**
|
||||
- Check if `/dev/cec0` exists: `ls -l /dev/cec0`
|
||||
- Ensure `cec-utils` is installed
|
||||
- Try rebooting the Pi
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user