Skip to content

Instantly share code, notes, and snippets.

@rettichschnidi
rettichschnidi / gist:cc92fee8f8076cd97b699817f14eb7cb
Created January 11, 2020 01:29
Startup log of the Swisscom Internet-Box Light
D%G----
BTL1
V1.1
CPUI
L1CI
PMCI
PMCS
AFEL
PWRZ
MEML

OpenWrt

Connecting to the device

Serial Port

  • Open up the case gently on the bottom with the blue "triangle"
  • Take out the PCB so that you can access the pins on the upper side
  • Attach the UART pins on the USB-to-Serial-Dongle to the respective pins on the router PCBA (GDN to GND, RX to Tx, TX to RX).
  • Plug in the dongle to the USB on your computer. When executing dmesg (sudo dmesg), you should see something like this: pl2303 converter now attached to ttyUSB2
  • Install e.g. picocom (sudo apt install picocom) and connect it to the dongle using a baud of 115200 and the ttyUSB2 seen before:
#!/bin/bash
set -e
readonly filename="/tmp/$(whoami)-usb-sound"
if [ -f ${filename} ]; then
rm "${filename}"
pacmd set-card-profile 0 output:analog-stereo+input:analog-stereo && pacmd set-card-profile 1 off
else
@rettichschnidi
rettichschnidi / gist:1a9a1669a0cebbdcdc1ccf617c33688c
Created January 14, 2017 22:59
Building Boost with MinGW (Qt, 4.9.2)
set PATH=C:\Qt\Tools\mingw492_32\bin;%PATH%
bootstrap.bat gcc
b2 toolset=gcc cxxflags="--std=c++11" --build-dir=build-i386-windows-mingw492 --build-type=complete link=shared threading=multi runtime-link=shared variant=debug,release --without-python --without-mpi -q -prefix=../i386-windows-mingw492 install
@rettichschnidi
rettichschnidi / gist:f6a8c3747281652cc998937ab4234244
Created June 19, 2016 23:48
0001-HACK-First-attempt-to-mitigate-the-IAR-killing-forma.patch
From a77aaf4c69149d08b5e42f8419a39a8bc63bcdd5 Mon Sep 17 00:00:00 2001
From: Reto Schneider <code@reto-schneider.ch>
Date: Mon, 20 Jun 2016 01:47:10 +0200
Subject: [PATCH] - HACK: First attempt to mitigate the IAR killing formatting
---
lib/Format/FormatToken.h | 14 ++++++++++++++
lib/Format/TokenAnnotator.cpp | 20 ++++++++++++++++++--
2 files changed, 32 insertions(+), 2 deletions(-)
#include <future>
#include <thread>
int main() {
std::promise<void> promise;
std::future<void> future = promise.get_future();
std::thread work_thread([&promise] { promise.set_value(); });
future.wait();
work_thread.join();
}
// Source: http://en.cppreference.com/w/cpp/thread/promise
#include <future>
#include <iostream>
#include <numeric>
#include <thread>
#include <vector>
void accumulate(std::vector<int>::iterator first,
std::vector<int>::iterator last,
std::promise<int> accumulate_promise) {

Keybase proof

I hereby claim:

  • I am rettichschnidi on github.
  • I am rettichschnidi (https://keybase.io/rettichschnidi) on keybase.
  • I have a public key whose fingerprint is AC8C D403 EBF8 78C7 19A0 4357 6B9A FAF3 CCCB 851A

To claim this, I am signing this object: