diff --git a/.github/ISSUE_TEMPLATE/installer-bug.yaml b/.github/ISSUE_TEMPLATE/installer-bug.yaml index 14836c7..b48b1c8 100644 --- a/.github/ISSUE_TEMPLATE/installer-bug.yaml +++ b/.github/ISSUE_TEMPLATE/installer-bug.yaml @@ -15,8 +15,8 @@ body: What device are you trying to install Rayhunter on? options: - Orbic RC400L - - Tplink HW7350 - - Tplink HW7310 + - Tplink M7350 + - Tplink M7310 - Tmobile TMOHS1 - Wingtech CT2MHS0 - Pinephone diff --git a/doc/installing-from-release-windows.md b/doc/installing-from-release-windows.md index bfedbe7..3b35c36 100644 --- a/doc/installing-from-release-windows.md +++ b/doc/installing-from-release-windows.md @@ -4,10 +4,11 @@ Windows support in Rayhunter's installer is a work-in-progress. Depending on the ## TP-Link -1. Connect the device via WiFi or USB Tethering -- you should be able to view the TP-Link admin page on . -2. Download the latest release (must be at least 0.3.0) for windows-x86_64, and unpack the zipfile. -3. Open PowerShell or CMD in that extracted folder, the installer: `./installer tplink` -4. Follow the instructions on the screen, if there are any. +1. Insert a FAT-formatted SD card into the device. We don't need much storage, a few 100 MB will suffice. +2. Connect the device via WiFi or USB Tethering -- you should be able to view the TP-Link admin page on . +3. Download the latest release (must be at least 0.3.0) for windows-x86_64, and unpack the zipfile. +4. Open PowerShell or CMD in that extracted folder, the installer: `./installer tplink` +5. Follow the instructions on the screen, if there are any. ## Orbic diff --git a/installer/src/tplink.rs b/installer/src/tplink.rs index 52308c4..d92b8e4 100644 --- a/installer/src/tplink.rs +++ b/installer/src/tplink.rs @@ -106,21 +106,29 @@ async fn tplink_run_install( if !skip_sdcard { if sdcard_path.is_empty() { - if telnet_send_command(addr, "ls /media/card", "exit code 0", true) - .await - .is_ok() - { + let try_paths = [ // TP-Link hardware less than v9.0 - sdcard_path = "/media/card".to_owned(); - } else if telnet_send_command(addr, "ls /media/sdcard", "exit code 0", true) - .await - .is_ok() - { + "/media/card", // TP-Link hardware v9.0 - sdcard_path = "/media/sdcard".to_owned(); - } else { + "/media/sdcard", + ]; + for path in try_paths { + if telnet_send_command(addr, &format!("ls {path}"), "exit code 0", true) + .await + .is_ok() + { + sdcard_path = path.to_owned(); + break; + } + } + + if sdcard_path.is_empty() { anyhow::bail!( - "unable to determine sdcard path. this is a bug. please file an issue with your hardware version." + "Unable to determine sdcard path. Rayhunter needs a FAT-formatted SD card to function.\n\n\ + In case you already did, this is a bug. Please file an issue with your hardware version.\n\n\ + The installer has tried to find an empty folder to mount to on these paths: {try_paths:?}\n\ + ...but none of them exist.\n\n\ + At this point, you may 'telnet {admin_ip}' and poke around in the device to figure out what went wrong yourself." ); } }