 upload_range = ( peripheral, start_address, data, address_size, page_size, page_buffers, cb )->
     console.log "upload #{data.length} starting at: #{start_address}..." if VERBOSE
 
-    progress_callback = ->
+    data_on_the_fly   = 5
+    queued_data       = []
+
+    send_function = ->
+        while queued_data.length != 0 and data_on_the_fly != 0
+            data_on_the_fly = data_on_the_fly - 1
+
+            data = queued_data.shift()
+
+            data_char.write data, false, (error)->
+                data_on_the_fly = data_on_the_fly + 1
+
+                if error
+                    cb( error )
+                else
+                    send_function()
 
     flash_cb = {
         start_flash: ( start_address, cb ) ->

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

                console.log "device connected..."

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

                    control_point_char.on 'data', (data, is_notification)->
                        control_point_callback( data, is_notification )

                    progress_char.on 'data', (data, is_notification)->
                        progress_callback( data, is_notification )

                    control_point_char.notify true, (error)->
