Proper support for file download/upload to ESP8266/ESP32 boards #110

Closed
opened 2022-07-05 01:38:52 +02:00 by blacklight · 0 comments
Owner

Created by: BlackLight

The current implementations of file_download and file_upload are relatively brittle, as they rely on the text-based serial interface to send and receive content.

WebREPL seems to implement a native file upload/download mechanism over websocket that also works for binary files.

However, the implementation of the file transfer protocol is pretty much buried in the JavaScript of the page itself.

Reverse engineer the protocol and implement a robust mechanism for file transfer.

*Created by: BlackLight* The current implementations of [`file_download`](https://github.com/BlackLight/platypush/blob/master/platypush/plugins/esp/__init__.py#L1531) and [`file_upload`](https://github.com/BlackLight/platypush/blob/master/platypush/plugins/esp/__init__.py#L1504) are relatively brittle, as they rely on the text-based serial interface to send and receive content. WebREPL seems to implement a native file upload/download mechanism over websocket that also works for binary files. However, the implementation of the file transfer protocol is pretty much [buried in the JavaScript of the page itself](https://github.com/micropython/webrepl/blob/master/webrepl.html#L179). Reverse engineer the protocol and implement a robust mechanism for file transfer.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: platypush/platypush#110
No description provided.