 control_point_callback = (data, is_notification)->
     raise "Unexpected control point notification"
 
-progress_callback      = (data, is_notification)->
+default_progress_callback = ->
     raise "Unexpected progress notification"
+
+progress_callback      = default_progress_callback
 
 scan_devices = (mac, cb)->
     devices = {}

                cb(error, mtu, receive_capacity, checksum)

        send_data: ( data ) ->
            data_char.write data, false, (error)->
                if error
                    cb( error )

        register_progress_callback: ( cb ) ->
            progress_callback = cb

        unregister_progress_callback: ->
            progress_callback = ->
    }

    new FlashMemory( flash_cb, start_address, data, address_size, page_size, page_buffers, cb )

            connect_device device, (peripheral, error)->
                raise "connecting #{device.address}: Error: #{error}" if error

                console.log "device connected." if VERBOSE

                flash options.flash, start_address(), device, (error)->
                    raise "flashing device: Error: #{error}" if error
