Skip to content

Instantly share code, notes, and snippets.

@intx82
intx82 / docker bridge to the real network.md
Created July 23, 2024 09:33
docker bridge to the real network
sudo docker network create -d macvlan --subnet 192.168.0.0/24 -o parent=enx48225442b857 -o macvlan_mode=bridge macvlan0
sudo ip link add macvlan0 link enx48225442b857 type macvlan mode bridge
@intx82
intx82 / nordic-ble-hci.md
Last active June 23, 2024 16:14
How to create USB bluetooth dongle (BLE-only) from NRF52840 USB dongle
@intx82
intx82 / print_hex.c
Last active May 1, 2024 11:36
Printing HEX in C/C++
/*
Will provide output like:
0000: ff ff ff ff ff ff 8c b8 7e 5e 99 21 08 00 45 00 ········~^·!··E·
0010: 00 e5 19 6a 00 00 80 11 99 f2 c0 a8 02 5c c0 a8 ···j·········\··
0020: 02 ff 00 8a 00 8a 00 d1 48 e4 11 02 d3 c3 c0 a8 ········H·······
0030: 02 5c 00 8a 00 bb 00 00 20 45 4a 45 4f 46 45 45 ·\······ EJEOFEE
0040: 4d 43 41 43 41 43 41 43 41 43 41 43 41 43 41 43 MCACACACACACACAC
0050: 41 43 41 43 41 43 41 43 41 00 20 46 48 45 50 46 ACACACACA· FHEPF
0060: 43 45 4c 45 48 46 43 45 50 46 46 46 41 43 41 43 CELEHFCEPFFFACAC
@intx82
intx82 / Hardware and firmware summary.md
Created July 22, 2023 10:44
Hardware and firmware summary.md

Requirements

Hardware and firmware part of the device must meet next requirements:

  • Have connectivity to the internet via WI-FI
  • Have connectivity to the customer mobile device (tablet/phone) via Bluetooth
  • Have connectivity to the internet via mobile network (2G/3G/4G/5G)
  • The data which will be collected from sensors must be stored in the device and on the remote server (Cloud service)
  • Device and entire system must send SMS if some dangerous condition found
  • Have a firmware upgrade from the server (FOTA, firmware over-the-air upgrarde)
@intx82
intx82 / gst-plugin-cedar.md
Last active September 25, 2025 10:32
gst-plugin-cedar

on nano-pi:

pre-read: https://wvthoog.nl/nanopi-ov5640-camera

to enable USB

All right, works as USB Host, needed a change in dr_mode from “otg” to “host” and all usb peripherals now work as expected. The required steps for recent Armbian are (all as root):

cd /boot/dtb
@intx82
intx82 / sl0.down
Last active February 18, 2023 14:26
network over uart for embedded device (slip)
#!/bin/bash
ifconfig sl0 down
pkill slattach