🇬🇹 GT Rhum Zacapa + 🇨🇺 CU Cigare Bolivar

Written by pmd - - no comments

Zacapa 23

Containing a blend of rums from 6 to 23 years old.

Keynote
Wonderfully intricate with honeyed butterscotch, spiced oak and raisined fruit, showcasing the complexity of the sistema solera ageing process.

Appearance
Light mahogany, with the tones of long barrel ageing at the rim and long, slow legs clinging to the glass.

Bolívar

The Cuban-produced Bolívar cigars are very full-bodied, with considerable ligero in the blend and have traditionally been some of the strongest and most full-bodied Havana cigars.

Wireguard on Raspberry

Written by pmd - - no comments

I have tried to use Wireguard following two guides :

  1. From this forum thread, without succes: Guide: Install Wireguard On Raspberry latest releases
  2. From this blog article, without succes as well: Installing and Configuring WireGuard on Raspberry Pi OS (August 2020)

This can be used as well to generate wireguard peers configurations + QR codes: Wireguard Tools

=> no successfull handshake between server (raspberry) and peers (Android and Windows 10).

Configuration

Server:

$ sudo cat /etc/wireguard/wg0.conf
[Interface]
Address = 192.168.99.1/24
ListenPort = 58280
PrivateKey = gNVxJe7Se842IiOR5GsXeM4sHcacGhPATIdQCgqP8Wa=
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey = OQmmvh9/8PDWFIpOEzVWzOZ1HXQ48+10vONFlUNb0ia=
AllowedIPs = 192.168.99.2/32
[Peer]
PublicKey = N9VPXnH8hip4sJGGWm4ziLFWD5ZAveoj7H5oH8OgsHa=
AllowedIPs = 192.168.99.3/32

Peer 1:

$ cat ~/wg_config/users/client1/client.conf
[Interface]
Address = 192.168.99.2/24
PrivateKey = 6OfJPX1ZQCFu08fTy2uU6JdgUf/qXgzBoTtX/tCYX3a=

[Peer]
PublicKey = b6kqDH4pjAdK0LqPrEF4Fc9d4XxR0Eb3kSk9rzdEKma=
AllowedIPs = 192.168.99.1/32, 192.168.1.0/24
Endpoint = adress.ddns.net:58280

Peer 2:

$ cat ~/wg_config/users/client2/client.conf
[Interface]
Address = 192.168.99.3/24
PrivateKey = uB+g5H0kbyI07kHdAajcQUE8VqMTaNqqiu0yj6BrH1a=

[Peer]
PublicKey = b6kqDH4pjAdK0LqPrEF4Fc9d4XxR0Eb3kSk9rzdEKma=
AllowedIPs = 192.168.99.1/32, 192.168.1.0/24
Endpoint = adress.ddns.net:58280

 

Troubleshooting

12/10/2020

UDP correctly forwarded

I verified UDP port was correctly forwarded by my ISP modem/router, following Test whether UDP port is open: simple UDP server and client

Server side:

$ nc -l -u -p 58280

Client side:

$ nc -u servname_or_ip 58280

Checking if packets arrive to server

Listening on specific interface and on precise port of the server:

$ sudo tcpdump -i eth0 'port 58280'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
20:56:36.474701 IP 92.88.90.88.56188 > 192.168.1.201.58280: UDP, length 148
20:56:36.476725 IP 192.168.1.201.58280 > 92.88.90.88.56188: UDP, length 92
20:57:34.066017 IP 92.88.90.88.51673 > 192.168.1.201.58280: UDP, length 148
20:57:34.070037 IP 192.168.1.201.58280 > 92.88.90.88.51673: UDP, length 92

Here I tried two times to connect a peer to the server while pinging Wireguard server IP (192.168.99.1) from peer.

17/10/2020

Recording packets using tcpdump on both client and server sides

CLIENT: in a country potentially blocking VPN stuff
SERVER: in France, probably not blocking anything

I have generated another peer configuration. This time it is not a windows, not an android, but an openwrt router using same .
I have fixed the port in use for the wireguard client on openwrt in order to listen WAN interface on 51820.

What is observed on CLIENT openwrt side:

