feat(freebsd): full FreeBSD 15.0 compatibility
- board: detect cuaU* serial ports in fallback scanner, filter .init/.lock nodes - board: fall through to OS scan when arduino-cli returns empty (serial-discovery uses unsupported Linux syscalls on FreeBSD) - board: recognize cuaU* port names as USB in is_usb() - upload.sh: fix silent exit under set -euo pipefail when vid_pid grep finds nothing (|| true on LOCAL_PORT and LOCAL_VID_PID greps) - upload.sh: add cuaU to auto-detect port pattern - doctor: detect dialer and operator group membership, offer --fix for both - doctor: detect avr-size installed but not on PATH, offer --fix to add to shell rc file via detect_shell_rc() - doctor: context-aware hardware section (suppress misleading messages when groups not yet applied) - doctor: FreeBSD-specific troubleshooting hints throughout - devices: suppress arduino-cli board detection section on FreeBSD (broken due to serial-discovery syscall issues) - devices: always show USB hub tip on FreeBSD - devices: FreeBSD-specific troubleshooting checklist with sequential numbering on all platforms
This commit is contained in:
@@ -15,7 +15,20 @@ pub fn scan_devices() -> Result<()> {
|
||||
let ports = board::list_ports();
|
||||
board::print_port_details(&ports);
|
||||
|
||||
// Also run arduino-cli board list for cross-reference
|
||||
#[cfg(target_os = "freebsd")]
|
||||
{
|
||||
println!();
|
||||
println!(
|
||||
" {}",
|
||||
"Tip: if your board is not showing up, try plugging it directly into the machine -- some USB hubs prevent boards from being detected on FreeBSD.".bright_black()
|
||||
);
|
||||
}
|
||||
|
||||
// Also run arduino-cli board list for cross-reference.
|
||||
// On FreeBSD, arduino-cli is a Linux binary whose serial-discovery subprocess
|
||||
// uses syscalls not implemented in the Linux compat layer -- skip it entirely
|
||||
// since we already detected ports via the OS fallback above.
|
||||
#[cfg(not(target_os = "freebsd"))]
|
||||
if let Some(cli_path) = board::find_arduino_cli() {
|
||||
println!();
|
||||
println!(
|
||||
@@ -62,6 +75,14 @@ pub fn scan_devices() -> Result<()> {
|
||||
println!(" - Check kernel log: dmesg | tail -20");
|
||||
println!(" - Check USB bus: lsusb | grep -i -E 'ch34|arduino|1a86|2341'");
|
||||
}
|
||||
#[cfg(target_os = "freebsd")]
|
||||
{
|
||||
println!(" - Check kernel log: dmesg | grep -i usb");
|
||||
println!(" - List USB devices: usbconfig list");
|
||||
println!(" - Board should appear as /dev/cuaU0 (or cuaU1, cuaU2...)");
|
||||
println!(" - Make sure you are in the dialer group: sudo pw groupmod dialer -m $USER");
|
||||
println!(" - Then log out and back in for group change to take effect");
|
||||
}
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
println!(" - Open Device Manager and check Ports (COM & LPT)");
|
||||
|
||||
Reference in New Issue
Block a user