     print_line = (mac, version, address_size, page_size, page_buffer)->
         console.log " #{left mac, 16} | #{left version, 20} | #{right address_size, 10} | #{right page_size, 9} | #{right page_buffer, 7}"
 
-    scan_devices [], (devices)->
+    scan_devices null, (devices)->
         number_of_devices = Object.keys(devices).length
 
         if number_of_devices == 0


    noble.on 'discover', ( peripheral )->
        if BOOTLOADER_SERVICE_UUID in peripheral.advertisement.serviceUuids
            devices[ peripheral.id ] = peripheral

    noble.on 'stateChange', ( state )->

        if state == 'poweredOn'
            timer = setTimeout (()->
                    noble.stopScanning()
                    cb(devices)
                ), 3000

            noble.startScanning []

    console.log "  --device <mac>, -d <mac>     48 bit MAC address of the device to be flashed"
    console.log "  --version, -v                request version string from device"
    console.log "  --list, -l                   scan for a list of bootloaders"

if options.help
    print_usage()
    process.exit 0

if options.list