root@OpenWrt:~# tcpdump -i eth1 'port 51820'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
14:37:45.906247 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:37:46.025023 IP raspberry.abo.wanadoo.fr.58280 > 192.168.1.102.51820: UDP, length 92
14:37:46.038821 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 32
14:38:11.087567 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 32
14:38:36.687153 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 32
14:39:02.286884 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 32
14:39:27.887315 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 32
14:39:53.487145 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 32
14:39:53.498819 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:39:59.257666 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:40:04.377588 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:40:10.138437 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:40:15.257703 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:40:21.017550 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:40:26.782109 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:40:31.897640 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:40:37.659644 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:40:42.777571 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:40:48.537585 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:40:54.298502 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:41:00.057651 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:41:05.177582 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:41:10.937544 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:41:16.697736 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:41:22.457569 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:41:28.220105 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:41:33.977597 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:41:39.097547 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
14:42:04.697538 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 148
^C
29 packets captured
29 packets received by filter
0 packets dropped by kernel
root@OpenWrt:~# wg
interface: WG0
public key: OQmmvh9/8PDWFIpOEzVWzOZ1HXQ48+10vONFlUNb0ia=
private key: (hidden)
listening port: 51820

peer: b6kqDH4pjAdK0LqPrEF4Fc9d4XxR0Eb3kSk9rzdEKma=
endpoint: raspberry.abo.wanadoo.fr:58280
allowed ips: 192.168.99.1/32
latest handshake: 32 minutes, 12 seconds ago
transfer: 92 B received, 40.80 KiB sent
persistent keepalive: every 25 seconds
root@OpenWrt:~#
  • Only first two captured packets were seen by SERVER side.
  • These two captured packets are enough to declare successful handshake on CLIENT side.

What is observed on SERVER raspberry pi side:

pi@raspberrypi:~ $ sudo tcpdump -i eth0 'port 58280'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
16:37:45.924082 IP 93.88.83.27.51820 > 192.168.1.201.58280: UDP, length 148
16:37:45.928019 IP 192.168.1.201.58280 > 93.88.83.27.51820: UDP, length 92
^C
2 packets captured
2 packets received by filter
0 packets dropped by kernel
pi@raspberrypi:~ $ sudo wg
interface: wg0
public key: b6kqDH4pjAdK0LqPrEF4Fc9d4XxR0Eb3kSk9rzdEKma=
private key: (hidden)
listening port: 58280

peer: OQmmvh9/8PDWFIpOEzVWzOZ1HXQ48+10vONFlUNb0ia=
endpoint: 93.88.83.27:51820
allowed ips: 192.168.99.2/32
transfer: 888 B received, 552 B sent
pi@raspberrypi:~ $
  • Only first two packets captured by CLIENT are seen as well on SERVER side.
  • Handshake is not declared successful on SERVER side.
  • Why SERVER is not seeing following packets ??? If I restart CLIENT, SERVER does not see packets for new handshake unless port used by CLIENT changes.
  • Why SERVER is not seeing anything from this CLIENT packet: " 14:37:46.038821 IP 192.168.1.102.51820 > raspberry.abo.wanadoo.fr.58280: UDP, length 32 "

Trying to connect from local country

CLIENT: in a country potentially blocking VPN stuff Computer using Windows in France, probably not blocking anything
SERVER: in France, probably not blocking anything

pi@raspberrypi:~ $ ip route show table 42
default via 192.168.1.1 dev eth0 proto dhcp src 192.168.1.201 metric 202
192.168.1.0/24 dev eth0 proto dhcp scope link src 192.168.1.201 metric 202
192.168.99.0/24 dev wg0 proto kernel scope link src 192.168.99.1
pi@raspberrypi:~ $ sudo tcpdump -i eth0 'port 58280'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
19:58:01.734652 IP device.mobile.abo.orange.fr.51706 > 192.168.1.201.58280: UDP, length 148  # handshake
19:58:01.741670 IP 192.168.1.201.58280 > device.mobile.abo.orange.fr.51706: UDP, length 92   # handshake
19:58:01.781909 IP device.mobile.abo.orange.fr.51706 > 192.168.1.201.58280: UDP, length 96   # ping from client
19:58:01.782398 IP 192.168.1.201.58280 > device.mobile.abo.orange.fr.51706: UDP, length 96   # server answers
19:58:02.893737 IP device.mobile.abo.orange.fr.51706 > 192.168.1.201.58280: UDP, length 96   # ping from client
19:58:02.894315 IP 192.168.1.201.58280 > device.mobile.abo.orange.fr.51706: UDP, length 96   # server answers
19:58:03.822017 IP device.mobile.abo.orange.fr.51706 > 192.168.1.201.58280: UDP, length 96   # ping from client
19:58:03.822643 IP 192.168.1.201.58280 > device.mobile.abo.orange.fr.51706: UDP, length 96   # server answers
19:58:05.793794 IP device.mobile.abo.orange.fr.51706 > 192.168.1.201.58280: UDP, length 96   # ping from client
19:58:05.794394 IP 192.168.1.201.58280 > device.mobile.abo.orange.fr.51706: UDP, length 96   # server answers
19:58:15.839250 IP device.mobile.abo.orange.fr.51706 > 192.168.1.201.58280: UDP, length 32   # ???
19:58:51.032841 IP 192.168.1.201.58280 > device.mobile.abo.orange.fr.51706: UDP, length 128  # server pings client
19:58:51.123963 IP device.mobile.abo.orange.fr.51706 > 192.168.1.201.58280: UDP, length 128  # client answers
19:58:52.033771 IP 192.168.1.201.58280 > device.mobile.abo.orange.fr.51706: UDP, length 128  # server pings client
19:58:52.090988 IP device.mobile.abo.orange.fr.51706 > 192.168.1.201.58280: UDP, length 128  # client answers
19:58:53.035792 IP 192.168.1.201.58280 > device.mobile.abo.orange.fr.51706: UDP, length 128  # server pings client
19:58:53.135887 IP device.mobile.abo.orange.fr.51706 > 192.168.1.201.58280: UDP, length 128  # client answers
19:58:54.037607 IP 192.168.1.201.58280 > device.mobile.abo.orange.fr.51706: UDP, length 128  # server pings client
19:58:54.076616 IP device.mobile.abo.orange.fr.51706 > 192.168.1.201.58280: UDP, length 128  # client answers
[...]
[...]
[...]
pi@raspberrypi:~ $ sudo wg
interface: wg0
  public key: b6kqDH4pjAdK0LqPrEF4Fc9d4XxR0Eb3kSk9rzdEKma=
  private key: (hidden)
  listening port: 58280

peer: xxMWH9tZDwCNXPbErQxBuDejgkxNU1QOm9vFezUBeSa=
  endpoint: device.mobile.abo.orange.fr :51706
  allowed ips: 192.168.99.6/32
  latest handshake: 19 seconds ago
  transfer: 564 B received, 476 B sent

=> It worked ! I conclude that wireguard is blocked in the country where the client is.

Interesting to read about how easy it is to block wireguard: Let's talk about obfuscation again

 

 

Install a newer package version than available on PyPI

Written by pmd - - no comments

Try to simply update

pi@raspberrypi:~ $ sudo python3 -m pip install --upgrade mplfinance --no-cache-dir
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: mplfinance in /usr/local/lib/python3.7/dist-packages (0.11.0)
Requirement already satisfied, skipping upgrade: matplotlib in /usr/lib/python3/dist-packages (from mplfinance) (3.0.2)
pi@raspberrypi:~ $

It says the package is already at the newer version 0.11, but on github.com/matplotlib/mplfinance there is even newer.

Alternative that worked

Download the sources :

pi@raspberrypi:~ $ wget https://github.com/matplotlib/mplfinance/archive/master.zip
--2020-08-20 21:01:12--  https://github.com/matplotlib/mplfinance/archive/master.zip
Resolving github.com (github.com)... 140.82.118.4
Connecting to github.com (github.com)|140.82.118.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/matplotlib/mplfinance/zip/master [following]
--2020-08-20 21:01:12--  https://codeload.github.com/matplotlib/mplfinance/zip/master
Resolving codeload.github.com (codeload.github.com)... 140.82.112.9
Connecting to codeload.github.com (codeload.github.com)|140.82.112.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘master.zip’

master.zip  [                         <=>                ]  19.37M   208KB/s    in 94s

2020-08-20 21:02:46 (212 KB/s) - ‘master.zip’ saved [20307580]

pi@raspberrypi:~ $

Unzip :

pi@raspberrypi:~ $ unzip master.zip -d mplfinance
Archive:  master.zip
3af71a860c9eb646b92a6c9d4d4ab0a129f3db79
   creating: mplfinance/mplfinance-master/
   creating: mplfinance/mplfinance-master/.github/
   creating: mplfinance/mplfinance-master/.github/ISSUE_TEMPLATE/
  inflating: mplfinance/mplfinance-master/.github/ISSUE_TEMPLATE/ask-a-question.md
  inflating: mplfinance/mplfinance-master/.github/ISSUE_TEMPLATE/bug_report.md
[... many lines ...]
finishing deferred symbolic links:
  mplfinance/mplfinance-master/examples/original_flavor/data -> ../data
pi@raspberrypi:~ $

Go in unziped folder :

pi@raspberrypi:~ $ cd mplfinance/mplfinance-master/
pi@raspberrypi:~/mplfinance/mplfinance-master $

Install :

pi@raspberrypi:~/mplfinance/mplfinance-master $ sudo python3 -m pip install .
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/pi/mplfinance/mplfinance-master
Requirement already satisfied: matplotlib in /usr/lib/python3/dist-packages (from mplfinance==0.12.7a1) (3.0.2)
Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from mplfinance==0.12.7a1) (1.0.3)
Requirement already satisfied: python-dateutil>=2.6.1 in /usr/lib/python3/dist-packages (from pandas->mplfinance==0.12.7a1) (2.7.3)
Requirement already satisfied: pytz>=2017.2 in /usr/lib/python3/dist-packages (from pandas->mplfinance==0.12.7a1) (2019.1)
Requirement already satisfied: numpy>=1.13.3 in /usr/lib/python3/dist-packages (from pandas->mplfinance==0.12.7a1) (1.16.2)
Building wheels for collected packages: mplfinance
  Running setup.py bdist_wheel for mplfinance ... done
  Stored in directory: /root/.cache/pip/wheels/4e/71/07/c9cc7215e05dd2bcc76f171eaf646c5e069e3bc296fb8defb9
Successfully built mplfinance
Installing collected packages: mplfinance
  Found existing installation: mplfinance 0.11.0
    Uninstalling mplfinance-0.11.0:
      Successfully uninstalled mplfinance-0.11.0
Successfully installed mplfinance-0.12.7a1
pi@raspberrypi:~/mplfinance/mplfinance-master $

Done, should be good.

Source

Check connectivity and switch on/off a LED (GL-AR150)

Written by pmd - - no comments

Shell script that will check if there is connectivity to a defined website every 60 seconds and switch ON/OFF the led :

  • /usr/bin/WANLED :
#!/bin/sh
while [ true ]; do
        /usr/bin/wget -q --tries=2 --spider http://google.com
        if [ $? -eq 0 ]; then
                #echo "Connected ! LED OFF."
                echo "none" >  /sys/class/leds/gl-ar150:orange:wlan/trigger
        else
                #echo "Not connected ! LED ON."
                echo "default-on" >  /sys/class/leds/gl-ar150:orange:wlan/trigger
        fi
        sleep 60
done

 

Schell script to autostart the above script :

  • /etc/init.d/WANLED :
#!/bin/sh /etc/rc.common

START=99
STOP=1

start(){
        /usr/bin/WANLED &
}

stop(){
        killall -9 WANLED
}

Now let's make these script executable and started at startup:

# chmod +x /usr/bin/WANLED
# chmod +x /etc/init.d/WANLED
# /etc/init.d/WANLED enable
# /etc/init.d/WANLED start

Now the orange LED should be ON when there is no connectivity to Google.

FYI OpenWRT in use was : OpenWrt 19.07.2, r10947-65030d81f3

Source: LED, Start script at startup, LED on when Internet is available

Руки Вверх - Он Тебя Целует

Written by pmd - - no comments
C#m  4 4 3 3 2 4
A    5 7 7 6 5 5
B    7 9 9 8 7 7
G#m  4 5 5 4 4 4

ms

C#m            A
Вечером теплым брожу один
B               G#m
"Ты не можешь ее вернуть" - шепчет мне нежно дождь
C#m            A
Знаю, что встречу тебя с другим
B               G#m
Лучше это была б не ты, но рядом с ним ты идешь
C#m            A
Я ж тебя так любил, так любил
B               G#m
Думал, что ты ждала меня. Что же ты сделала
C#m            A
Я ж тебя так любил, так любил
B               G#m
А теперь потерял тебя

 

Припев.
C#m            A
А он тебя целует, говорит что любит
B               G#m
И ночами обнимает, к сердцу прижимает
C#m            A
А я мучаюсь от боли со своей любовью
B               G#m
Фотографии в альбоме о тебе напомнят

А он тебя целует, говорит что любит
И ночами обнимает, к сердцу прижимает
А я мучаюсь от боли со своей любовью
Фотографии в альбоме о тебе напомнят

О тебе...

Вечером теплым гремит гроза
Снова вижу я вас вдвоем, ты улыбаешься
В сторону я отвожу глаза
Что же делаешь ты со мной, зачем издеваешься
Я ж тебя так любил, так любил
Думал, что ты ждала меня. Что же ты сделала
Я ж тебя так любил, так любил
А теперь потерял тебя
А он тебя целует, говорит что любит
И ночами обнимает, к сердцу прижимает.

Source 1, 2, 2

Classified in : Guitare - Tags : none

Tryo - L'Hymne De Nos Campagnes

Written by pmd - - 1 comment
Accords :
Dm     x 5 7 7 6 5
Bb     6 8 8 7 6 6
A      5 7 7 6 5 5

Rythme :
Dm Dm Bb A

ms

Si tu es né dans une cité HLM
Je te dédicace ce poème
En espérant qu'au fond de tes yeux ternes
Tu puisses y voir un petit brin d'herbe

Et les mans faut faire la part des choses
Il est grand temps de faire une pause
De troquer cette vie morose
Contre le parfum d'une rose

C'est l'hymne de nos campagnes
De nos rivières, de nos montagnes
De la vie man, du monde animal
Crie-le bien fort, use tes cordes vocales!

Pas de boulot, pas de diplômes
Partout la même odeur de zone
Plus rien n'agite tes neurones
Pas même le shit que tu mets dans tes cônes
Va voir ailleurs, rien ne te retient
Va vite faire quelque chose de tes mains
Ne te retourne pas ici tu n'as rien
Et sois le premier à chanter ce refrain

C'est l'hymne de nos campagnes
De nos rivières, de nos montagnes
De la vie man, du monde animal
Crie-le bien fort, use tes cordes vocales!

Assieds-toi près d'une rivière
Écoute le coulis de l'eau sur la terre
Dis-toi qu'au bout, hé! il y a la mer
Et que ça, ça n'a rien d'éphémère
Tu comprendras alors que tu n'es rien
Comme celui avant toi, comme celui qui vient
Que le liquide qui coule dans tes mains
Te servira à vivre jusqu'à demain matin!

C'est l'hymne de nos campagnes
De nos rivières, de nos montagnes
De la vie man, du monde animal
Crie-le bien fort, use tes cordes vocales!
Assieds-toi près d'un vieux chêne
Et compare le à la race humaine
L'oxygène et l'ombre qu'il t'amène
Mérite-t-il les coups de hache qui le saigne?
Lève la tête, regarde ces feuilles
Tu verras peut-être un écureuil
Qui te regarde de tout son orgueil
Sa maison est là, tu es sur le seuil

C'est l'hymne de nos campagnes
De nos rivières, de nos montagnes
De la vie man, du monde animal
Crie-le bien fort, use tes cordes vocales!
Crie-le bien fort, use tes cordes vocales!

Peut-être que je parle pour ne rien dire
Que quand tu m'écoutes tu as envie de rire
Mais si le béton est ton avenir
Dis-toi que c'est la forêt qui fait que tu respires
J'aimerais pour tous les animaux
Que tu captes le message de mes mots
Car un lopin de terre, une tige de roseau
Servira la croissance de tes marmots!
Servira la croissance de tes marmots!

C'est l'hymne de nos campagnes
De nos rivières, de nos montagnes
De la vie man, du monde animal
Crie-le bien fort, use tes cordes vocales!

