Skip to content

refactor: Re-work for OTA feature#509

Merged
daveallie merged 1 commit intocrosspoint-reader:masterfrom
embedded4ever:refactoring/ota-update
Jan 27, 2026
Merged

refactor: Re-work for OTA feature#509
daveallie merged 1 commit intocrosspoint-reader:masterfrom
embedded4ever:refactoring/ota-update

Conversation

@embedded4ever
Copy link
Contributor

@embedded4ever embedded4ever commented Jan 23, 2026

Summary

Finally, I have received my device and got to chance to work on OTA.
#176

  • What is the goal of this PR? (e.g., Implements the new feature for file uploading.)
    Existing OTA functionality is very buggy, many of times (I would say 8 out of 10) are end up with fail for me. When the time that it works it is very slow and take ages. For others looks like end up with crash or different issues.

  • What changes are included?
    To be honest, I'm not familiar with Arduino APIs of OTA process, but looks like not good as much esp-idf itself. I always found Arduino APIs very bulky for esp32. Wrappers and wrappers.

Additional Context

Right now, OTA takes ~ 3min 10sec (of course depends on size of .bin file). Can be tested with playing version info inside from platform.ini file.

[crosspoint]
version = 0.14.0

AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? < NO >

@embedded4ever embedded4ever changed the title Re-work for OTA feature refactor : Re-work for OTA feature Jan 23, 2026
@embedded4ever embedded4ever changed the title refactor : Re-work for OTA feature refactor: Re-work for OTA feature Jan 23, 2026
@embedded4ever embedded4ever force-pushed the refactoring/ota-update branch 3 times, most recently from 78a1f19 to bf788b6 Compare January 23, 2026 11:36
@osteotek
Copy link
Member

Nice work! I couldn’t quite understand from your description. Does it actually improve OTA updates? They’ve been borked since their release.

@embedded4ever
Copy link
Contributor Author

embedded4ever commented Jan 23, 2026

Sure, actually I believe there are some different issues with existing Arduino APIs, I tried to track by enabling log_d and log_w to see what logs are printing when even update checking ends up with this failing settings inside

<your-path>/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-log.h

This is what I got most of time :

[ 96653][D][HTTPClient.cpp:1463] writeToStreamDataBlock(): bytesWritten 6400 and size 9222 mismatch!.
[ 96662][W][HTTPClient.cpp:1483] returnError(): error(-10): Stream write error

Looks like connection is closing in somehow.

Another issue that I faced with existing one, request ends up successfully but when I check the content of payload, looks like half of the content is there and form of json is not valid and return EMPTY INPUT by json library.

I used esp-idf apis over time and I would say more healthier than Arduino one, even error handling-wise.

@embedded4ever embedded4ever force-pushed the refactoring/ota-update branch from bf788b6 to e459226 Compare January 23, 2026 16:14
Copy link
Member

@daveallie daveallie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for reworking this! It has been on my (long) todo list for a while and having it solved will unblock the last of the things I was wanting to get solved for 1.0.

Only small thing would be to keep the UA string as it was

@embedded4ever embedded4ever force-pushed the refactoring/ota-update branch from e459226 to 91b71ba Compare January 27, 2026 14:24
@embedded4ever embedded4ever force-pushed the refactoring/ota-update branch from 91b71ba to 8f0981c Compare January 27, 2026 14:24
@daveallie daveallie merged commit e0b6b9b into crosspoint-reader:master Jan 27, 2026
1 check passed
@embedded4ever embedded4ever deleted the refactoring/ota-update branch January 27, 2026 14:31
@daveallie daveallie mentioned this pull request Jan 27, 2026
jdk2pq added a commit to jdk2pq/crosspoint-reader that referenced this pull request Jan 28, 2026
* master: (33 commits)
  feat: add HalDisplay and HalGPIO (crosspoint-reader#522)
  feat: Display epub metadata on Recents (crosspoint-reader#511)
  chore: Cut release 0.16.0
  fix: Correctly render italics on image alt placeholders (crosspoint-reader#569)
  chore: .gitignore: add compile_commands.json & .cache (crosspoint-reader#568)
  fix: Render keyboard entry over multiple lines (crosspoint-reader#567)
  fix: missing front layout in mapLabels() (crosspoint-reader#564)
  refactor: Re-work for OTA feature (crosspoint-reader#509)
  perf: optimize large EPUB indexing from O(n^2) to O(n) (crosspoint-reader#458)
  feat: Add Spanish hyphenation support (crosspoint-reader#558)
  feat: Add support to B&W filters to image covers (crosspoint-reader#476)
  feat(ux): page turning on button pressed if long-press chapter skip is disabled (crosspoint-reader#451)
  feat: Add status bar option "Full w/ Progress Bar" (crosspoint-reader#438)
  fix: Validate settings on read. (crosspoint-reader#492)
  fix: rotate origin in drawImage (crosspoint-reader#557)
  feat: Extract author from XTC/XTCH files (crosspoint-reader#563)
  fix: add txt books to recent tab (crosspoint-reader#526)
  docs: add font generation commands to builtin font headers (crosspoint-reader#547)
  docs: Update README with supported languages for EPUB  (crosspoint-reader#530)
  fix: Fix KOReader document md5 calculation for binary matching progress sync (crosspoint-reader#529)
  ...
Jessica765 pushed a commit to Jessica765/crosspoint-reader that referenced this pull request Feb 3, 2026
## Summary

Finally, I have received my device and got to chance to work on OTA. 
crosspoint-reader#176

* **What is the goal of this PR?** (e.g., Implements the new feature for
file uploading.)
Existing OTA functionality is very buggy, many of times (I would say 8
out of 10) are end up with fail for me. When the time that it works it
is very slow and take ages. For others looks like end up with crash or
different issues.


* **What changes are included?**
To be honest, I'm not familiar with Arduino APIs of OTA process, but
looks like not good as much esp-idf itself. I always found Arduino APIs
very bulky for esp32. Wrappers and wrappers.

## Additional Context
Right now, OTA takes ~ 3min 10sec (of course depends on size of .bin
file). Can be tested with playing version info inside from
`platform.ini` file.

```
[crosspoint]
version = 0.14.0
```
---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _**< NO >**_
Unintendedsideeffects pushed a commit to Unintendedsideeffects/crosspoint-reader that referenced this pull request Feb 17, 2026
## Summary

Finally, I have received my device and got to chance to work on OTA. 
crosspoint-reader#176

* **What is the goal of this PR?** (e.g., Implements the new feature for
file uploading.)
Existing OTA functionality is very buggy, many of times (I would say 8
out of 10) are end up with fail for me. When the time that it works it
is very slow and take ages. For others looks like end up with crash or
different issues.


* **What changes are included?**
To be honest, I'm not familiar with Arduino APIs of OTA process, but
looks like not good as much esp-idf itself. I always found Arduino APIs
very bulky for esp32. Wrappers and wrappers.

## Additional Context
Right now, OTA takes ~ 3min 10sec (of course depends on size of .bin
file). Can be tested with playing version info inside from
`platform.ini` file.

```
[crosspoint]
version = 0.14.0
```
---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _**< NO >**_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants