Bricolage Logs incongrus

Decentralize your blog with IPFS

Runnning a static blog is quite easy thoses days and seems the way the way to go for me. So if you already have one up and running here is a way to decentralize it.

Inter Planetary File System

Streaming torrent to Kodi

Here is a little trick to stream any BitTorrent file –video or audio– to your Kodi box.

You need to install peerflix and idok. In Archlinux you can use yaourt -S peerflix idok, for others distro check out the git repository of the projects.

Check that your Kodi machine have the JSON-RPC API enabled. If it's not the default port (8080) you should specify it to idok -target-port=8080.

To use the commands wich follow:

  • replace the IPs with the ones of your Kodi box and the computer your are using at the moment,
  • replace the magnet link with an other one or a torrent file.
peerflix "magnet:?xt=urn:btih:475EE9147C9C3A4C2C1F3C2A7C078D8552CF7598&dn=rick+and+morty+s02e10+hdtv+x264+batv+ettv&" \
--on-listening "idok -targetport=$KODI_PORT -target=$KODI_IP http://$LOCAL_IP:8888"

It'll download the torrent locally, serve it on the port 8888 and then make Kodi paly it. The torrent will stream as if it was local, you'll be able to skim throught it forward and backward.

Connect to PcDuino via USB

List network interface

$ ip a s              
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlp2s0b1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 60:c5:47:03:19:e0 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic wlp2s0b1
       valid_lft 38491sec preferred_lft 38491sec
    inet6 fe80::62c5:47ff:fe03:19e0/64 scope link 
       valid_lft forever preferred_lft forever
6: enp0s26f7u1u3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether 9a:1f:85:1c:3d:0e brd ff:ff:ff:ff:ff:ff

Set your ip address

# ip addr replace dev enp0s26f7u1u3

Connect to the pcduino througth ssh the password is ubuntu

$ ssh ubuntu@

Configuration du module bluetooth JY-MCU


  • IDE Arduino fonctionel
  • Module Bluetooth JY-MCU, aka "linvor"
  • Carte Arduino
  • Câble USB
  • 4 petits câbles électriques


Téléverser le croquis suivant sur votre carte Arduino:

  Software serial multple serial test

 Receives from the hardware serial, sends to software serial.
 Receives from software serial, sends to hardware serial.

 The circuit: 
 * RX is digital pin 10 (connect to TX of other device)
 * TX is digital pin 11 (connect to RX of other device)

 Not all pins on the Mega and Mega 2560 support change interrupts, 
 so only the following can be used for RX: 
 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69

 Not all pins on the Leonardo support change interrupts, 
 so only the following can be used for RX: 
 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

 created back in the mists of time
 modified 25 May 2012
 by Tom Igoe
 based on Mikal Hart's example

 This example code is in the public domain.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()  
  // Open serial communications and wait for port to open:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only

  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.println("Hello, world?");

void loop() // run over and over
  if (mySerial.available())
  if (Serial.available())

Connectez le module bluetooth à l'Arduino :

JY-MCU Arduino
TXD Pin 11
RXD Pin 12

Vérifier que la DEL du module linvor soit en train de clignoter ; si ce n'est pas le cas désappairer le du périphérique auquel il est actuellement pairé. Accédez au moniteur série (Ctrl+Maj+M) du logiciel Arduino, calibré sur :

  • Défilement automatique
  • Pas de fin de ligne
  • 9600 baud

Goodnight moon! devrait y être affiché, entrez alors AT, si le moniteur renvois OK c'est parti par la configuration.


Poour configurer votre module JY-MCU vous pouvez utilisez ces commandes:


Retourne OK.


Permet de connaître la version de son module.

Retourne OKlinvorV1.5.


Définit le nom du module visible par les périphériques Bluetooth.

De la forme AT+NAMEnomnom est le nom du module. Retourne OKsetname.


Définit le pin du module, a fournir lors de l'appairent.

De la forme AT+PINxxxxxxxx est un nombre. Retourne OKsetPIN.


Définit le baud du module. De la forme AT+BAUDxx est :

  • 1 : 1200 Bd
  • 2 : 2400 Bd
  • 3 : 4800 Bd
  • 4 : 9600 Bd
  • 5 : 19200 Bd
  • 6 : 38400 Bd
  • 7 : 57600 Bd
  • 8 : 115200 Bd
  • 9 : 230400 Bd
  • A : 460800 Bd
  • B : 921600 Bd
  • C : 1382400 Bd