This library adds advanced menu to the OLED display of Huawei E5785 portable LTE router.
This is achieved by hijacking certain library calls in the "oled" executable file.
The menu can be activated with long menu key press.
This library hijacks register_notify_handler()
, lcd_refresh_screen()
and lcd_control_operate()
.
register_notify_handler()
registers it's own proxy handler which intercepts key press events. If it detects long menu key press, it switches to
the "secret menu" mode. In this mode the lcd_refresh_screen outputs the custom lcd buffer and input events are going to the our handlers.
Also the brightness of the display is controlled by us by hijacking lcd_control_operate().
Very simple, yet effective.
This project was inspired by the amazing huawei_oled_hijack project.
The key difference is that instead of patching sprintf
function to change the internal buffers and insert new items to
the menu generated by oled library, this project draws the menu from scratch. This gives these advantages:
- Support of 32768 colors instead of 2 colors
- Support for making custom interfaces. No more wasting space in the top and bottom
- The redisigned architecture, that based on timers. The absense of blocking calls
- Better portability. No more need for hardcode addresses of global variables for every oled build.
Contributions are welcome.