C'est l'hymne de nos campagnes
De nos rivières, de nos montagnes
De la vie man, du monde animal
Crie-le bien fort, use tes cordes vocales, hey!

Source

Fix audio amplifier

Written by pmd - - no comments

Links

English

https://jestineyong.com/how-to-repair-amplifier-no-sound/
https://jestineyong.com/about-shorted-transistor/
https://audiokarma.org/forums/index.php?threads/blowing-a-power-transistor-root-cause.196876/
https://www.thegearpage.net/board/index.php?threads/what-causes-power-transistors-to-fail-solid-state-amps.945586/

French

https://www.pascalchour.fr/ressources/repar_ampli/repar_ampli.htm
http://jeanluc.rigal.free.fr/reparer_un_ampli_hi-fi.html
http://www.bedwani.ch/electro/ch14/index.htm

Russian

https://forum.cxem.net/index.php?/topic/74746-романтика-15-120-с-hi-fi/
https://forum.cxem.net/index.php?/topic/117997-романтика-15-120-с-hi-fi-не-работает/
http://radiostorage.net/3225-usilitel-romantika-15u-120-50u-220-stereo.html

What happened

The amplifier is a Романтика 15-120С. It sounds quiet nice but sometime the sound gets no so clear either on right or left speaker.
To fast improve sound quality, I unpluged and replugged AUX input 3.5 jack. Dumb but done. One day it resulted on no more sound at all.

I quickly found dead fuse F3. I took one of the fuse of the other channel and F3 died again. Dumb but done.

I put 2 working fuse on left channel, and 2 dead fuse on right channel. Switched on the amplifier. Left channel is working. Good.

After reading internet, I quickly suspected that power transistor of the right channel were shorted. It was the case.

Test a transistor


How to test a TRANSISTOR with a multimeter PNP or NPN
How to check fuses, diodes, transistors, voltage regulators
3 Ways to Check Capacitors in Circuit with Meters & Testers

Troubleshooting (eyes+multimeter)

Le fusible FU3 de l'alim +27V cramé.
Les deux transistors de puissance VT3 et VT4 en cours-circuit.
 => +27V s'est vidé en quasi direct dans le -27V (R23 et R24 de 0.22ohm sur le chemin)
R15 et R20 cramées sur la carte principale.
R17 et R23 cramées sur la carte module de la voie droite.

Power transistors that were in service before the problem

Left channel (working), original ones:

Right channel (not working), not original ones:

Intervention

