May 282015
 

If you get an error message like

Traceback (most recent call last):
  File "./append_to_hdf5.py", line 81, in <module>
    main()
  File "./append_to_hdf5.py", line 63, in main
    store.append('df', df, format='t', complib=None)
  File "/home/philipp/.pyvenv/playground-3.4/lib/python3.4/site-packages/pandas/io/pytables.py", line 904, in append
    **kwargs)
  File "/home/philipp/.pyvenv/playground-3.4/lib/python3.4/site-packages/pandas/io/pytables.py", line 1260, in _write_to_group
    s.write(obj=value, append=append, complib=complib, **kwargs)
  File "/home/philipp/.pyvenv/playground-3.4/lib/python3.4/site-packages/pandas/io/pytables.py", line 3753, in write
    **kwargs)
  File "/home/philipp/.pyvenv/playground-3.4/lib/python3.4/site-packages/pandas/io/pytables.py", line 3434, in create_axes
    raise e
  File "/home/philipp/.pyvenv/playground-3.4/lib/python3.4/site-packages/pandas/io/pytables.py", line 3429, in create_axes
    **kwargs)
  File "/home/philipp/.pyvenv/playground-3.4/lib/python3.4/site-packages/pandas/io/pytables.py", line 1848, in set_atom
    encoding)
  File "/home/philipp/.pyvenv/playground-3.4/lib/python3.4/site-packages/pandas/io/pytables.py", line 1892, in set_atom_string
    eci = existing_col.validate_col(itemsize)
  File "/home/philipp/.pyvenv/playground-3.4/lib/python3.4/site-packages/pandas/io/pytables.py", line 1560, in validate_col
    "these columns" % (itemsize, self.cname, c.itemsize))
ValueError: Trying to store a string with len [42] in [values_block_0] column but this column has a limit of [18]!
Consider using min_itemsize to preset the sizes on these columns

Then you should add min_itemsize=200 to your call of store.append().

May 232015
 

Model No: 22809/20131219AKE

Hardware details as seen by Linux 3.17

The jumper positions are stupid…

Pin 1 is near to the internal SATA ports, pin 3 is near the PCIe slot. You can also follow the traces on the black PCB.

Fix for optical drives (as found here):

UPDATE: Unter Linux braucht man für optische Laufwerke an diesem Controller den Kernelparameter: libata.atapi_passthru16=0

head /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet pci=assign-busses console=tty0 console=ttyS1,115200n8 libata.atapi_passthru16=0"
#GRUB_CMDLINE_LINUX_DEFAULT="quiet pci=assign-busses console=tty0 console=ttyS1,115200n8"
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Apr 282015
 

Commands you enter on the Linux command line are valuable. They are part of your computer knowledge, you should remember them. If you don’t, [Ctrl]-[r] will come to your rescue to search your Bash history for commands you entered in the past. But your Bash is forgetful by default. Only the very last commands will be kept in the Bash history file ~/.bash_history. If you want it to remember more of your previously entered commands including preciously crafted arguments and parameters, add these lines to your ~/.bash_profile:

Apr 262015
 

Hackaday Finding a Cheaper USB to Serial Chip

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Apr 232015
 

I paid £30.00 for the Huawei E5332 Unlocked Mobile Wi-Fi Modem on Amazon UK.

It has a TS9 antenna connector (source).

There’s an Android app to control/monitor it: HUAWEI Mobile WiFi 3

Default Settings

HTTP XML-API

The website of the router makes extensive use of an XML-API. Some of the URLs are listed here:

I wrote a Python tool to access these APIs:
https://github.com/pklaus/Huawei-E5332

Apr 132015
 

Gramps is a very versatile desktop software to do genealogical research. The software is open source, works on all major desktop operating systems and has a great community. It resides at https://gramps-project.org/.

Its Wikipedia article is also very interesting!

Starting Gramps in a language different to your operating system language

My operating system is in English. This makes developing software and finding solutions for problems easier. But for Gramps it’s helpful to have the terms of the tool in my first language, German. To start it in German while my system language is English, run paste these commands into the Terminal application (and press [Enter]):

Apr 042015
 

Installing perlbrew is a one-liner:

curl -L http://install.perlbrew.pl | bash

Add this lines to your ~/.bashrc:

source ~/perl5/perlbrew/etc/bashrc

To get a stable perl distribution, do:

perlbrew install stable

To use it, run:

perlbrew list
perlbrew switch perl-5.20.2

To upgrade to the latest stable Perl distribution at a later point:

perlbrew install stable
# Remove previous versions (check with perlbrew list):
#perlbrew uninstall perl-5.18.1
# Remove downloaded tarballs and build directory
perlbrew clean

Resources

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Apr 012015
 

The Rohde & Schwarz HMC 8043: A 3 channel power supply 0-32V, max. 3A, 100W.

  • Total output power: 100W
  • Maximum current per channel: 3A for HMC8043
  • Half-19″ form factor, rack mountable
  • FuseLink, FuseDelay, EasyArb, EasyRamp
  • LXI, LAN, USB (TMC and virtual COM port)
  • Data logging directly to flash drive (csv file)

Network Communication

The default ports are:

  • Raw TCP: Port 5025
  • VXI: Port 1024

Raw TCP Communication

netcat 192.168.0.139 5025

Rohde&Schwarz,HMC8043,022156925,HW42000000,SW01.202
*IDN?
Rohde&Schwarz,HMC8043,022156925,HW42000000,SW01.202

SCPI Commands

From the SCPI commands manual (to be found in the resources section).

CMD Meaning
Mar 302015
 

HMP4000 front HMP4000 side

Key Facts

  • HMP4030: 3 × 0 V to 32 V/0 A to 10 A (384 W)
  • HMP4040: 4 × 0 V to 32 V/0 A to 10 A (384 W)
  • Low residual ripple due to linear postregulators
  • Realtime voltage, current and power values
  • High setting and readback resolution:
    1 mV and 0.1/0.2/1.0 A (depending on current and model)
  • FuseLink (electronic fuse) freely combinable for all channels
  • FuseDelay tunable up to 250 ms
  • EasyArb function directly programmable on device
  • PC software (free of charge) for easy generation of user-defined waveforms
Feb 222015
 

http://www.harbaum.org/till/i2c_tiny_usb/index.shtml

Usage

When you plug it in, dmesg should report a new device. Here is my ouput of dmesg and lsusb -v.

Usage on the command line

i2cdetect

Get it on Arch Linux:

sudo pacman -S i2c-tools
sudo modprobe i2c-dev

Detect I2C devices:

i2cdetect -l

check detailed capabilities of device 3 ( /dev/i2c-3 ):

sudo i2cdetect -F 3

Till Harbaum’s testapp:

sudo rmmod i2c_tiny_usb
cd ~/Downloads/i2c_tiny_usb/testapp
make
sudo ./i2c_usb

returns