Skip to content

Instantly share code, notes, and snippets.

View ajsb85's full-sized avatar
👨‍💻
Every day is a brand new day

Alexander Salas Bastidas ajsb85

👨‍💻
Every day is a brand new day
View GitHub Profile
@ajsb85
ajsb85 / philips_hue_firmware_api_notes.md
Created March 13, 2024 10:09 — forked from irwincong/philips_hue_firmware_api_notes.md
Finding the Philips Hue Firmware Download API

Philips Hue Firmware Download API discovery

Laste Update: Fri 05 Jun 2020 02:22:05 PM UTC

Easy Way

With hardware, you could intercept traffic.

Hard(er) Way

  1. Download APK
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#include <assert.h>
static void set_time(void);
static void get_time(void);
int main(void)
Debug: 4105 10249 riscv.c:3517 riscv_get_register(): [esp32c3] tp: 0 (cached)
Debug: 4106 10249 riscv.c:3888 register_get(): [esp32c3] read 0x00000000 from tp (valid=1)
Debug: 4107 10249 esp_riscv.c:321 esp_riscv_start_algorithm(): save t0
Debug: 4108 10249 riscv.c:3517 riscv_get_register(): [esp32c3] t0: 0 (cached)
Debug: 4109 10249 riscv.c:3888 register_get(): [esp32c3] read 0x00000000 from t0 (valid=1)
Debug: 4110 10250 esp_riscv.c:321 esp_riscv_start_algorithm(): save t1
Debug: 4111 10250 riscv.c:3517 riscv_get_register(): [esp32c3] t1: 0 (cached)
Debug: 4112 10250 riscv.c:3888 register_get(): [esp32c3] read 0x00000000 from t1 (valid=1)
Debug: 4113 10250 esp_riscv.c:321 esp_riscv_start_algorithm(): save t2
Debug: 4114 10250 riscv.c:3517 riscv_get_register(): [esp32c3] t2: 0 (cached)
@ajsb85
ajsb85 / launch.json
Created January 5, 2023 09:55
ESP32-C3: Built-In USB JTAG
{
"version": "0.2.0",
"configurations": [
{
"cwd": "${workspaceRoot}",
"name": "Arduino on ESP32-C3",
"request": "attach",
"type": "cortex-debug",
"executable": "C:\\Users\\ajsb85\\AppData\\Local\\Temp\\arduino-sketch-24D205A16753448794B9DE06E581D6E3/MAX14521E_Example1_Blink.ino.elf",
"servertype": "openocd",
Waiting for gdb server to start...[2023-01-05T08:23:37.613Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:\\Users\\ajsb85\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\openocd-esp32\\v0.11.0-esp32-20220706/bin/openocd" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "c:\\Users\\ajsb85\\OneDrive - Firechip SRL\\Documents\\Arduino\\MAX14521E_Example1_Blink" -f "C:/Program Files/Arduino IDE/resources/app/plugins/cortex-debug/extension/support/openocd-helpers.tcl" -f debug.cfg -d3
Open On-Chip Debugger v0.11.0-esp32-20220706 (2022-07-06-15:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
User : 3 34 options.c:63 configuration_output_handler(): debug_level: 3
User : 4 35 options.c:63 configuration_output_handler():
Debug: 5 35 options.c:244 add_default_dirs(): bindir=/builds/idf/openocd-esp32/_build/../openocd-esp32/bin
Debug: 6 35 options.c:245 add_de
int parseRawFormatFast(char *msg, RawMessage *m, bool showJson)
{
unsigned int prio, pgn, dst, src, len, r, i;
char *p;
p = findOccurrence(msg, ',', 1);
if (!p)
{
return 1;
}
@ajsb85
ajsb85 / html.dart
Last active November 7, 2021 14:17
import 'package:html/parser.dart' show parse;
import 'package:html/dom.dart';
main() {
var document = parse(
'<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Titulo</title>
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
pinMode(_PA_12, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
@ajsb85
ajsb85 / MQTT_GraphQL_IoT.ino
Created June 19, 2021 03:34 — forked from shantanoo-desai/MQTT_GraphQL_IoT.ino
Arduino Sketch to publish BME280 sensor data in JSON Format to an MQTT Broker
#include<Wire.h>
#include<PubSubClient.h>
#include<WiFi.h>
#include<Adafruit_BME280.h>
#include <ArduinoJson.h>
/*
* WLAN Configuration
*/
const char* ssid = "YOUR_SSID"; // FILL THIS ACCORDINGLY
@ajsb85
ajsb85 / wsl.bat
Created December 31, 2020 17:32
Connecting to WSL2 server via local network
netsh interface portproxy add v4tov4 listenport=<port-to-listen> listenaddress=0.0.0.0 connectport=<port-to-forward> connectaddress=<forward-to-this-IP-address>
netsh interface portproxy add v4tov4 listenport=3000 listenaddress=0.0.0.0 connectport=3000 connectaddress=172.24.98.194
netsh interface portproxy add v4tov4 listenport=3001 listenaddress=0.0.0.0 connectport=3001 connectaddress=172.24.98.194