diff --git a/INSTALL.md b/INSTALL.md index 5014628d..fe791059 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -170,6 +170,14 @@ especially if you're using a user-managed node install such as [nvm](https://git Windows, check the [FAQ item "Docker seems to be unavailable"](https://github.com/balena-io/balena-cli/blob/master/TROUBLESHOOTING.md#docker-seems-to-be-unavailable-error-when-using-windows-subsystem-for-linux-wsl). +* The `balena scan` command requires a multicast DNS (mDNS) service like Bonjour or Avahi: + * On Windows, check if 'Bonjour' is installed (Control Panel > Programs and Features). + If not, you can download Bonjour for Windows from https://support.apple.com/kb/DL999 + * Most 'desktop' Linux distributions ship with [Avahi](https://en.wikipedia.org/wiki/Avahi_(software)). + Search for the installation command for your distribution. E.g. for Ubuntu: + `sudo apt-get install avahi-daemon` + * macOS comes with [Bonjour](https://en.wikipedia.org/wiki/Bonjour_(software)) built-in. + ## Configuring SSH keys The `balena ssh` command requires an SSH key to be added to your balena account. If you had diff --git a/lib/actions/scan.coffee b/lib/actions/scan.coffee index 9254335a..745ebfdb 100644 --- a/lib/actions/scan.coffee +++ b/lib/actions/scan.coffee @@ -32,6 +32,20 @@ dockerVersionProperties = [ 'ApiVersion' ] +scanErrorMessage = 'Could not find any balenaOS devices in the local network.' + +winScanErrorMessage = scanErrorMessage + """ +\n +Note for Windows users: + The 'scan' command relies on the Bonjour service. Check whether Bonjour is + installed (Control Panel > Programs and Features). If not, you can download + Bonjour for Windows (included with Bonjour Print Services) from here: + https://support.apple.com/kb/DL999 + + After installing Bonjour, restart your PC and run the 'balena scan' command + again. +""" + module.exports = signature: 'scan' description: 'Scan for balenaOS devices in your local network' @@ -82,7 +96,7 @@ module.exports = .catchReturn(false) .tap (devices) -> if _.isEmpty(devices) - exitWithExpectedError('Could not find any balenaOS devices in the local network') + exitWithExpectedError(if process.platform == 'win32' then winScanErrorMessage else scanErrorMessage) .map ({ host, address }) -> docker = dockerUtils.createClient(host: address, port: dockerPort, timeout: dockerTimeout) Promise.props