Skip to content

Instantly share code, notes, and snippets.

View ekapujiw2002's full-sized avatar

Eka Puji Widiyanto ekapujiw2002

View GitHub Profile
@ekapujiw2002
ekapujiw2002 / uwatch2-protocol.md
Created June 9, 2026 06:23 — forked from kabbi/uwatch2-protocol.md
Umidigy uwatch2 ble protocol reverse engineering notes

Packet format

0xfe - start byte
0xea - some kind of protocol version
0x10 - some kind of protocol version
1 byte of packet length, payload length + 4
variable length payload
@ekapujiw2002
ekapujiw2002 / UpdateProtocolDafit.txt
Created June 6, 2026 02:56 — forked from atc1441/UpdateProtocolDafit.txt
DaFit App Update Protocol manual
Basic Manual for DaFit Fitness Tracker firmware update protocol, works for nearly any nRF52832 tracker from Company DaFit
The minimum size of update file is 0x10000(can be filled with garbage to get to size) and the maximum size is 0x2F000
the update will first get stored onto the external flash at position 0x3D1000 by the stock firmware(not by the bootloader)
the size of the update will get stored at 0x3D0000 on external flash with 4 bytes uint32_t
when bootloader gets activated it will copy the update from external flash to 0x23000 of the nRF52 internal flash.
Connect to device,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ekapujiw2002
ekapujiw2002 / node-red-nginx-proxy-house.example.net.conf
Last active June 24, 2025 07:53 — forked from njh/house.example.net.conf
Proxying Node-Red through Nginx
server {
server_name house.example.net;
listen 1.2.3.4:80 default_server;
listen [2001:1234:ffff::1]:80 default_server;
add_header Cache-Control "public,max-age=31536000";
return 301 https://$server_name$request_uri;
}
map $ssl_client_s_dn $ssl_username {
@ekapujiw2002
ekapujiw2002 / setup-nut-and-netdata-on-ubuntu.md
Created June 21, 2025 10:26 — forked from Jiab77/setup-nut-and-netdata-on-ubuntu.md
In this document, I will explain how to setup nut (Network UPS Tools) on Ubuntu 18.04 and 20.04.

Setup nut and netdata on Ubuntu

In this document, I will explain how to setup nut (Network UPS Tools) on Ubuntu 18.04 and 20.04.

It is basically the next chapter of my previous gist, Upgrade nut on Ubuntu 18.04.

I'll only document USB connected UPS and not the other supported connection modes.

Install required dependencies

@ekapujiw2002
ekapujiw2002 / espNow_broadcast
Created March 19, 2025 08:23 — forked from Daniel-dk/espNow_broadcast
ESP-Now broadcast example
/**
ESPNOW - Basic communication - Broadcast
Date: 28th September 2017
Original Author: Arvind Ravulavaru <https://github.com/arvindr21>
modified by Daniel de kock
Purpose: ESPNow Communication using Broadcast
Resources: (A bit outdated)
a. https://espressif.com/sites/default/files/documentation/esp-now_user_guide_en.pdf
@ekapujiw2002
ekapujiw2002 / mqtt-in-your-browser.md
Created September 11, 2024 05:04 — forked from narutaro/mqtt-in-your-browser.md
MQTT in your browser

MQTT in your browser

MQTT is probably best known as a lightweight messaging protocol implemented for small sensors, but there is actually a JavaScript implementation called MQTT.js. It's a JavaScript implementation, so of course it works in a browser. I think it's a great option for front-end engineers who are working with MQTT/IoT-related projects (for example, creating a dashboard to visualize MQTT data). In this article, I'd like to write about what I did when I tried to connect MQTT.js to the test server (broker) of Mosquitto™.

@ekapujiw2002
ekapujiw2002 / README.md
Created June 15, 2024 01:37 — forked from corenel/README.md
RTSP Port Forwarding

之前在这里研究过的用iptables配置跨网段的端口转发

Assume we have the following network environments:

  • Device:
    • eth0 (192.168.6.59): for external access
    • enx000ec6a490c5 (192.168.1.2): for ip camera
  • IP Camera:192.168.1.10
  • PC:192.168.6.2
@ekapujiw2002
ekapujiw2002 / rsync-rootfs.md
Created June 9, 2024 03:52 — forked from kalaksi/rsync-rootfs.md
Copy the whole root filesystem excluding pseudo-filesystems and mountpoints

Copying the whole linux root filesystem locally or remotely using rsync

Explanation of chosen options:

  • Verbose output with speed and progress information
  • Try to preserve all possible information: file attrs, hardlinks, ACLs and extended attrs,
  • Exclude contents of pseudo-filesystems and mountpoints
  • In this example source host is remote and destination local.
rsync --info=progress2  -vaHAX --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} source.host:/ /local/destination
@ekapujiw2002
ekapujiw2002 / gather_limit.py
Created May 17, 2024 09:42 — forked from Guiforge/gather_limit.py
asyncio.gather with max number of concurrent tasks.
import asyncio
from collections.abc import Coroutine
from typing import Any
async def gather_limit(
*tasks: Coroutine[None, None, Any],
return_exceptions: bool = False,
max_con: int = 100,
) -> Any: