update read function, but dfu_upload fails