Remplacement des transistors
PNP A1941 => A1943
NPN C5198 => C5200
Les nouveaux sont un peu plus gros. Il me reste à les coller sur le radiateur (je n'ai pas pu reprendre les anciens mica).

Remplacement des résistances sur la carte principale
R15 et R20. J'ai mis des 1/4W en comparant visuellement...
Ces résistances servent à prévenir l'utilisateur qu'un certain niveau de puissance a été atteint à travers l'alimentation d'une LED.

Remplacement des résistance sur la carte module
R17 100 ohm je voulais mettre 1/4W mais le vendeur n'avait plus que du 2W.
R23 0.22 ohm. A la base la résistance avait une forme de ressort (j'imagine que ces résistance doivent avoir une petit propriété inductive ?). Le vendeur n'en avait pas. J'ai hésité entre 2W et 5W. J'ai mis une 2W de forme classique.

Power transistor replacing broken ones

Fixed!

To make new PCB

https://www.pcbway.com/

Futur ?

Maybe i could use stuff like this to repair last stage: Amplifier Board - AIYIMA A2D847

 

get_throttled monitoring in Munin

Written by pmd - - no comments

Install Munin

https://angristan.fr/monitorer-serveur-linux-munin/

Make a new pluggin

$ sudo nano /usr/share/munin/plugins/getthrottled
#!/bin/sh
#
# Munin plugin for measuring the core temperature of the BCM2835 SoC on a
# Raspberry Pi.
# https://github.com/munin-monitoring/contrib/blob/master/plugins/raspberry-pi/raspi_temp
#
# $ vcgencmd get_throttled
# throttled=0x50000
#
# 111100000000000001010
# ||||             ||||_ under-voltage
# ||||             |||_ currently throttled
# ||||             ||_ arm frequency capped
# ||||             |_ soft temperature reached
# ||||_ under-voltage has occurred since last reboot
# |||_ throttling has occurred since last reboot
# ||_ arm frequency capped has occurred since last reboot
# |_ soft temperature reached since last reboot
#
#
#
#
case $1 in
    config)
        cat <<'EOM'
graph_title Core Throttled
graph_vlabel Core has already throttled since reboot
graph_category sensors
graph_args --base 1000 -l 0
getthrottled.label Throttled since start
getthrottled2.label Currently throttled
EOM
        exit 0;;
esac

echo "getthrottled2.value $(($(/opt/vc/bin/vcgencmd get_throttled | cut -c17-17)))"
echo "getthrottled.value $(($(/opt/vc/bin/vcgencmd get_throttled | cut -c13-14)))"

Then need to make it execuable :

$ sudo chmod +x /usr/share/munin/plugins/getthrottled

Test it as munin user :

$ sudo munin-run getthrottled

If you get that :

$ sudo munin-run getthrottled
getthrottled2.value i
getthrottled.value iz
$ sudo -u munin vcgencmd getthrottled
VCHI initialization failed

Somehow you will need to add munin user in the video group :

sudo usermod -a -G video munin

Or maybe that was that helped :

$ sudo nano /etc/munin/plugin-conf.d/getthrottled
[getthrottled]
user root

Then it will work :

$ sudo munin-run getthrottled
getthrottled2.value 2
getthrottled.value 20

Restart what is necessary :

$ sudo service munin-node restart

Source : http://guide.munin-monitoring.org/en/latest/develop/plugins/howto-write-plugins.html

Pâte à crêpes

Written by pmd - - no comments

Préparer la pâte à crêpes : basé sur cette recette

Pour 15 crêpes :

  • 300g de farine (=714mL mais j'ai mis seulement 600mL)
  • 3 oeufs entiers
  • 3 cuillères à soupe de sucre
  • 2 cuillères à soupe d'huile
  • 50g de beurre fondu
  • 60cl de lait
  • 5cl de rhum

Recettes :

  1. Mettre la farine dans une terrine et former un puits.
  2. Y déposer les oeufs entiers, le sucre, l'huile et le beurre.
  3. Mélanger délicatement avec un fouet en ajoutant au fur et à mesure le lait. La pâte ainsi obtenue doit avoir une consistance d'un liquide légèrement épais.
  4. Parfumer de rhum.
  5. Faire chauffer une poêle antiadhésive et la huiler très légèrement. Y verser une louche de pâte, la répartir dans la poêle puis attendre qu'elle soit cuite d'un côté avant de la retourner. Cuire ainsi toutes les crêpes à feu doux.

Alternative :

  • 250g de farine
  • 500mL de lait
  • 3 oeufs
  1. Mélanger les oeufs
  2. Rajouter la farine
  3. Puis le lait  petit à petit

 

Python 3.7 + Selenium on Raspberry Pi 3 and on Windows 10

Written by pmd - - no comments

Raspian buster

$ sudo apt-get install chromium-chromedriver xvfb
$ sudo python3 -m pip install pyvirtualdisplay selenium

Windows 10

Download Chrome. Install it.

https://chromedriver.chromium.org/getting-started

https://stackoverflow.com/questions/33150351/how-do-i-install-chromedriver-on-windows-10-and-run-selenium-tests-with-chrome

 

Python3

#!/usr/bin/python3
# -*-coding:Utf-8 -*

# Selenium
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

mg = 'tck_000003X1'
options = Options()
options.add_experimental_option("prefs", {
    #"download.default_directory": default_download_directory,
    "download.prompt_for_download": False,
    "download.directory_upgrade": True,
    "safebrowsing.enabled": True,  
})
options.add_experimental_option("excludeSwitches", ["enable-logging"])

browser = webdriver.Chrome(options=options, executable_path=r'C:\Windows\chromedriver.exe')

url = "http://ms.com/ms.html?t=" + mg
browser.get(url)
etoiles = browser.find_element_by_id("etoile_span").get_attribute('class')
print("Nombre d'étoile : " + etoiles[-1])

browser.quit()
Rss feed of the articles