For using various measurement tools like oscilloscopes, multimeters, logic analyzers etc. under Linux there is an amazing tool – sigrok. I was trying to make my cheap chinese logic analyzer LWLA1016 work and this is how I succeeded. Continue reading LWLA1016 in Linux
My patch in dvblast
my patch in dvblast:
http://git.videolan.org/gitweb.cgi/dvblast.git/?p=dvblast.git;a=commit;h=074dda7448a974d220d366bdb99b10136dc1a3f5
Heavy-duty turntable for 3D scanning
After a few try and fails to build heavy-duty turntable for scanning a whole person I came to an idea to use something that was designed to withstand the weight of an adult person.
usbip-utils 2.0 on Ubuntu
Ubuntu 15.10 contains usbip package too old to work with usbip v2.0 server (e.g. latest raspbian on RasPI) so you need to compile usbip tool from kernel sources.
UPDATE 19. 04. 2016:
You don’t need to go through compiling from source. You may just install package linux-tools-generic:
$ apt-get install linux-tools-generic
This will install precompiled usbip tools into /usr/lib/linux-tools/`uname -r`/:
$ /usr/lib/linux-tools/4.2.0-35-generic/usbip version usbip (usbip-utils 2.0)
Non-working usbip installed from usbip package
$ sudo usbip -l 192.168.1.83 - 192.168.1.83 usbip err: usbip_network.c: 119 (usbip_recv_op_common) recv op_common, -1 usbip err: vhci_attach.c: 202 (query_exported_devices) recv op_common usbip err: vhci_attach.c: 417 (show_exported_devices) query $ usbip -v ** (process:30826): WARNING **: running non-root? usbip 0.1.7 ($Id: vhci_attach.c 42 2007-09-07 12:07:51Z hirofuchi $)
DRBD quick cheat sheet
Creating volume
/etc/drbd.d/raid10.res resource raid10 { protocol B; on hostname1 { device /dev/drbd1; disk /dev/raid10_vg/drbd; address [localIP]:7789; meta-disk internal; } on hostname2 { device /dev/drbd1; disk /dev/raid10-vg/drbd; address [localIP]:7789; meta-disk internal; } }
Both nodes:
drbdadm create-md [resource] drbdadm up [resource]
Primary node:
drbdadm primary --force [resource] cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) srcversion: 6551AD2C98F533733BE558C 1: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent B r----- ns:7552704 nr:0 dw:0 dr:7552936 al:0 bm:460 lo:47 pe:12 ua:47 ap:0 ep:1 wo:f oos:97303516 [>...................] sync'ed: 7.3% (95020/102396)Mfinish: 0:15:29 speed: 104,672 (96,804) K/sec
Resize
Both nodes:
lvresize /dev/raid10-vg/drbd -L+100G Extending logical volume drbd to 200.00 GiB Logical volume drbd successfully resized
resize with resync:
drbdadm resize [resource]
resize without resync (added clean space):
drbdadm -- --assume-clean resize [resource]
Resize filesystem:
resize2fs /dev/drbd1
Fix splitbrain
slave:
drbdadm secondary all drbdadm connect --discard-my-data all
master:
drbdadm connect all
Deleting from postfix queue by regex
postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } / baddab@spammer.com/ { print $1 }' | tr -d '*!' | postsuper -d -
Using Tronsmart Pavo M9 for HDMI input streaming
Thanks to a tip of my reader, I found a relatively cheap (69Eur) Android box with HDMI input and record ability. I thought that it should be possible not only to record the HDMI input but also to stream it in realtime so I ordered one for experimenting. Continue reading Using Tronsmart Pavo M9 for HDMI input streaming
CH341A USB serial EEPROM reader under Linux
I needed to backup original firmware of my favorite Chinese wireless router but I didn’t want to spend much time with hacking the embedded Linux. So I have ordered this cheap USB serial EEPROM programmer on ebay. You can easily find the original utility & driver for Windows on the Internet but the chip manufacturer doesn’t provide software for Linux. Continue reading CH341A USB serial EEPROM reader under Linux
Installing SNMP MIBs in Ubuntu
If you get this error in zabbix autodiscovery function:
snmp_parse_oid(): cannot parse OID “IF-MIB::ifDescr”
Or if you just want to install MIBs for some other reason, do following:
Continue reading Installing SNMP MIBs in Ubuntu
Blinking LED on STM32F103 with only Linux tools
I decided to do some experiments with STM32. Continue reading Blinking LED on STM32F103 with only Linux tools