JTAG configuration – OpenOCD and OOcdlink
From time to time I fully reinstall my laptop after I mess up libraries to high degree. Last time I did that, I have lost all my OpenOCD configuration files that were in /usr/local/share/openocd. So this post is more for myself as a FYI.
OpenOCD binaries
This version is tried and tested:
justas@zaibukas:/usr/local/share/openocd/scripts$ openocd -v Open On-Chip Debugger 0.5.0 (2011-12-30-23:43) Licensed under GNU GPL v2 For bug reports, read http://openocd.berlios.de/doc/doxygen/bugs.html
Interface configuration file
VID:PID of my Oocdlink adapter is not programmed - it is vanilla values of FT2232 chip and description is not set.
justas@zaibukas:/usr/local/share/openocd/scripts$ cat interface/oocdlink1.cfg # # Joern Kaipf's OOCDLink # # http://www.joernonline.de/contrexx2/cms/index.php?page=126 # interface ft2232 #ft2232_device_desc "OOCDLink" ft2232_layout oocdlink ft2232_vid_pid 0x0403 0x6010 adapter_khz 5
openocd configuration file
Configuration file for STM32F1x series devices:
justas@zaibukas:/usr/local/share/openocd/scripts$ cat oocd_stm32vl.cfg source [find interface/oocdlink1.cfg] source [find target/stm32f1x.cfg] telnet_port 4444 gdb_port 3333
Fixing root access issues
Make a file /lib/udev/rules.d/99-libftdi.rules:
justas@zaibukas:/lib/udev/rules.d$ cat 99-libftdi.rules
BUS!="usb", ACTION!="add", SUBSYSTEM!="usb_device", GOTO="kcontrol_rules_end"
SYSFS{idProduct}=="6010", SYSFS{idVendor}=="0403", MODE="666"
LABEL="kcontrol_rules_end"
Test if it is working
justas@zaibukas:/$ openocd -f /usr/local/share/openocd/scripts/oocd_stm32vl.cfg Open On-Chip Debugger 0.5.0 (2011-12-30-23:43) Licensed under GNU GPL v2 For bug reports, read http://openocd.berlios.de/doc/doxygen/bugs.html Info : only one transport option; autoselect 'jtag' 5 kHz 1000 kHz adapter_nsrst_delay: 100 jtag_ntrst_delay: 100 cortex_m3 reset_config sysresetreq Info : clock speed 1000 kHz Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3) Info : JTAG tap: stm32.bs tap/device found: 0x06420041 (mfg: 0x020, part: 0x6420, ver: 0x0) Info : stm32.cpu: hardware has 6 breakpoints, 4 watchpoints
That's it. It's working. Time to create something nice.
Review: Amazon kindle 4
It is almost over a week that I have Amazons kindle 4 and so these are my impressions so far:
Pros:
- Light
- Superb screen
- Fast
- Ample of space (1.2 GB)
- Easy to use
- Works with linux (no proprietary software needed)
Cons:
- No epub support
- Poor PDF reader (Custom zoom levels would solve this. Now it's 150/200/300% only)
- Needs a cover and amazon's is way too expensive
So far I can live with last two, but no epub support is killing me. Also I would recommend installing calibre for your digital library management. It is one-in-all solution for digital library management in your laptop and in portable devices. So far I would give it 10 / 10.
DIY – PCB etching agitator
PCB etching agitator was something that I wanted to make for some time. So one day I decided that there is no reason to wait any further and started buying all the tools and materials needed. This blog entry will have more photos than text because there is nothing that have to be explained in much detail. So to start you will need:
- Hobby glass / Plexiglass (R)
- Saw
- Epoxy glue
- Aquarium heater (think eBay)
- Aquarium air pump (think eBay)
- Aquarium air stone (think eBay)
Once everything has arrived from China, it was time to start. First thing to do is do decide how big you want your agitator to be. Mine is 4 cm wide, 15 cm long and 20 cm tall. Length (or width) will be influenced by the size of heater element.

Parts for agitator
Picture is worth thousand works. Click continue reading to see full story with pictures and videos.
Android VPN option and settings
Android 2.2 support these VPN options:
- PPTP VPN (Point-to-Point Tunneling Protocol)
- L2TP VPN (Layer 2 Tunneling Protocol)
- L2TP/IPSec PSK (Pre-share key L2TP/IPSec)
- L2TP/IPSec CRT (Certificate based L2TP/IPSec)
PPTP VPN is a solution mostly used by Windows clients to connect to Windows VPN networks. PPTP works over two channels - control channel (TCP port 1723) and data channel using GRE. GRE channel will be used to transfer PPP data frames which in turn will encapsulate original data that is to be transferred between two end points. This VPN option is as secure as security mechanism used in PPP connection.
L2TP is tunneling protocol that runs over UDP port 1701. It does not encrypt data or verify it it any way so it is not good for keeping data secret. It is mainly used as a building block of stacked VPN solution where IPSec (or any other protocol) will provide data encryption. Bare L2TP is good if you don't care about data security and just need to have PC look as a part of remote network.
Last two options are basically the same, only difference is how shared secret is implemented. L2TP/IPSec is stack of two technologies. During first step of connection initiation secure tunnel will be created using IPSec. Once there is secure channel between end-points, L2TP will be used to create tunnel.
Pre-shared key (PSK) VPN would be used when there is no PKI infrastructure. End user must know "secret word" that lets him in the system. Certificate based (CRT) system wii require user to have certificate installed on his end-point. Certificate itself can be stored as a file on a computer or in external certificate storage space, such as USB secure key or Smart Card.
Now it's time to try and set up each option and test it out...
Simple OpenVPN configuration A to Z
From time to I have to use insecure networks (Public Wi-Fi, mobile) to access secure systems. Since I am using my laptop when doing so, I'm more concerned about security of communication channel than security of device at the end of the line. To solve this problem I decided to set up VPN gateway in my VPS server, so that I have secure communication channel always on hand.
Click continue reading to see full post...