<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title><![CDATA[Dobrica Pavlinušić's random unstructured stuff: howto]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?action=weblog_display;category=howto</link>
<description></description>
<pubDate>Tue, 04 Sep 2018 06:30:29 -0000</pubDate>
<webMaster>root@saturn.ffzg.hr</webMaster>
<generator>Socialtext Workspace v2.19.0.2</generator>

<item>
<title><![CDATA[RaspberryPi]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?raspberrypi</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: howto</div><hr/><div class="wiki">
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/mount-rpi-image.sh?action=attachments_download;page_name=raspberrypi;id=20151206192857-0-4730">mount-rpi-image.sh</a><!-- wiki: {file: mount-=rpi-=image.sh} --></span><br /><br /><div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#interestring_projects">Dobrica Pavlinušić's random unstructured stuff (Interestring projects)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Interestring projects} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#development">Dobrica Pavlinušić's random unstructured stuff (development)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] development} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#ov7670">Dobrica Pavlinušić's random unstructured stuff (OV7670)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] OV7670} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#dht11_dht22">Dobrica Pavlinušić's random unstructured stuff (DHT11/DHT22)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] DHT11/DHT22} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#blinkm_i2c">Dobrica Pavlinušić's random unstructured stuff (BlinkM + i2c)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] BlinkM + i2c} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#cec_control_your_tv">Dobrica Pavlinušić's random unstructured stuff (CEC - control your TV)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] CEC -= control your TV} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#tv_on">Dobrica Pavlinušić's random unstructured stuff (TV on)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] TV on} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#hints_from_forum">Dobrica Pavlinušić's random unstructured stuff (Hints from forum)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Hints from forum} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#screen_saver">Dobrica Pavlinušić's random unstructured stuff (screen saver)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] screen saver} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#youtube_transcoding_in_vlc">Dobrica Pavlinušić's random unstructured stuff (YouTube transcoding in VLC)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] YouTube transcoding in VLC} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#education_materials">Dobrica Pavlinušić's random unstructured stuff (Education materials)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Education materials} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#raspberry_pi_accessories_starter_kit">Dobrica Pavlinušić's random unstructured stuff (Raspberry Pi Accessories Starter Kit)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Raspberry Pi Accessories Starter Kit} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#gpu">Dobrica Pavlinušić's random unstructured stuff (GPU)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] GPU} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#arduino">Dobrica Pavlinušić's random unstructured stuff (Arduino)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Arduino} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#jtag">Dobrica Pavlinušić's random unstructured stuff (JTAG)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] JTAG} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#arduino_promini_3_3v_8mhz">Dobrica Pavlinušić's random unstructured stuff (Arduino ProMini 3.3V 8MHz)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Arduino ProMini 3.3V 8MHz} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#disable_serial_port_console">Dobrica Pavlinušić's random unstructured stuff (Disable serial port console)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Disable serial port console} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#connect_arduino_serial">Dobrica Pavlinušić's random unstructured stuff (connect Arduino serial)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] connect Arduino serial} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#flasing">Dobrica Pavlinušić's random unstructured stuff (flasing)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] flasing} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#ds1307_tiny_rtc">Dobrica Pavlinušić's random unstructured stuff (DS1307 Tiny RTC)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] DS1307 Tiny RTC} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#ds18b20">Dobrica Pavlinušić's random unstructured stuff (DS18B20)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] DS18B20} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#avrdude">Dobrica Pavlinušić's random unstructured stuff (avrdude)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] avrdude} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#logic_analyzer">Dobrica Pavlinušić's random unstructured stuff (logic analyzer)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] logic analyzer} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#rotary_encoder">Dobrica Pavlinušić's random unstructured stuff (rotary encoder)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] rotary encoder} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#swd">Dobrica Pavlinušić's random unstructured stuff (SWD)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] SWD} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#pic">Dobrica Pavlinušić's random unstructured stuff (PIC)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] PIC} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#esp8089">Dobrica Pavlinušić's random unstructured stuff (esp8089)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] esp8089} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#ps_2_gpio">Dobrica Pavlinušić's random unstructured stuff (PS/2 GPIO)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] PS/2 GPIO} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#gpio_header_annotations">Dobrica Pavlinušić's random unstructured stuff (GPIO header annotations)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] GPIO header annotations} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#signal_generator">Dobrica Pavlinušić's random unstructured stuff (Signal generator)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Signal generator} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#lcd_panels">Dobrica Pavlinušić's random unstructured stuff (LCD panels)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] LCD panels} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#pi_zero_usb_otg">Dobrica Pavlinušić's random unstructured stuff (Pi Zero USB OTG)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Pi Zero USB OTG} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#pata_ide_emulation">Dobrica Pavlinušić's random unstructured stuff (PATA IDE emulation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] PATA IDE emulation} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#dpi_lcd_screen">Dobrica Pavlinušić's random unstructured stuff (DPI LCD screen)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] DPI LCD screen} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#i2c_clock_stretching">Dobrica Pavlinušić's random unstructured stuff (i2c clock stretching)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] i2c clock stretching} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                <a href="/rot13/index.cgi?action=weblog_display;category=raspberrypi">Recent Changes in Tag raspberrypi</a>
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<br /><ul>
<li><span class="nlw_phrase"><a title="inter-workspace link: rot13" href="https://saturn.ffzg.hr/rot13/index.cgi?raspios">raspios</a><!-- wiki: {link: [raspios]} --></span></li>
<li><span class="nlw_phrase"><a title="inter-workspace link: rot13" href="https://saturn.ffzg.hr/rot13/index.cgi?pcf8591">PCF8591</a><!-- wiki: {link: [PCF8591]} --></span></li>
<li><span class="nlw_phrase"><a title="inter-workspace link: rot13" href="https://saturn.ffzg.hr/rot13/index.cgi?ov7670">OV7670</a><!-- wiki: {link: [OV7670]} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {tag_list: raspberrypi}
--></div><br /><br /><h1 id="interestring_projects">Interestring projects</h1>
<p>
TODO: test them out and write full description on this wiki :-)</p>
<ul>
<li>FreeLSS is a laser scanning program for the Raspberry Pi. It allows a Raspberry Pi to function as the core to a complete turn table laser scanning system.</li>

<ul>
<li><a target="_blank" title="(external link)" href="https://github.com/hairu/freelss">https://github.com/hairu/freelss</a></li>
</ul>
<li>PWM on the Raspberry pi - done properly (in hardware, stable)</li>

<ul>
<li><a target="_blank" title="(external link)" href="https://github.com/sarfata/pi-blaster">https://github.com/sarfata/pi-blaster</a></li>
</ul>
<li><a target="_blank" title="(external link)" href="https://github.com/ali1234/raspi-teletext">https://github.com/ali1234/raspi-teletext</a></li>
<li><a target="_blank" title="(external link)" href="https://github.com/jgarff/rpi_ws281x">https://github.com/jgarff/rpi_ws281x</a></li>
</ul>
<ul>
<li>u-boot on sdcard for nfs boot: <a target="_blank" title="(external link)" href="http://elinux.org/RPi_U-Boot">http://elinux.org/RPi_U-Boot</a></li>
</ul>
<ul>
<li>RF transmitter for Raspberry Pi <a target="_blank" title="(external link)" href="https://github.com/F5OEO/rpitx">https://github.com/F5OEO/rpitx</a></li>
</ul>
<h1 id="development">development</h1>
<ul>
<li>distcc setup <a target="_blank" title="(external link)" href="http://openframeworks.cc/setup/raspberrypi/Raspberry-Pi-DISTCC-guide.html">http://openframeworks.cc/setup/raspberrypi/Raspberry-Pi-DISTCC-guide.html</a></li>
<li>RPi (Raspbian arm) chroot on x86 Linux <a target="_blank" title="(external link)" href="http://dev.xff.lt/b/archives/2015/01/11/rpi_raspbian_arm_chroot_on_x86_linux/">http://dev.xff.lt/b/archives/2015/01/11/rpi_raspbian_arm_chroot_on_x86_linux/</a></li>

<ul>
<li><a target="_blank" title="(external link)" href="https://wiki.debian.org/QemuUserEmulation">https://wiki.debian.org/QemuUserEmulation</a> <a target="_blank" title="(external link)" href="https://wiki.debian.org/RaspberryPi/qemu-user-static">https://wiki.debian.org/RaspberryPi/qemu-user-static</a></li>
</ul></ul>
<h1 id="ov7670"><a href="https://saturn.ffzg.hr/rot13/index.cgi?ov7670" title="(136 months)  toc References http embeddedprogrammer.blogspot.com 2012 07 hacking-ov7670-camera-module-sccb-cheat...">OV7670</a></h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.raspberrypi.org/phpBB3/viewtopic.php?uid=25856&amp;f=44&amp;t=11839&amp;start=0">http://www.raspberrypi.org/phpBB3/viewtopic.php?uid=25856&amp;f=44&amp;t=11839&amp;start=0</a></li>
</ul>
<h1 id="dht11_dht22">DHT11/DHT22</h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.tortosaforum.com/raspberrypi/dht11driver.htm">http://www.tortosaforum.com/raspberrypi/dht11driver.htm</a></li>
<li><a target="_blank" title="(external link)" href="http://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/overview">http://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/overview</a></li>
</ul>
<h1 id="blinkm_i2c"><a href="https://saturn.ffzg.hr/rot13/index.cgi?BlinkM" title="[click to create page]" class="incipient">BlinkM</a> + i2c</h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.raspberrypi.org/forums/viewtopic.php?t=11969">http://www.raspberrypi.org/forums/viewtopic.php?t=11969</a></li>
</ul>
<h1 id="cec_control_your_tv">CEC - control your TV</h1>
<p>
<a target="_blank" title="(external link)" href="http://www.raspberrypi.org/forum/viewtopic.php?f=35&amp;t=15749">http://www.raspberrypi.org/forum/viewtopic.php?f=35&amp;t=15749</a></p>
<pre>
root@raspberrypi:/home/pi# git clone https://github.com/Pulse-Eight/libcec.git
root@raspberrypi:/home/pi# cd libcec/
root@raspberrypi:/home/pi/libcec# apt-get install autoconf automake libtool liblockdev1-dev libudev-dev libraspberrypi-dev
root@raspberrypi:/home/pi/libcec# sh -x bootstrap
root@raspberrypi:/home/pi/libcec# ./configure --with-rpi-include-path=/opt/vc/include/ --with-rpi-lib-path=/opt/vc/lib/

##############################################################################

libCEC version 2:1:0 configured

Compilation flags:
  CXXFLAGS :       -g -O2 -fPIC -Wall -Wextra -Wno-missing-field-initializers  -Wno-psabi
  libCEC LDFLAGS : -lbcm_host -llockdev -lrt -ldl -lpthread  -L/opt/vc/lib/ -lvcos -lvchiq_arm -ludev  
  client LDFLAGS : -lrt -ldl -lpthread 

Configured features:
  Pulse-Eight CEC Adapter :             yes
  Pulse-Eight CEC Adapter detection :   yes
  Raspberry Pi support :                yes
  TDA995x support :                     no

You can now build libCEC by running:
  make

##############################################################################

make install
</pre>
<br /><h2 id="tv_on">TV on</h2>
<pre>
pi@raspberrypi ~ $ echo &quot;on 0&quot; | cec-client -s
</pre>
<br /><h1 id="hints_from_forum">Hints from forum</h1>
<h2 id="screen_saver">screen saver</h2>
<p>
<a target="_blank" title="(external link)" href="http://www.raspberrypi.org/phpBB3/viewtopic.php?p=84831#p84831">http://www.raspberrypi.org/phpBB3/viewtopic.php?p=84831#p84831</a></p>
<pre>
# prevent screensaver from powering down display
setterm -blank 0 -powerdown 0 &gt; /dev/tty0

# clear the display and turn off the flashing cursor
clear &gt; /dev/tty0
setterm -cursor 0 &gt; /dev/tty0

# turn the cursor back on when done with omxplayer
setterm -cursor 1 &gt; /dev/tty0
</pre>
<br /><h2 id="youtube_transcoding_in_vlc">YouTube transcoding in VLC</h2>
<p>
<a target="_blank" title="(external link)" href="http://www.raspberrypi.org/phpBB3/viewtopic.php?p=163658#p163658">http://www.raspberrypi.org/phpBB3/viewtopic.php?p=163658#p163658</a></p>
<pre>
cvlc 'youtube.com/watch?v=XXXXXXXXXX' :sout='#transcode{vcodec=h264,vb=0,fps=0,scale=0,height=720,acodec=mp4a,ab=128,channels=2,samplerate=44100}:http{mux=ffmpeg{mux=flv},dst=:8080/youtube}' :sout-keep
</pre>
<br /><h1 id="education_materials">Education materials</h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://pi.cs.man.ac.uk/download/Raspberry_Pi_Education_Manual.pdf">http://pi.cs.man.ac.uk/download/Raspberry_Pi_Education_Manual.pdf</a></li>
<li><a target="_blank" title="(external link)" href="http://www.ocr.org.uk/qualifications/by-subject/computing/raspberry-pi/">http://www.ocr.org.uk/qualifications/by-subject/computing/raspberry-pi/</a></li>
<li><a target="_blank" title="(external link)" href="http://www.cl.cam.ac.uk/projects/raspberrypi/">http://www.cl.cam.ac.uk/projects/raspberrypi/</a></li>
</ul>
<h1 id="raspberry_pi_accessories_starter_kit">Raspberry Pi Accessories Starter Kit</h1>
<p>
<a target="_blank" title="(external link)" href="http://www.conrad.com/ce/en/product/409208/Raspberry-Pi-Accessories-Starter-Kit?ref=searchDetail">http://www.conrad.com/ce/en/product/409208/Raspberry-Pi-Accessories-Starter-Kit?ref=searchDetail</a></p>
<ul>
<li>1x Rapberry sticker</li>
</ul>
<ul>
<li>Power supply for the Raspberry</li>
<li>Sturdy acrylic housing, which includes all possible connections for this Raspberry and perfectly protects</li>
<li>4 GB SD card to store your programs</li>

<ul>
<li><a target="_blank" title="(external link)" href="https://learn.adafruit.com/adafruit-raspberry-pi-lesson-1-preparing-and-sd-card-for-your-raspberry-pi">https://learn.adafruit.com/adafruit-raspberry-pi-lesson-1-preparing-and-sd-card-for-your-raspberry-pi</a></li>
</ul>
<li>USB Micro Card Reader</li>
<li>USB cable (for power supply or the power supply of a PC)</li>
<li>3 m Ethernet cable</li>

<ul>
<li><a target="_blank" title="(external link)" href="https://learn.adafruit.com/adafruits-raspberry-pi-lesson-6-using-ssh">https://learn.adafruit.com/adafruits-raspberry-pi-lesson-6-using-ssh</a></li>
<li><a target="_blank" title="(external link)" href="https://learn.adafruit.com/adafruit-raspberry-pi-lesson-7-remote-control-with-vnc">https://learn.adafruit.com/adafruit-raspberry-pi-lesson-7-remote-control-with-vnc</a></li>
</ul>
<li>TTL USB cable</li>

<ul>
<li><a target="_blank" title="(external link)" href="https://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable/test-and-configure">https://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable/test-and-configure</a></li>
</ul>
<li>PI Cobbler (KIT hereby connect the RP with other circuit boards)</li>
<li>Large breadboard circuit</li>
<li>Colored board cable connector</li>
</ul>
<ul>
<li>5x 560 ohm resistors (for LEDS)</li>
<li>3x LED's (red, green, blue)</li>

<ul>
<li><a target="_blank" title="(external link)" href="https://learn.adafruit.com/raspberry-pi-e-mail-notifier-using-leds">https://learn.adafruit.com/raspberry-pi-e-mail-notifier-using-leds</a></li>
<li><a target="_blank" title="(external link)" href="https://learn.adafruit.com/debugging-with-the-raspberry-pi-webide/debug-a-blinking-led">https://learn.adafruit.com/debugging-with-the-raspberry-pi-webide/debug-a-blinking-led</a></li>
</ul>
<li>5x 10K resistors (for buttons)</li>
<li>3x pushbutton</li>

<ul>
<li><a target="_blank" title="(external link)" href="https://learn.adafruit.com/playing-sounds-and-using-buttons-with-raspberry-pi/bread-board-setup-for-input-buttons">https://learn.adafruit.com/playing-sounds-and-using-buttons-with-raspberry-pi/bread-board-setup-for-input-buttons</a></li>
</ul>
<li>1x photocell</li>

<ul>
<li><a target="_blank" title="(external link)" href="https://learn.adafruit.com/basic-resistor-sensor-reading-on-raspberry-pi/basic-photocell-reading">https://learn.adafruit.com/basic-resistor-sensor-reading-on-raspberry-pi/basic-photocell-reading</a></li>
</ul>
<li>1x 1uf capacitor (for photocell)</li>
</ul>
<h1 id="gpu">GPU</h1>
<ul>
<li>FFT</li>

<ul>
<li><a target="_blank" title="(external link)" href="http://www.raspberrypi.org/accelerating-fourier-transforms-using-the-gpu/">http://www.raspberrypi.org/accelerating-fourier-transforms-using-the-gpu/</a></li>
<li><a target="_blank" title="(external link)" href="https://github.com/raspberrypi/userland/tree/master/host_applications/linux/apps/hello_pi/hello_fft/qasm">https://github.com/raspberrypi/userland/tree/master/host_applications/linux/apps/hello_pi/hello_fft/qasm</a></li>
</ul>
<li>SHA-256</li>

<ul>
<li><a target="_blank" title="(external link)" href="http://rpiplayground.wordpress.com/">http://rpiplayground.wordpress.com/</a></li>
<li><a target="_blank" title="(external link)" href="https://github.com/elorimer/rpi-playground/tree/master/QPU">https://github.com/elorimer/rpi-playground/tree/master/QPU</a></li>
</ul>
<li>Machine learning - the Deep Belief image recognition SDK</li>

<ul>
<li><a target="_blank" title="(external link)" href="http://petewarden.com/2014/06/09/deep-learning-on-the-raspberry-pi/">http://petewarden.com/2014/06/09/deep-learning-on-the-raspberry-pi/</a></li>
<li><a target="_blank" title="(external link)" href="http://scientistnobee.wordpress.com/2014/06/20/machine-learning-with-raspberry-pi/">http://scientistnobee.wordpress.com/2014/06/20/machine-learning-with-raspberry-pi/</a></li>
</ul></ul>
<h1 id="arduino">Arduino</h1>
<ul>
<li>Connect using I2C <a target="_blank" title="(external link)" href="http://www.pihomeserver.fr/en/2013/08/13/raspberry-pi-home-server-arduino-lier-les-deux-via-bus-i2c/">http://www.pihomeserver.fr/en/2013/08/13/raspberry-pi-home-server-arduino-lier-les-deux-via-bus-i2c/</a></li>
</ul>
<h1 id="jtag">JTAG</h1>
<ul>
<li><a target="_blank" title="(external link)" href="https://github.com/synthetos/PiOCD/wiki/Using-a-Raspberry-Pi-as-a-JTAG-Dongle">https://github.com/synthetos/PiOCD/wiki/Using-a-Raspberry-Pi-as-a-JTAG-Dongle</a></li>
</ul>
<h1 id="arduino_promini_3_3v_8mhz">Arduino ProMini 3.3V 8MHz</h1>
<h2 id="disable_serial_port_console">Disable serial port console</h2>
<p>
edit <tt>/boot/cmdline.txt</tt> and remove all ttyAMA0 leaving:</p>
<pre>
pi@raspberrypi ~ $ cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait bcm2708.w1_gpio_pin=4
</pre>
<br /><p>
also, comment out ttyAMA0 in <tt>/etc/inittab</tt></p>
<h2 id="connect_arduino_serial">connect Arduino serial</h2>
<p>
RX-&gt;TX<br />
TX-&gt;RX</p>
<p>
<a target="_blank" title="(external link)" href="https://github.com/dpavlin/avrdude-rpi/tree/fix_channel_in_use">https://github.com/dpavlin/avrdude-rpi/tree/fix_channel_in_use</a></p>
<p>
pin definitions in GPIO.RPi are physical pins on board <strong>not</strong> BCM or wiring ip!</p>
<span class="nlw_phrase"><img alt="gpio1.png" src="https://saturn.ffzg.hr/rot13/index.cgi/gpio1.png?action=attachments_download;page_name=raspberrypi;id=20141123131834-0-10839" /><!-- wiki: {image: gpio1.png} --></span><br /><br /><h2 id="flasing">flasing</h2>
<pre>
dpavlin@blue:~/Arduino/RF433_Sockets$ scp /tmp/build*.tmp/*.hex pi@rpi.tv:/tmp/
RF433_Sockets.cpp.hex                                        100%   19KB  18.6KB/s   00:00

pi@raspberrypi ~ $ cat avrdude.sh 
#!/bin/sh
hex=`ls -t /tmp/*.hex | head -1`
echo &quot;flash hex: $hex&quot;
sudo /home/pi/avrdude-rpi/avrdude-autoreset -C /home/pi/avrdude.conf -v -v -patmega328p -carduino -P/dev/ttyAMA0 -b57600 -D -Uflash:w:$hex:i 

pi@raspberrypi ~ $ ./avrdude.sh
flash hex: /tmp/RF433_Sockets.cpp.hex

avrdude: Version 6.1, compiled on Sep 17 2014 at 05:41:35
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is &quot;/home/pi/avrdude.conf&quot;
         User configuration file is &quot;/root/.avrduderc&quot;
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyAMA0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
done with autoreset
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: reading input file &quot;/tmp/RF433_Sockets.cpp.hex&quot;
avrdude: writing flash (6770 bytes):

Writing | ################################################## | 100% 1.98s

avrdude: 6770 bytes of flash written
avrdude: verifying flash memory against /tmp/RF433_Sockets.cpp.hex:
avrdude: load data flash data from input file /tmp/RF433_Sockets.cpp.hex:
avrdude: input file /tmp/RF433_Sockets.cpp.hex contains 6770 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.49s

avrdude: verifying ...
avrdude: 6770 bytes of flash verified

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK (E:00, H:00, L:00)
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe

avrdude done.  Thank you.

strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
</pre>
<br /><h1 id="ds1307_tiny_rtc">DS1307 Tiny RTC</h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.instructables.com/id/Set-up-Real-Time-Clock-RTC-on-Raspberry-Pi/">http://www.instructables.com/id/Set-up-Real-Time-Clock-RTC-on-Raspberry-Pi/</a></li>
<li><a target="_blank" title="(external link)" href="http://electronics.stackexchange.com/questions/98361/how-to-modify-ds1307-rtc-to-use-3-3v-for-raspberry-pi">http://electronics.stackexchange.com/questions/98361/how-to-modify-ds1307-rtc-to-use-3-3v-for-raspberry-pi</a></li>
</ul>
<p>
Check if module has 5V pull-up I2C resistors! If it does (like Tiny RTC has R2 and R3) you will have to remove them.</p>
<span class="nlw_phrase"><img alt="tiny-rtc-3.3v-remote-r2-r3.jpg" src="https://saturn.ffzg.hr/rot13/index.cgi/tiny-rtc-3.3v-remote-r2-r3.jpg?action=attachments_download;page_name=raspberrypi;id=20150424100102-0-26740" /><!-- wiki: {image: tiny-=rtc-=3.3v-=remote-=r2-=r3.jpg} --></span><br /><br /><pre>
root@raspberrypi:/home/pi# apt-get install i2c-tools

root@raspberrypi:/home/pi# modprobe i2c-dev

root@raspberrypi:/home/pi# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

root@raspberrypi:/home/pi# modprobe rtc-ds1307

root@raspberrypi:/home/pi# echo ds1307 0x68 &gt; /sys/class/i2c-adapter/i2c-1/new_device

root@raspberrypi:/home/pi# hwclock --systohc -D --noadjfile --utc
hwclock from util-linux 2.20.1
Using /dev interface to clock.
Assuming hardware clock is kept in UTC time.
Time elapsed since reference time has been 0.722720 seconds.
Delaying further to reach the new time.
Setting Hardware Clock to 11:53:41 = 1429876421 seconds since 1969
ioctl(RTC_SET_TIME) was successful.
</pre>
<br /><h2 id="ds18b20">DS18B20</h2>
<pre>
root@raspberrypi:/home/pi# grep w1 /boot/config.txt 
dtoverlay=w1-gpio

# reboot

root@raspberrypi:/home/pi# cat /sys/bus/w1/devices/28-0000043c5507/w1_slave 
50 05 4b 46 7f ff 0c 10 1c : crc=1c YES
50 05 4b 46 7f ff 0c 10 1c t=85000
</pre>
<br /><p>
Hmm, you will also want to remove R1 pullup to make it work?</p>
<h1 id="avrdude">avrdude</h1>
<p>
Using Raspberry Pi as Arduino ISP programmer</p>
<ul>
<li><a target="_blank" title="(external link)" href="https://github.com/onandoffables/avrdude-linuxgpio">https://github.com/onandoffables/avrdude-linuxgpio</a></li>
</ul>
<pre>
root@raspberrypi:/home/pi# avrdude -c linuxgpio -p atmega328p

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f

avrdude: safemode: Fuses OK (E:05, H:DA, L:FF)

avrdude done.  Thank you.
</pre>
<br /><h1 id="logic_analyzer">logic analyzer</h1>
<ul>
<li>bare metal: <a target="_blank" title="(external link)" href="https://github.com/tuxyme/metal-pi">https://github.com/tuxyme/metal-pi</a></li>
<li>Panalyzer - a RaspberryPi based Logic Analyzer <a target="_blank" title="(external link)" href="https://github.com/richardghirst/Panalyzer">https://github.com/richardghirst/Panalyzer</a></li>
</ul>
<h1 id="rotary_encoder">rotary encoder</h1>
<p>
<a target="_blank" title="(external link)" href="http://www.bobrathbone.com/raspberrypi_rotary.htm">http://www.bobrathbone.com/raspberrypi_rotary.htm</a></p>
<h1 id="swd">SWD</h1>
<p>
<a target="_blank" title="(external link)" href="http://www.disk91.com/2015/technology/programming/swd-programming-using-a-raspberrypi/">http://www.disk91.com/2015/technology/programming/swd-programming-using-a-raspberrypi/</a><br />
<a target="_blank" title="(external link)" href="https://github.com/disk91/PySWD">https://github.com/disk91/PySWD</a></p>
<pre>
pi@raspberrypi ~ $ git clone https://github.com/disk91/PySWD
pi@raspberrypi ~ $ cd PySWD/

</pre>
<br /><h1 id="pic">PIC</h1>
<ul>
<li>rpp - PIC Programmer using GPIO <a target="_blank" title="(external link)" href="http://holdenc.altervista.org/rpp/">http://holdenc.altervista.org/rpp/</a></li>
<li><a target="_blank" title="(external link)" href="http://mujweb.cz/tlc/rpp/">http://mujweb.cz/tlc/rpp/</a></li>
<li><a target="_blank" title="(external link)" href="https://www.raspberrypi.org/forums/viewtopic.php?f=44&amp;t=14689&amp;start=75">https://www.raspberrypi.org/forums/viewtopic.php?f=44&amp;t=14689&amp;start=75</a></li>
<li><a target="_blank" title="(external link)" href="https://github.com/oh7bf/PiPIC">https://github.com/oh7bf/PiPIC</a></li>
<li><a target="_blank" title="(external link)" href="https://github.com/WallaceIT/picberry">https://github.com/WallaceIT/picberry</a></li>
</ul>
<h1 id="esp8089">esp8089</h1>
<ul>
<li><a target="_blank" title="(external link)" href="https://hackaday.io/project/8678-rpi-wifi-hat">https://hackaday.io/project/8678-rpi-wifi-hat</a></li>
<li><a target="_blank" title="(external link)" href="https://github.com/al177/esp8089">https://github.com/al177/esp8089</a></li>
</ul>
<h1 id="ps_2_gpio">PS/2 GPIO</h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.deater.net/weave/vmwprod/hardware/pi-ps2/">http://www.deater.net/weave/vmwprod/hardware/pi-ps2/</a></li>

<ul>
<li><a target="_blank" title="(external link)" href="https://github.com/deater/vmw-meter/blob/master/pi-ps2/linux-kernel/pi-ps2gpio.c">https://github.com/deater/vmw-meter/blob/master/pi-ps2/linux-kernel/pi-ps2gpio.c</a></li>
</ul></ul>
<h1 id="gpio_header_annotations">GPIO header annotations</h1>
<ul>
<li><a target="_blank" title="(external link)" href="https://github.com/splitbrain/rpibplusleaf/tree/master">https://github.com/splitbrain/rpibplusleaf/tree/master</a></li>
</ul>
<h1 id="signal_generator">Signal generator</h1>
<ul>
<li><a target="_blank" title="(external link)" href="https://github.com/JamesP6000/WsprryPi">https://github.com/JamesP6000/WsprryPi</a></li>
</ul>
<pre>
pi@rpi2 ~/WsprryPi $ sudo ./wspr --test-tone 1000000
A test tone will be generated at frequency 1.000000 MHz

Using local mbox device file with major 249.
Transmitting test tone on frequency 1.000000 MHz
Press CTRL-C to exit!
</pre>
<br /><ul>
<li><a target="_blank" title="(external link)" href="http://github.com/gryrmln/RPi_Wobbulator">http://github.com/gryrmln/RPi_Wobbulator</a></li>
</ul>
<h1 id="lcd_panels">LCD panels</h1>
<p>
<a target="_blank" title="(external link)" href="http://blog.reasonablycorrect.com/raw-dpi-raspberry-pi/">http://blog.reasonablycorrect.com/raw-dpi-raspberry-pi/</a></p>
<h1 id="pi_zero_usb_otg">Pi Zero USB OTG</h1>
<p>
libcomposite</p>
<ul>
<li><a target="_blank" title="(external link)" href="http://isticktoit.net/?p=1383">http://isticktoit.net/?p=1383</a></li>
</ul>
<h1 id="pata_ide_emulation">PATA IDE emulation</h1>
<ul>
<li><a target="_blank" title="(external link)" href="https://www.retrotronics.org/home-page/netpi-ide/">https://www.retrotronics.org/home-page/netpi-ide/</a></li>
</ul>
<h1 id="dpi_lcd_screen">DPI LCD screen</h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://blog.reasonablycorrect.com/raw-dpi-raspberry-pi/">http://blog.reasonablycorrect.com/raw-dpi-raspberry-pi/</a></li>
<li><a target="_blank" title="(external link)" href="https://www.raspberrypi.org/forums/viewtopic.php?p=1023780#p1023780">https://www.raspberrypi.org/forums/viewtopic.php?p=1023780#p1023780</a></li>
</ul>
<h1 id="i2c_clock_stretching">i2c clock stretching</h1>
<ul>
<li><a target="_blank" title="(external link)" href="https://github.com/raspberrypi/linux/issues/254#issuecomment-217047171">https://github.com/raspberrypi/linux/issues/254#issuecomment-217047171</a></li>
</ul>
</div>
<hr/><div>Attachments: gpio1.png, mount-rpi-image.sh, tiny-rtc-3.3v-remote-r2-r3.jpg</div>]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>howto</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?raspberrypi</guid>
<pubDate>Tue, 04 Sep 2018 06:30:29 -0000</pubDate>
</item>
<item>
<title><![CDATA[Parallella]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?parallella</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: howto</div><hr/><div class="wiki">
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#power">Dobrica Pavlinušić's random unstructured stuff (power)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] power} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#update_boot_flash">Dobrica Pavlinušić's random unstructured stuff (Update boot flash)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Update boot flash} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#gpio">Dobrica Pavlinušić's random unstructured stuff (GPIO)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] GPIO} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#fpga">Dobrica Pavlinušić's random unstructured stuff (FPGA)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] FPGA} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#headless_stream">Dobrica Pavlinušić's random unstructured stuff (headless stream)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] headless stream} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#serial">Dobrica Pavlinušić's random unstructured stuff (serial)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] serial} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#hardware">Dobrica Pavlinušić's random unstructured stuff (hardware)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] hardware} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#software">Dobrica Pavlinušić's random unstructured stuff (software)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] software} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#device_tree">Dobrica Pavlinušić's random unstructured stuff (device tree)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] device tree} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#dev">Dobrica Pavlinušić's random unstructured stuff (/dev)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] /dev} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#debian">Dobrica Pavlinušić's random unstructured stuff (Debian)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Debian} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#epiphany">Dobrica Pavlinušić's random unstructured stuff (Epiphany)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Epiphany} --></span></li>
</ul></ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="power">power</h1>
<ul>
<li>what about power it by USB <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=12&amp;t=1128">http://forums.parallella.org/viewtopic.php?f=12&amp;t=1128</a></li>
<li>2A to micro-usb connector next to the rj45 Ethernet <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=50&amp;t=1081">http://forums.parallella.org/viewtopic.php?f=50&amp;t=1081</a></li>
<li>How to minimize Epiphany standby power? <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?uid=590&amp;f=10&amp;t=1069&amp;start=0">http://forums.parallella.org/viewtopic.php?uid=590&amp;f=10&amp;t=1069&amp;start=0</a></li>
</ul>
<ul>
<li>Critical issue with non-conforming USB powered hubs. <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=10&amp;t=841">http://forums.parallella.org/viewtopic.php?f=10&amp;t=841</a></li>
<li>USB port change <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=10&amp;t=1072">http://forums.parallella.org/viewtopic.php?f=10&amp;t=1072</a></li>
<li>USB power fix <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=50&amp;t=1510">http://forums.parallella.org/viewtopic.php?f=50&amp;t=1510</a></li>
</ul>
<ul>
<li>Where can I draw 5V for a fan ? <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=23&amp;t=1049&amp;start=10">http://forums.parallella.org/viewtopic.php?f=23&amp;t=1049&amp;start=10</a></li>
</ul>
<h1 id="update_boot_flash">Update boot flash</h1>
<p>
This is required to get CR10 led working</p>
<ul>
<li><a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=49&amp;t=983">http://forums.parallella.org/viewtopic.php?f=49&amp;t=983</a></li>
<li><a target="_blank" title="(external link)" href="https://github.com/parallella/parallella-hw/tree/master/boards/parallella-I/firmware">https://github.com/parallella/parallella-hw/tree/master/boards/parallella-I/firmware</a></li>
</ul>
<p>
enviroment before u-boot update:</p>
<pre>
zynq-uboot&gt; env print
baudrate=115200
bitstream_image=parallella.bit.bin
bootcmd=run modeboot
bootdelay=0
devicetree_image=devicetree.dtb
devicetree_size=0x20000
ethact=zynq_gem
ethaddr=04:4f:8b:00:10:13
fdt_high=0x20000000
initrd_high=0x20000000
ipaddr=192.168.0.99
kernel_image=uImage
kernel_size=0x500000
modeboot=run qspiboot
qspiboot=echo Configuring PL and Booting Linux...;mmcinfo;fatload mmc 0 0x4000000 ${bitstream_image};fpga load 0 0x4000000 0x3dbafc;fatload mmc 0 0x3000000 ${kernel_image};fatload mmc 0 0x2A00000 ${devicetree_image};bootm 0x3000000 - 0x2A00000
serverip=192.168.0.101
stderr=serial
stdin=serial
stdout=serial

Environment size: 655/131068 bytes
</pre>
<br /><p>
flasing output:</p>
<pre>
zynq-uboot&gt; mmcinfo
Device: SDHCI
Manufacturer ID: 3
OEM: 5344
Name: SU08G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
zynq-uboot&gt; fatload mmc 0 0x4000000 parallella.7020.flash.bin
reading parallella.7020.flash.bin

4351800 bytes read
zynq-uboot&gt; sf probe 0 0 0
SF: Detected N25Q128 with page size 64 KiB, total 16 MiB
zynq-uboot&gt; sf erase 0 0x1000000
SF: Successfully erased 16777216 bytes @ 0x0
zynq-uboot&gt; sf write 0x4000000 0 0x$filesize
SF: program success 4351800 bytes @ 0x0

# I skipped set ethaddr because it was already set correctly

zynq-uboot&gt; set AdaptevaSKU SKUA101040
zynq-uboot&gt; saveenv
Saving Environment to SPI Flash...
SF: Detected N25Q128 with page size 64 KiB, total 16 MiB
Erasing SPI flash...SF: Successfully erased 131072 bytes @ 0x4e0000
Writing to SPI flash...SF: program success 131072 bytes @ 0x4e0000
done


</pre>
<br /><h1 id="gpio">GPIO</h1>
<pre>
dpavlin@parallella:~/parallella-utils$ make gpiotest
gcc -o gpiotest gpiotest.c para_morse.c para_gpio.c -Wall -lrt

dpavlin@parallella:~/parallella-utils$ sudo ./gpiotest 
[sudo] password for dpavlin: 
GPIOTEST - Basic test of para_gpio

Initializing...
Success, pausing 5 seconds
Setting direction (forces output to 0!)...
Pausing 5 seconds
Reading multiple times
&gt; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
Toggling pin 100000 times...
Took 1.432 seconds, 69818 updates/sec
Write / Read test, 100000 times...
Took 2.618 seconds, 76384 ops/sec
Setting output to 0
Verifying level... OK
Disabling output and monitoring input
Gave up waiting for the input to transition
Setting output to 1
Verifying level... OK
Disabling output and monitoring input
Input flipped after 0 cycles
Closing



</pre>
<br /><h1 id="fpga">FPGA</h1>
<ul>
<li>Zynq documentation <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=51&amp;t=1114">http://forums.parallella.org/viewtopic.php?f=51&amp;t=1114</a></li>
</ul>
<ul>
<li>Command-line programming <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?uid=590&amp;f=51&amp;t=1161&amp;start=0">http://forums.parallella.org/viewtopic.php?uid=590&amp;f=51&amp;t=1161&amp;start=0</a></li>
</ul>
<pre>
sudo mknod /dev/xdevcfg c 250 0
sudo -s
cat parallella.bit.bin &gt; /dev/xdevcfg
exit

# programming time
cat /sys/devices/amba.1/f8007000.devcfg/prog_done
</pre>
<br /><ul>
<li>Routing additional Zynq hard block I/O to PEC_FPGA <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=51&amp;t=1154">http://forums.parallella.org/viewtopic.php?f=51&amp;t=1154</a></li>
</ul>
<ul>
<li>Source <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?uid=590&amp;f=10&amp;t=1069&amp;start=0">http://forums.parallella.org/viewtopic.php?uid=590&amp;f=10&amp;t=1069&amp;start=0</a></li>
</ul>
<ul>
<li>does the board contains thermal sensor(s) ? <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=23&amp;t=930">http://forums.parallella.org/viewtopic.php?f=23&amp;t=930</a></li>
</ul>
<pre>
/sys/bus/iio/devices/iio:device0/in_temp0_raw
/sys/bus/iio/devices/iio:device0/in_temp0_offset
/sys/bus/iio/devices/iio:device0/in_temp0_scale

T = ((in_temp0_raw + in_temp0_offset) * in_temp0_scale) / 1000)
</pre>
<br /><p>
script:</p>
<pre>
#!/bin/bash
raw=`cat /sys/bus/iio/devices/iio:device0/in_temp0_raw`
offset=`cat /sys/bus/iio/devices/iio:device0/in_temp0_offset`
scale=`cat /sys/bus/iio/devices/iio:device0/in_temp0_scale`

c_temp=`echo &quot;scale=1;(($raw + $offset) * $scale) / 1000&quot; | bc`
f_temp=`echo &quot;scale=1;(($c_temp * 9) / 5) + 32&quot; | bc`

echo
echo &quot;Zynq Temp: $c_temp C / $f_temp F&quot;
echo
</pre>
<br /><p>
Modified to display temperature in loop: <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/temp.sh?action=attachments_download;page_name=parallella;id=20140525101716-0-25570">temp.sh</a><!-- wiki: {file: temp.sh} --></span></p>
<h2 id="headless_stream">headless stream</h2>
<p>
<a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=48&amp;t=1213">http://forums.parallella.org/viewtopic.php?f=48&amp;t=1213</a></p>
<p>
removed html traces from device tree</p>
<h1 id="serial">serial</h1>
<ul>
<li>serial port <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=10&amp;t=845">http://forums.parallella.org/viewtopic.php?f=10&amp;t=845</a></li>
</ul>
<h1 id="hardware">hardware</h1>
<ul>
<li>Eagle library available <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=11&amp;t=559">http://forums.parallella.org/viewtopic.php?f=11&amp;t=559</a></li>
<li>KiCad daughter card template <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=11&amp;t=1204">http://forums.parallella.org/viewtopic.php?f=11&amp;t=1204</a> <a target="_blank" title="(external link)" href="https://github.com/TiZed/Parallella_Template">https://github.com/TiZed/Parallella_Template</a></li>
<li>Parallella Case With 12V Fan <a target="_blank" title="(external link)" href="http://www.thingiverse.com/thing:273701">http://www.thingiverse.com/thing:273701</a></li>
<li>Parallella clip case <a target="_blank" title="(external link)" href="https://github.com/kyllikki/designs/tree/master/Parallella">https://github.com/kyllikki/designs/tree/master/Parallella</a></li>
<li>ARM JTAG <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=10&amp;t=167">http://forums.parallella.org/viewtopic.php?f=10&amp;t=167</a></li>
<li>uboot network problems <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=48&amp;t=1667&amp;p=10416&amp;hilit=devicetree#p10416">http://forums.parallella.org/viewtopic.php?f=48&amp;t=1667&amp;p=10416&amp;hilit=devicetree#p10416</a></li>
</ul>
<h1 id="software">software</h1>
<h2 id="device_tree">device tree</h2>
<pre>
sudo apt-get install device-tree-compiler

# Compiling a device tree blob from source (.dts--&gt;.dtb):
dtc -I dts -O dtb -o devicetree.dtb zynq-parallella1-headless.dts

# To get source from compiled device tree (.dtb--&gt;.dts):
dtc -I dtb -O dts -o devicetree.dts devicetree.dtb

</pre>
<br /><h2 id="dev">/dev</h2>
<p>
see how to modify devicetree at <a target="_blank" title="(external link)" href="http://elinux.org/Parallella_Speed_Up_Ubuntu">http://elinux.org/Parallella_Speed_Up_Ubuntu</a></p>
<h2 id="debian">Debian</h2>
<p>
<a target="_blank" title="(external link)" href="http://elinux.org/Parallella_Debian">http://elinux.org/Parallella_Debian</a></p>
<h2 id="epiphany">Epiphany</h2>
<ul>
<li>cgminer <a target="_blank" title="(external link)" href="https://github.com/LordRafa/cgminer">https://github.com/LordRafa/cgminer</a></li>
</ul>
</div>
<hr/><div>Attachments: temp.sh</div>]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>howto</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?parallella</guid>
<pubDate>Sat, 20 Sep 2014 15:15:34 -0000</pubDate>
</item>
<item>
<title><![CDATA[Huawei E220]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?huawei_e220</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: hardware, howto</div><hr/><div class="wiki">
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#working_configuration">Dobrica Pavlinušić's random unstructured stuff (Working configuration)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Working configuration} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#etc_ppp_peers_huawei_e220">Dobrica Pavlinušić's random unstructured stuff (/etc/ppp/peers/huawei-e220)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] /etc/ppp/peers/huawei-=e220} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#etc_chatscripts_huawei_e220_chat">Dobrica Pavlinušić's random unstructured stuff (/etc/chatscripts/huawei-e220.chat)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] /etc/chatscripts/huawei-=e220.chat} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#links">Dobrica Pavlinušić's random unstructured stuff (Links)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Links} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#turn_off_pin">Dobrica Pavlinušić's random unstructured stuff (Turn off pin)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Turn off pin} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#libusb_driver_program">Dobrica Pavlinušić's random unstructured stuff (libusb driver program)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] libusb driver program} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#compilation">Dobrica Pavlinušić's random unstructured stuff (Compilation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Compilation} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#hal_problem">Dobrica Pavlinušić's random unstructured stuff (hal problem)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] hal problem} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#cd_image_update">Dobrica Pavlinušić's random unstructured stuff (CD image update)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] CD image update} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#dmesg">Dobrica Pavlinušić's random unstructured stuff (dmesg)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] dmesg} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#power">Dobrica Pavlinušić's random unstructured stuff (power)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] power} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#links">Dobrica Pavlinušić's random unstructured stuff (links)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] links} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#e171">Dobrica Pavlinušić's random unstructured stuff (E171)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] E171} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#e1752">Dobrica Pavlinušić's random unstructured stuff (E1752)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] E1752} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="working_configuration">Working configuration</h1>
<p>
(for me at least :-)</p>
<h2 id="etc_ppp_peers_huawei_e220">/etc/ppp/peers/huawei-e220</h2>
<pre>
dpavlin@llin:~$ cat /etc/ppp/peers/huawei-e220
# /etc/ppp/peers/huawei-e220 pppd script
# pppd call huawei-e220

debug
kdebug 3
nodetach
#persist

/dev/ttyUSB0
460800
idle 7200
noipdefault
defaultroute
usepeerdns

connect &quot;/usr/sbin/chat -vf /etc/chatscripts/huawei-e220.chat&quot;  

# avoid compression:
noccp
#nobsdcomp
novj
# t-mobile specific?
#ipcp-restart 8
#ipcp-max-configure 50
#ipcp-accept-local
#ipcp-accept-remote
#ipcp-max-failure 20

lcp-echo-failure 0
lcp-echo-interval 0

modem
crtscts

require-pap
refuse-chap

show-password
user YOUR_USERNAME@DOMAIN
password YOUR_PASSWORD

passive
</pre>
<br /><h2 id="etc_chatscripts_huawei_e220_chat">/etc/chatscripts/huawei-e220.chat</h2>
<pre>
dpavlin@llin:~$ cat /etc/chatscripts/huawei-e220.chat
TIMEOUT 3
ABORT BUSY 
ABORT 'NO CARRIER' 
ABORT VOICE 
ABORT 'NO DIALTONE' 
ABORT 'NO DIAL TONE' 
ABORT 'NO ANSWER' 
ABORT DELAYED
&quot;&quot; ATZ
OK ATQ0V1E1S0=0&amp;C1&amp;D2
OK AT+COPS?
OK AT+CGDCONT=1,&quot;ip&quot;,&quot;carnet.vip.hr&quot;
OK ATDT*99#
CONNECT &quot;&quot;
</pre>
<br /><h1 id="links">Links</h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://wwwu.uni-klu.ac.at/agebhard/HuaweiE220/">http://wwwu.uni-klu.ac.at/agebhard/HuaweiE220/</a></li>
<li>another tutorial: <a target="_blank" title="(external link)" href="http://ske.sourceforge.net/html/projects/huawei/huawei_tre.html">http://ske.sourceforge.net/html/projects/huawei/huawei_tre.html</a></li>
<li>interesting compilation of configuration files and stat tool: <a target="_blank" title="(external link)" href="http://oozie.fm.interia.pl/pro/huawei-e220/">http://oozie.fm.interia.pl/pro/huawei-e220/</a></li>
<li>Ubuntu, GUI: <a target="_blank" title="(external link)" href="http://sistemac-portal.carnet.hr/node/335">http://sistemac-portal.carnet.hr/node/335</a></li>
<li>source: <a target="_blank" title="(external link)" href="http://www.kanoistika.sk/bobovsky/archiv/umts/">http://www.kanoistika.sk/bobovsky/archiv/umts/</a></li>
<li>ObWikipedia: <a target="_blank" title="(external link)" href="http://en.wikipedia.org/wiki/Huawei_E220">http://en.wikipedia.org/wiki/Huawei_E220</a></li>
</ul>
<h1 id="turn_off_pin">Turn off pin</h1>
<pre>
$ cu -l /dev/ttyUSB0
at+clck=&quot;sc&quot;,0,&quot;PIN!&quot;
OK
</pre>
<br /><h1 id="libusb_driver_program">libusb driver program</h1>
<h2 id="compilation">Compilation</h2>
<p>
Get source from <a target="_blank" title="(external link)" href="http://www.kanoistika.sk/bobovsky/archiv/umts/huaweiAktBbo.c">http://www.kanoistika.sk/bobovsky/archiv/umts/huaweiAktBbo.c</a></p>
<pre>
cc     huaweiAktBbo.c   -o huaweiAktBbo -lusb
</pre>
<br /><h1 id="hal_problem">hal problem</h1>
<p>
If you modem is restarting like mad, it's problem with hal.</p>
<ul>
<li><a target="_blank" title="(external link)" href="http://wiki.archlinux.org/index.php/Huawei_E220">http://wiki.archlinux.org/index.php/Huawei_E220</a></li>
</ul>
<h1 id="cd_image_update">CD image update</h1>
<p>
Since device can emulate USB CDROM, I will try to update image on it to provide bios update image instead of useless (to me) Windows drivers.</p>
<h2 id="dmesg">dmesg</h2>
<pre>
dpavlin@t61p:~$ uname -a
Linux t61p 2.6.30-1-686-bigmem #1 SMP Mon Aug 3 17:32:39 UTC 2009 i686 GNU/Linux
dpavlin@t61p:~$ dmesg
[ 3405.568120] usb 4-1: new full speed USB device using uhci_hcd and address 2
[ 3405.726188] usb 4-1: New USB device found, idVendor=12d1, idProduct=1003
[ 3405.726196] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3405.726203] usb 4-1: Product: HUAWEI Mobile
[ 3405.726208] usb 4-1: Manufacturer: HUAWEI Technologies
[ 3405.726384] usb 4-1: configuration #1 chosen from 1 choice
[ 3405.792930] Initializing USB Mass Storage driver...
[ 3405.796244] usb-storage: probe of 4-1:1.0 failed with error -1
[ 3405.796289] usbcore: registered new interface driver usb-storage[ 3405.796296] USB Mass Storage support registered.
[ 3405.952077] usb 4-1: USB disconnect, address 2
[ 3407.432107] usb 4-1: new full speed USB device using uhci_hcd and address 3
[ 3407.590171] usb 4-1: New USB device found, idVendor=12d1, idProduct=1003
[ 3407.590180] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3407.590187] usb 4-1: Product: HUAWEI Mobile
[ 3407.590192] usb 4-1: Manufacturer: HUAWEI Technologies
[ 3407.590373] usb 4-1: configuration #1 chosen from 1 choice
[ 3407.603280] usb-storage: probe of 4-1:1.2 failed with error -1[ 3407.650695] usbcore: registered new interface driver usbserial
[ 3407.650725] USB Serial support registered for generic
[ 3407.650819] usbcore: registered new interface driver usbserial_generic
[ 3407.650824] usbserial: USB Serial Driver core
[ 3407.663176] USB Serial support registered for GSM modem (1-port)
[ 3407.663293] option 4-1:1.0: GSM modem (1-port) converter detected
[ 3407.663458] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 3407.663478] option 4-1:1.1: GSM modem (1-port) converter detected
[ 3407.663576] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 3407.663609] usbcore: registered new interface driver option
[ 3407.663614] option: v0.7.2:USB Driver for GSM modems
</pre>
<br /><h2 id="power">power</h2>
<pre>
root@t61p:~/t61p/usb_modeswitch/usb_modeswitch-1.0.2# lsusb
Bus 004 Device 003: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

root@t61p:~/t61p/usb_modeswitch/usb_modeswitch-1.0.2# echo suspend &gt;  /sys/bus/usb/devices/4-1/power/level
root@t61p:~/t61p/usb_modeswitch/usb_modeswitch-1.0.2# dmesg
</pre>
<br /><h2 id="links">links</h2>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.draisberghof.de/usb_modeswitch/">http://www.draisberghof.de/usb_modeswitch/</a></li>
</ul>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://feeds.delicious.com/v2/rss/dpavlin/e220?count=15
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: 500 Can't connect to feeds.delicious.com:80 (Bad hostname 'feeds.delicious.com')

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://feeds.delicious.com/v2/rss/dpavlin/e220?count==15 full}
--></div><br /><br /><h1 id="e171">E171</h1>
<pre>
Found modem         : E171
Model               : Huawei E171
IMEI                : 354807044078459
Serial NR.          : 4BA5TA10B2706637
Firmware            : 11.126.85.01.143
Compile date / time : Jun 21 2010 20:27:27
Dashboard version   : UTPS11.300.05.15.143_MAC11.301.09.01.143
Chipset             : Qualcomm MSM6290
Voice feature       : disabled
SIM Lock status     : unlocked
Wrong codes entered : 0 (unlock attempts left : 10)
</pre>
<br /><h1 id="e1752">E1752</h1>
<pre>
Found modem         : E1752
Model               : Huawei E1752
IMEI                : 353145034241600
Serial NR.          : O47NAA19A1600110
Firmware            : 11.126.13.00.00
Compile date / time : Jul 05 2010 10:16:42
Dashboard version   : UTPS11.300.05.22.56_MAC11.300.08.19.56
Chipset             : Qualcomm MSM6290
Voice feature       : disabled
SIM Lock status     : unlocked
Wrong codes entered : 0 (unlock attempts left : 10)
</pre>
<br /><pre>
AT^CVOICE=0 Enable Voice
AT^CVOICE=1 Disable Voice
AT^CVOICE=? Check status
=========
AT^U2DIAG=0 – switch the device in modem mode only
AT^U2DIAG=1 – device in modem mode + CD-ROM
AT^U2DIAG=255 – modem mode + CD-ROM + Card Reader
AT^U2DIAG=256 – modem mode + Card Reader
</pre>
</div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>hardware, howto</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?huawei_e220</guid>
<pubDate>Mon, 23 Jan 2012 18:05:12 -0000</pubDate>
</item>
<item>
<title><![CDATA[PostgreSQL]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?postgresql</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: howto, PostgreSQL</div><hr/><div class="wiki">
<p>
SQL snippets for PostgreSQL</p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#size_of_transaction_log">Dobrica Pavlinušić's random unstructured stuff (Size of transaction log)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Size of transaction log} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#size_of_tables_in_current_database">Dobrica Pavlinušić's random unstructured stuff (Size of tables in current database)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Size of tables in current database} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#number_of_rows_in_all_tables">Dobrica Pavlinušić's random unstructured stuff (Number of rows in all tables)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Number of rows in all tables} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#script_to_display_database_size">Dobrica Pavlinušić's random unstructured stuff (Script to display database size)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Script to display database size} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#all_databases">Dobrica Pavlinušić's random unstructured stuff (all databases)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] all databases} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#all_databases_grouped_by_user">Dobrica Pavlinušić's random unstructured stuff (all databases, grouped by user)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] all databases, grouped by user} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#active_locks">Dobrica Pavlinušić's random unstructured stuff (Active locks)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Active locks} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#graphics">Dobrica Pavlinušić's random unstructured stuff (Graphics)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Graphics} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#current_query_activity">Dobrica Pavlinušić's random unstructured stuff (Current query activity)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Current query activity} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#quickly_convert_database_table_to_sqlite">Dobrica Pavlinušić's random unstructured stuff (Quickly convert database table to SQLite)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Quickly convert database table to SQLite} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="size_of_transaction_log">Size of transaction log</h1>
<pre>
select sum((pg_stat_file('pg_xlog/' || file)).size)
from pg_ls_dir('pg_xlog') as file
where file ~ '^[0-9A-F]';
</pre>
<br /><h1 id="size_of_tables_in_current_database">Size of tables in current database</h1>
<pre>
select relname,pg_relation_size(oid) as size
from pg_class
where relkind = 'r' and relname not like 'pg_%' order by size desc;
</pre>
<br /><h1 id="number_of_rows_in_all_tables">Number of rows in all tables</h1>
<p>
<a target="_blank" title="(external link)" href="http://stackoverflow.com/questions/2596670/how-do-you-find-the-row-count-for-all-your-tables-in-postgres">http://stackoverflow.com/questions/2596670/how-do-you-find-the-row-count-for-all-your-tables-in-postgres</a></p>
<pre>
SELECT 
  nspname AS schemaname,relname,reltuples::int
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE 
  nspname NOT IN ('pg_catalog', 'information_schema') AND
  relkind='r' 
ORDER BY reltuples DESC;
</pre>
<br /><h1 id="script_to_display_database_size">Script to display database size</h1>
<p>
Script: <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/pg_size?action=attachments_download;page_name=postgresql;id=20071005123933-0-17773">pg_size</a><!-- wiki: {file: pg_size} --></span></p>
<h2 id="all_databases">all databases</h2>
<pre>
$ pg_size
</pre>
<br /><h2 id="all_databases_grouped_by_user">all databases, grouped by user</h2>
<pre>
$ pg_size -u
</pre>
<br /><h1 id="active_locks">Active locks</h1>
<pre>
select * from pg_locks where pid not in (select procpid from pg_stat_activity);
</pre>
<br /><h1 id="graphics">Graphics</h1>
<p>
Taken from <a target="_blank" title="(external link)" href="http://lca2007.linux.org.au/att_data/Miniconfs(2f)PostgreSQL/attachments/advanced.pdf">http://lca2007.linux.org.au/att_data/Miniconfs(2f)PostgreSQL/attachments/advanced.pdf</a></p>
<pre>
# CREATE AGGREGATE array_accum (anyelement)
(
    sfunc = array_append,
    stype = anyarray,
    initcond = '{}'
);

# select d, count(*),
       array_to_string(array_accum('+'::text),'') as graph
       from hits group by 1 order by 1 asc;
     d       | count | graph
------------+-------+----------
 2007-01-13 |      8 | ++++++++
 2007-01-14 |      7 | +++++++
 2007-01-15 |      4 | ++++
(3 rows)
</pre>
<br /><h1 id="current_query_activity">Current query activity</h1>
<pre>
select datid,datname,procpid,current_query,query_start from pg_stat_activity where current_query not like '&lt;IDLE&gt;' ;
</pre>
<br /><p>
To actually <strong>see</strong> queries you also have to edit <tt>postgresql.conf</tt> to include:</p>
<pre>
stats_command_string = yes
</pre>
<br /><h1 id="quickly_convert_database_table_to_sqlite">Quickly convert database table to SQLite</h1>
<pre>
pg_dump --inserts --no-owner --no-privileges --table hr_edu_orgs a3c | grep -v ^SET | sqlite3 var/a3c.sqlite
</pre>
</div>
<hr/><div>Attachments: pg_size</div>]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>howto, PostgreSQL</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?postgresql</guid>
<pubDate>Sun, 27 Nov 2011 21:03:07 -0000</pubDate>
</item>
<item>
<title><![CDATA[Hitchhikers Guide to RFID]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?hitchhikers_guide_to_rfid</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: 3M, howto, RFID</div><hr/><div class="wiki">
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#rfid_tag">Dobrica Pavlinušić's random unstructured stuff (RFID tag)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] RFID tag} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#blank_tag">Dobrica Pavlinušić's random unstructured stuff (blank tag)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] blank tag} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#3m_manufacturing_blank">Dobrica Pavlinušić's random unstructured stuff (3M Manufacturing Blank)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] 3M Manufacturing Blank} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#generic_blank">Dobrica Pavlinušić's random unstructured stuff (Generic blank)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Generic blank} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#programmed_tag">Dobrica Pavlinušić's random unstructured stuff (programmed tag)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] programmed tag} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#security">Dobrica Pavlinušić's random unstructured stuff (security)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] security} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#disable_tag">Dobrica Pavlinušić's random unstructured stuff (disable tag)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] disable tag} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#rfid_reader_device">Dobrica Pavlinušić's random unstructured stuff (RFID reader device)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] RFID reader device} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#related_blog_posts">Dobrica Pavlinušić's random unstructured stuff (Related blog posts)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Related blog posts} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#more_information">Dobrica Pavlinušić's random unstructured stuff (More information)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] More information} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_standard">Dobrica Pavlinušić's random unstructured stuff (ISO standard)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO standard} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_14443_proximity_cards">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 14443, Proximity cards)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 14443, Proximity cards} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_14443_1_physical_characteristics">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 14443-1 Physical characteristics)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 14443-=1 Physical characteristics} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_14443_2_radio_frequency_power_and_signal_interface">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 14443-2 Radio frequency power and signal interface)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 14443-=2 Radio frequency power and signal interface} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_14443_2_amd2_amendment_2_bit_rates_of_fc_64_fc_32_and_fc_16">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 14443-2/AMD2 Amendment 2: Bit rates of fc/64, fc/32 and fc/16)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 14443-=2/AMD2 Amendment 2: Bit rates of fc/64, fc/32 and fc/16} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_14443_3_initialization_and_anticollision">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 14443-3 Initialization and anticollision)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 14443-=3 Initialization and anticollision} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_14443_3_amendment_1_bit_rates_of_fc_64_fc_32_and_fc_16">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 14443-3 Amendment 1: Bit rates of fc/64, fc/32 and fc/16)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 14443-=3 Amendment 1: Bit rates of fc/64, fc/32 and fc/16} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_14443_4_transmission_protocol">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 14443-4 Transmission protocol)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 14443-=4 Transmission protocol} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_15693_vicinity_cards">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 15693, Vicinity cards)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 15693, Vicinity cards} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_15693_1_physical_characteristics">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 15693-1 Physical characteristics)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 15693-=1 Physical characteristics} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_15693_2_air_interface_and_initialisation">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 15693-2 Air interface and initialisation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 15693-=2 Air interface and initialisation} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_15693_3_anticollision_and_transmission_protocol">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 15693-3 Anticollision and transmission protocol)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 15693-=3 Anticollision and transmission protocol} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_10373_6_10373_7_test_methods_for_the_contactless_integrated_circuit_s_cards">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 10373-6, 10373-7, Test methods for the contactless integrated circuit(s) cards)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 10373-=6, 10373-=7, Test methods for the contactless integrated circuit(s) cards} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_10373_6_proximity_cards">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 10373-6 Proximity cards)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 10373-=6 Proximity cards} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_10373_6_amd1_amendment_1_additional_picc_test_methods">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 10373-6/AMD1 Amendment 1: Additional PICC test methods)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 10373-=6/AMD1 Amendment 1: Additional PICC test methods} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_10373_6_amd2_amendment_2_improved_rf_test_methods">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 10373-6/AMD2 Amendment 2: Improved RF test methods)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 10373-=6/AMD2 Amendment 2: Improved RF test methods} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_10373_7_vicinity_cards">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 10373-7 Vicinity cards)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 10373-=7 Vicinity cards} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_10536_close_coupled_cards">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 10536, Close-coupled cards)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 10536, Close-=coupled cards} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#iso_iec_10536_1_physical_characteristics">Dobrica Pavlinušić's random unstructured stuff (ISO/IEC 10536-1 Physical characteristics)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ISO/IEC 10536-=1 Physical characteristics} --></span></li>
</ul></ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><p>
There are many on-line resources about RFID. However, most of them are not well suited for beginners. So, if you just got RFID reader (3M in this case) and want high-level overview of what it is and what it can do, you are out of luck.</p>
<p>
Until now, that is. This guide should help you decide if RFID is right thing for your library and when you make choice to implement it, how to do it.</p>
<p>
This document will describe my experience with 3M 810 reader using RFID 501: RFID Standards for Libraries <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/RFID_501.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20090412215130-0-9302">RFID_501.pdf</a><!-- wiki: {file: RFID_501.pdf} --></span></p>
<h1 id="rfid_tag">RFID tag</h1>
<p>
Best way to think about RFID tags is like contact-less readable barcode.</p>
<p>
Our particular tags come in two form: RFID stickers (to be placed on books) and plastic credit-card like cards (we use them for patrons).</p>
<p>
Have in mind that established practice is to have different RFID systems for books and patrons (we are use same one). When we asked about using same system for books and patrons, we got reply: &quot;we don't have experience with it&quot;.<br />
In practice, we have problem with 3M selfcheck software in some special conditions where book reader have patron card in range it gets network connection error with SIP server.<br />
Since normal configuration of selfcheck stations is to have two different systems for patrons and books this problem doesn't show up for other users.</p>
<p>
Each tag has unique serial number (SID) assigned by manufacturer and used in RFID collision detection protocol. It looks like hexadecimal number starting with letter <tt>E0</tt> like this: <tt>E00401003123AA26</tt>.</p>
<p>
It's best to think of SID as unique identifier of physical tag.<br />
Your information system will have it's own ID (barcode?) for some item.<br />
There are cases in which you might want to change physical tag sticker on book because it's damaged. In that case, you will change SID of that item, but not barcode (which is data programmed on tag itself).</p>
<p>
Our initial idea was to use data programmed on chip for everything, and just ignore SIDs, but we found out that there is class of RFID devices which can read ONLY SID from chip (in our case it's photocopying system).<br />
3M software does record SIDs to log file when programming chips, but that's all. It essential ignores it for all practical intends and purposes.</p>
<p>
Chips have 7 blocks of user data on it, each block with 4 bytes which enables us to store 28 bytes of user specified data on each tag.</p>
<h2 id="blank_tag">blank tag</h2>
<h3 id="3m_manufacturing_blank">3M Manufacturing Blank</h3>
<p>
Easiest case is blank tag, in which all data on chip is 0x55</p>
<pre>
0	55 55 55 55		blank tag
1	55 55 55 55
2	55 55 55 55
3	55 55 55 55
4	55 55 55 55
5	55 55 55 55
6	00 00 00 00 
</pre>
<br /><h3 id="generic_blank">Generic blank</h3>
<p>
Generic blank seems to erase only first three blocks with zeros:</p>
<pre>
00	00 00 00 00
01	00 00 00 00
02	00 00 00 00
</pre>
<br /><p>
while rest of tag will be unchanged <strong>including rest of data on tag</strong></p>
<h2 id="programmed_tag">programmed tag</h2>
<p>
Tags programmed with 3M software have following data layout on them:</p>
<pre>
0	04 is 00 tt		i [4 bit] = number of item in set	[1 .. i .. s]
					s [4 bit] = total items in set
					tt [8 bit] = item type

1	dd dd dd dd		dd [16 bytes] = barcode data
2	dd dd dd dd
3	dd dd dd dd
4	dd dd dd dd

5	bb bl ll ll		b [12 bit] = branch [unsigned]
				l [20 bit] = library [unsigned]
6	cc cc cc cc		c [32 bit] = custom signed integer
</pre>
<br /><p>
This basically means that your barcode or identifier of item or patron can have up to 16 characters (by default numeric, but you can extend that to handle alphanumeric and special character if you need that) and three integer values: branch <tt>0 .. 4095</tt>, library <tt>0 .. 1048575</tt> and custom data <tt>-2147483648 .. 2147483647</tt>.</p>
<p>
You might want to use those values to uniquely identify your library and branch so that your RFID tags in books won't collide with other libraries.<br />
If you leave decision just to providers of equipment, you might end up with 300000 tags which have plain and simple 0 in those fields. Guess which value will have tags of next library which that provider will have? My guess would be 0 also.</p>
<p>
Writing correct numbers in that fields is not enough. If you want to use 3M software, you will also have to setup it to ignore all other tags which doesn't match your library and branch.</p>
<h2 id="security">security</h2>
<p>
There is also single byte called AFI or security which can be changed without accessing content of chip. This byte is also readable by more primitive RFID devices like doors to check if book have been checked out from library.</p>
<p>
3M is using <tt>0xD7</tt> (215) value for secured items (door will beep) and <tt>0xDA</tt> (218) as unsecured. It seems that all other values are ignored.<br />
(I would guess that other manufacturers are using different values)</p>
<p>
As I mentioned before, since we don't have any special values in branch, library or custom field, we have situations in which patron cards get secured when patron walks by checkout counter and 3M software is left in checkout mode.<br />
This triggers door to ring when patron passes which is not ideal.</p>
<h2 id="disable_tag">disable tag</h2>
<p>
3M software have option to disable tags. Initial examination showed that it's simply programming of tag with following content:</p>
<pre>
00	ff 00 00 00
01	00 00 00 00
02	00 00 00 00
03	00 00 00 00
04	00 00 00 00
05	00 00 00 00
06	00 00 00 00
</pre>
<br /><p>
and security set to <tt>d7</tt> (this might be value from tag before disabling it, I'll have to re-check this)</p>
<p>
While 3M software will ignore tags programmed with this content, there is <strong>not permanent disabling of tag</strong> since it can be programmed using other software.</p>
<h1 id="rfid_reader_device">RFID reader device</h1>
<p>
Reader consists of several part:</p>
<ul>
<li>black pad - reader antenna</li>
<li>reader - small box with micro controller and usb port</li>
<li>software</li>
</ul>
<p>
Reader is recognized as USB serial device with it's own protocol on serial port. We are mostly interested in it's protocol and our ability to use reader and tags with our custom software.</p>
<p>
At first, I assumed that protocol with RFID readers is some kind of standard.<br />
After extensive search on Internet I wasn't able to find any documentation about this particular protocol (I even tried to compare it with existing open source implementations just to be sure).</p>
<p>
So, only solution was to do clean-room reverse engineering, and using that technique I developed perl module which can talk with RFID reader which is available at <a target="_blank" title="(external link)" href="http://svn.rot13.org/index.cgi/RFID">http://svn.rot13.org/index.cgi/RFID</a></p>
<p>
After initial reverse engineering of protocol I rewrote support for 3M and CPR reader which is available at <a target="_blank" title="(external link)" href="https://github.com/dpavlin/Biblio-RFID">https://github.com/dpavlin/Biblio-RFID</a></p>
<h1 id="related_blog_posts">Related blog posts</h1>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://mjesec.ffzg.hr/~dpavlin/blog/mt/mt-search.cgi?tag=RFID&Template=feed&IncludeBlogs=1
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: 500 Internal Server Error

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://mjesec.ffzg.hr/~dpavlin/blog/mt/mt-=search.cgi?tag==RFID&Template==feed&IncludeBlogs==1}
--></div><br /><br /><h1 id="more_information">More information</h1>
<p>
If this was too geeky for you here is some additional materials:</p>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.bibliotheca-rfid.com/faq">RFID for libraries FAQ<!-- wiki-renamed-hyperlink "RFID for libraries FAQ"<http://www.bibliotheca=-rfid.com/faq> --></a></li>
<li><a target="_blank" title="(external link)" href="http://events.ccc.de/congress/2005/fahrplan/events/769.en.html">RFID - overview of protocols, librfid implementation and passive sniffing<!-- wiki-renamed-hyperlink "RFID =- overview of protocols, librfid implementation and passive sniffing"<http://events.ccc.de/congress/2005/fahrplan/events/769.en.html> --></a></li>
</ul>
<h1 id="iso_standard">ISO standard</h1>
<ul>
<li>ISO 15962.2004 - object identifier structure</li>
<li>ISO 15693 - RFID (layer 2)</li>
<li>ISO 18000 Part 3 Mode 1 - 13.56MHz</li>
<li><a target="_blank" title="(external link)" href="http://www.incits.org/tc_home/b105htm/b105Doc2003/N03-140-WG8-Work-Project.htm">ISO/IEC JTC1/SC17/WG8<!-- wiki-renamed-hyperlink "ISO/IEC JTC1/SC17/WG8"<http://www.incits.org/tc_home/b105htm/b105Doc2003/N03=-140=-WG8=-Work=-Project.htm> --></a></li>
</ul>
<h1 id="iso_iec_14443_proximity_cards">ISO/IEC 14443, Proximity cards</h1>
<p>
The Standard series ISO/IEC 14443 consists of 4 parts, which are:</p>
<h2 id="iso_iec_14443_1_physical_characteristics">ISO/IEC 14443-1 Physical characteristics</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1363t.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171842-3-24563">17n1363t.doc</a><!-- wiki: {file: 17n1363t.doc} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1363b.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171841-2-24563">17n1363b.doc</a><!-- wiki: {file: 17n1363b.doc} --></span><br /><br /><h2 id="iso_iec_14443_2_radio_frequency_power_and_signal_interface">ISO/IEC 14443-2 Radio frequency power and signal interface</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1522t.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171850-9-24563">17n1522t.pdf</a><!-- wiki: {file: 17n1522t.pdf} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1522c.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171848-8-24563">17n1522c.doc</a><!-- wiki: {file: 17n1522c.doc} --></span><br /><br /><h2 id="iso_iec_14443_2_amd2_amendment_2_bit_rates_of_fc_64_fc_32_and_fc_16">ISO/IEC 14443-2/AMD2 Amendment 2: Bit rates of fc/64, fc/32 and fc/16</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n2343T.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171908-28-24563">17n2343T.pdf</a><!-- wiki: {file: 17n2343T.pdf} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n2343F.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171907-27-24563">17n2343F.doc</a><!-- wiki: {file: 17n2343F.doc} --></span><br /><br /><h2 id="iso_iec_14443_3_initialization_and_anticollision">ISO/IEC 14443-3 Initialization and anticollision</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1531t.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171852-11-24563">17n1531t.pdf</a><!-- wiki: {file: 17n1531t.pdf} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1531c.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171850-10-24563">17n1531c.doc</a><!-- wiki: {file: 17n1531c.doc} --></span><br /><br /><h2 id="iso_iec_14443_3_amendment_1_bit_rates_of_fc_64_fc_32_and_fc_16">ISO/IEC 14443-3 Amendment 1: Bit rates of fc/64, fc/32 and fc/16</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n2342T.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171907-26-24563">17n2342T.pdf</a><!-- wiki: {file: 17n2342T.pdf} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n2342F.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171905-25-24563">17n2342F.doc</a><!-- wiki: {file: 17n2342F.doc} --></span><br /><br /><h2 id="iso_iec_14443_4_transmission_protocol">ISO/IEC 14443-4 Transmission protocol</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17N1689T.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171853-13-24563">17N1689T.pdf</a><!-- wiki: {file: 17N1689T.pdf} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1689c.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171852-12-24563">17n1689c.doc</a><!-- wiki: {file: 17n1689c.doc} --></span><br /><br /><h1 id="iso_iec_15693_vicinity_cards">ISO/IEC 15693, Vicinity cards</h1>
<h2 id="iso_iec_15693_1_physical_characteristics">ISO/IEC 15693-1 Physical characteristics</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1355t.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171841-1-24563">17n1355t.doc</a><!-- wiki: {file: 17n1355t.doc} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1355b%20.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171840-0-24563">17n1355b .doc</a><!-- wiki: {file: 17n1355b .doc} --></span><br /><br /><h2 id="iso_iec_15693_2_air_interface_and_initialisation">ISO/IEC 15693-2 Air interface and initialisation</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1486.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171846-7-24563">17n1486.pdf</a><!-- wiki: {file: 17n1486.pdf} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1486c.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171846-6-24563">17n1486c.doc</a><!-- wiki: {file: 17n1486c.doc} --></span><br /><br /><h2 id="iso_iec_15693_3_anticollision_and_transmission_protocol">ISO/IEC 15693-3 Anticollision and transmission protocol</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1692t.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171856-15-24563">17n1692t.pdf</a><!-- wiki: {file: 17n1692t.pdf} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1692c.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171854-14-24563">17n1692c.doc</a><!-- wiki: {file: 17n1692c.doc} --></span><br /><br /><h1 id="iso_iec_10373_6_10373_7_test_methods_for_the_contactless_integrated_circuit_s_cards">ISO/IEC 10373-6, 10373-7, Test methods for the contactless integrated circuit(s) cards</h1>
<h2 id="iso_iec_10373_6_proximity_cards">ISO/IEC 10373-6 Proximity cards</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1695t.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171857-17-24563">17n1695t.pdf</a><!-- wiki: {file: 17n1695t.pdf} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1695c.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171856-16-24563">17n1695c.doc</a><!-- wiki: {file: 17n1695c.doc} --></span><br /><br /><h2 id="iso_iec_10373_6_amd1_amendment_1_additional_picc_test_methods">ISO/IEC 10373-6/AMD1 Amendment 1: Additional PICC test methods</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n2258t.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171904-24-24563">17n2258t.pdf</a><!-- wiki: {file: 17n2258t.pdf} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n2258t.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171904-23-24563">17n2258t.doc</a><!-- wiki: {file: 17n2258t.doc} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n2258C.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171902-22-24563">17n2258C.doc</a><!-- wiki: {file: 17n2258C.doc} --></span><br /><br /><h2 id="iso_iec_10373_6_amd2_amendment_2_improved_rf_test_methods">ISO/IEC 10373-6/AMD2 Amendment 2: Improved RF test methods</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n2225t.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171901-21-24563">17n2225t.pdf</a><!-- wiki: {file: 17n2225t.pdf} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n2225F.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171900-20-24563">17n2225F.doc</a><!-- wiki: {file: 17n2225F.doc} --></span><br /><br /><h2 id="iso_iec_10373_7_vicinity_cards">ISO/IEC 10373-7 Vicinity cards</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1697t.pdf?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171900-19-24563">17n1697t.pdf</a><!-- wiki: {file: 17n1697t.pdf} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1697c.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171858-18-24563">17n1697c.doc</a><!-- wiki: {file: 17n1697c.doc} --></span><br /><br /><h1 id="iso_iec_10536_close_coupled_cards">ISO/IEC 10536, Close-coupled cards</h1>
<h2 id="iso_iec_10536_1_physical_characteristics">ISO/IEC 10536-1 Physical characteristics</h2>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1480t.PDF?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171844-5-24563">17n1480t.PDF</a><!-- wiki: {file: 17n1480t.PDF} --></span> <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/17n1480c.doc?action=attachments_download;page_name=hitchhikers_guide_to_rfid;id=20100120171843-4-24563">17n1480c.doc</a><!-- wiki: {file: 17n1480c.doc} --></span><br /></div>
<hr/><div>Attachments: 17n1355b .doc, 17n1355t.doc, 17n1363b.doc, 17n1363t.doc, 17n1480c.doc, 17n1480t.PDF, 17n1486.pdf, 17n1486c.doc, 17n1522c.doc, 17n1522t.pdf, 17n1531c.doc, 17n1531t.pdf, 17n1689c.doc, 17N1689T.pdf, 17n1692c.doc, 17n1692t.pdf, 17n1695c.doc, 17n1695t.pdf, 17n1697c.doc, 17n1697t.pdf, 17n2225F.doc, 17n2225t.pdf, 17n2258C.doc, 17n2258t.doc, 17n2258t.pdf, 17n2342F.doc, 17n2342T.pdf, 17n2343F.doc, 17n2343T.pdf, RFID_501.pdf</div>]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>3M, howto, RFID</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?hitchhikers_guide_to_rfid</guid>
<pubDate>Thu, 04 Nov 2010 23:08:50 -0000</pubDate>
</item>
<item>
<title><![CDATA[Shell]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?shell</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: howto, shell</div><hr/><div class="wiki">
<p>
Welcome to scratch pad of usefull shell snippets</p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#remove_all_php4_packages_with_apt_get">Dobrica Pavlinušić's random unstructured stuff (remove all php4 packages with apt-get)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] remove all php4 packages with apt-=get} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#use_socat_as_simple_serial_program">Dobrica Pavlinušić's random unstructured stuff (use socat as simple serial program)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] use socat as simple serial program} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#list_first_ten_files_from_srchives">Dobrica Pavlinušić's random unstructured stuff (list first ten files from srchives)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] list first ten files from srchives} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#tail_recent_logs_and_put_output_in_file">Dobrica Pavlinušić's random unstructured stuff (tail recent logs and put output in file)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] tail recent logs and put output in file} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#port_forwarder_using_socat">Dobrica Pavlinušić's random unstructured stuff (port forwarder using socat)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] port forwarder using socat} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#remove_all_filesystem_cache">Dobrica Pavlinušić's random unstructured stuff (remove all filesystem cache)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] remove all filesystem cache} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="remove_all_php4_packages_with_apt_get">remove all php4 packages with apt-get</h1>
<pre>
dpkg -l | grep php4 | awk '{ print $2 }' | xargs apt-get remove -y
</pre>
<br /><h1 id="use_socat_as_simple_serial_program">use socat as simple serial program</h1>
<pre>
socat - /dev/ttyS0,b9600,echo=0,raw
</pre>
<br /><h1 id="list_first_ten_files_from_srchives">list first ten files from srchives</h1>
<pre>
ls *.tar.gz *.tgz | xargs -i sh -c &quot;ls -hs '{}' ; echo ; tar tvfz '{}' | head -10 ; echo&quot;

ls *.tar.bz2 *.tbz | xargs -i sh -c &quot;ls -hs '{}' ; echo ; tar tvfj '{}' | head -10 ; echo&quot;
</pre>
<br /><blockquote>
Yes, it sucks that <tt>tar</tt> doesn't know how to handle compression formats automatically...</blockquote>
<br /><h1 id="tail_recent_logs_and_put_output_in_file">tail recent logs and put output in file</h1>
<p>
Useful to take a quick view into last lines, reload page (and capture newly created errors/infos) and store that in single file for easy review (in vim :-)</p>
<pre>
tail -f /var/log/apache2/*.log | tee ~/log
</pre>
<br /><h1 id="port_forwarder_using_socat">port forwarder using socat</h1>
<pre>
socat -d -d TCP4-LISTEN:1280,fork TCP4:192.168.212.5:80
</pre>
<br /><h1 id="remove_all_filesystem_cache">remove all filesystem cache</h1>
<pre>
echo 3 &gt; /proc/sys/vm/drop_caches
</pre>
</div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>howto, shell</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?shell</guid>
<pubDate>Wed, 30 Dec 2009 22:08:01 -0000</pubDate>
</item>
<item>
<title><![CDATA[DNS-323]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?dns_323</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: debian, hardware, howto</div><hr/><div class="wiki">
<p>
D-Link DNS-323 network attached storage</p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#overview">Dobrica Pavlinušić's random unstructured stuff (Overview)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Overview} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#raid">Dobrica Pavlinušić's random unstructured stuff (RAID)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] RAID} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#debian">Dobrica Pavlinušić's random unstructured stuff (Debian)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Debian} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#2_6_26_2_orion5x">Dobrica Pavlinušić's random unstructured stuff (2.6.26-2-orion5x)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] 2.6.26-=2-=orion5x} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#raid0">Dobrica Pavlinušić's random unstructured stuff (raid0)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] raid0} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#2_6_30">Dobrica Pavlinušić's random unstructured stuff (2.6.30)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] 2.6.30} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#updates">Dobrica Pavlinušić's random unstructured stuff (updates)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] updates} --></span></li>
</ul></ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="overview">Overview</h1>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/dmesg.txt?action=attachments_download;page_name=dns_323;id=20090905093846-0-5361">dmesg.txt</a><!-- wiki: {file: dmesg.txt} --></span><br /><br /><pre>
dlink-DFDADE:~# uname -a
Linux dlink-DFDADE 2.6.12.6-arm1 #30 Mon Aug 18 14:19:14 CST 2008 armv5tejl GNU/Linux

dlink-DFDADE:~# free
            total      used      free    shared   buffers    cached
Mem:        61904     54808      7096         0     11824     30592
-/+ buffers/cache:     12392     49512
Swap:     1060208         0   1060208

dlink-DFDADE:~# cat /proc/cpuinfo 
Processor      : ARM926EJ-Sid(wb) rev 0 (v5l)
BogoMIPS       : 331.77
Features       : swp half thumb fastmult edsp java 
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant    : 0x0
CPU part       : 0x926
CPU revision   : 0
Cache type     : write-back
Cache clean    : cp15 c7 ops
Cache lockdown : format C
Cache format   : Harvard
I size         : 32768
I assoc        : 1
I line length  : 32
I sets         : 1024
D size         : 32768
D assoc        : 1
D line length  : 32
D sets         : 1024

Hardware       : MV-88fxx81
Revision       : 0000
Serial         : 0000000000000000
</pre>
<br /><h1 id="raid">RAID</h1>
<pre>
Personalities : [linear] [raid0] [raid1] 
md0 : active raid0 sda2[0] sdb2[1]
      2925532672 blocks 64k chunks
      
unused devices: &lt;none&gt;
dlink-DFDADE:~# hdparm -tT /dev/sda /dev/sdb /dev/md0

/dev/sda:
 Timing cached reads:   210 MB in  2.01 seconds = 104.48 MB/sec
 Timing buffered disk reads:   72 MB in  3.00 seconds =  24.00 MB/sec

/dev/sdb:
 Timing cached reads:   212 MB in  2.01 seconds = 105.47 MB/sec
 Timing buffered disk reads:  104 MB in  3.03 seconds =  34.32 MB/sec

/dev/md0:
 Timing cached reads:   208 MB in  2.01 seconds = 103.48 MB/sec
 BLKGETSIZE failed: File too large

dlink-DFDADE:~# dd_rescue /dev/sda /dev/null
dd_rescue: (info): ipos:   1044480.0k, opos:   1044480.0k, xferd:   1044480.0k
                   errs:      0, errxfer:         0.0k, succxfer:   1044480.0k
             +curr.rate:    37169kB/s, avg.rate:    32123kB/s, avg.load: 60.7%

dlink-DFDADE:~# dd_rescue /dev/md0 /dev/null
dd_rescue: (info): ipos:    729536.0k, opos:    729536.0k, xferd:    729536.0k
                   errs:      0, errxfer:         0.0k, succxfer:    729536.0k
             +curr.rate:    37176kB/s, avg.rate:    37502kB/s, avg.load: 76.5%
</pre>
<br /><h1 id="debian">Debian</h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://www.cyrius.com/debian/orion/d-link/dns-323/install.html">http://www.cyrius.com/debian/orion/d-link/dns-323/install.html</a></li>
</ul>
<h2 id="2_6_26_2_orion5x">2.6.26-2-orion5x</h2>
<h3 id="raid0">raid0</h3>
<pre>
Linux dlink-DFDADE 2.6.26-2-orion5x #1 Thu Aug 20 05:04:03 UTC 2009 armv5tel GNU/Linux
Personalities : [raid1] [raid6] [raid5] [raid4] [raid0] 
md1 : active raid0 dm-1[1] dm-0[0]
      2097024 blocks 64k chunks
      
md0 : active raid1 sda4[0] sdb4[1]
      513984 blocks [2/2] [UU]
      
unused devices: &lt;none&gt;

/dev/sda:
 Timing cached reads:   212 MB in  2.01 seconds = 105.39 MB/sec
 Timing buffered disk reads:   72 MB in  3.05 seconds =  23.58 MB/sec

/dev/sdb:
 Timing cached reads:   218 MB in  2.01 seconds = 108.26 MB/sec
 Timing buffered disk reads:   88 MB in  3.00 seconds =  29.33 MB/sec

/dev/md1:
 Timing cached reads:   208 MB in  2.01 seconds = 103.46 MB/sec
 Timing buffered disk reads:   60 MB in  3.07 seconds =  19.57 MB/sec
</pre>
<br /><pre>
Linux dlink-DFDADE 2.6.26-2-orion5x #1 Thu Aug 20 05:04:03 UTC 2009 armv5tel GNU/Linux
Personalities : [raid1] [raid6] [raid5] [raid4] [raid0]
md1 : active (auto-read-only) raid1 dm-1[1] dm-0[0]
      1048512 blocks [2/2] [UU]
        resync=PENDING

md0 : active raid1 sda4[0] sdb4[1]
      513984 blocks [2/2] [UU]

unused devices: &lt;none&gt;

/dev/sda:
 Timing cached reads:   220 MB in  2.00 seconds = 109.73 MB/sec
 Timing buffered disk reads:   82 MB in  3.01 seconds =  27.22 MB/sec

/dev/sdb:
 Timing cached reads:   216 MB in  2.02 seconds = 107.12 MB/sec
 Timing buffered disk reads:   90 MB in  3.09 seconds =  29.14 MB/sec

/dev/md1:
 Timing cached reads:   208 MB in  2.02 seconds = 103.19 MB/sec
 Timing buffered disk reads:   52 MB in  3.05 seconds =  17.06 MB/sec
</pre>
<br /><h2 id="2_6_30">2.6.30</h2>
<p>
<a target="_blank" title="(external link)" href="http://www.cyrius.com/journal/debian/orion/d-link/dns-323/dns-323-fan-control">http://www.cyrius.com/journal/debian/orion/d-link/dns-323/dns-323-fan-control</a></p>
<pre>
dlink-DFDADE:~/mdadm# ./test.sh 
+ ./remove.md1.sh
+ mdadm --manage --stop /dev/md1
mdadm: error opening /dev/md1: No such file or directory
+ mdadm --manage --remove /dev/md1
mdadm: error opening /dev/md1: No such file or directory
+ yes
+ mdadm --create --verbose /dev/md1 --level=0 --raid-devices=2 --force /dev/vga/raid.a /dev/vgb/raid.b
mdadm: chunk size defaults to 64K
mdadm: /dev/vga/raid.a appears to be part of a raid array:
    level=raid1 devices=2 ctime=Sat Sep  5 14:54:52 2009
mdadm: /dev/vgb/raid.b appears to be part of a raid array:
    level=raid1 devices=2 ctime=Sat Sep  5 14:54:52 2009
Continue creating array? mdadm: array /dev/md1 started.
+ ./hdparm-test.sh
+ test -d out
+ uname -a
+ cat /proc/mdstat
+ hdparm -tT /dev/sda /dev/sdb /dev/md1
++ date +%Y%m%d_%H%M%S
+ tee out/20090905_151032
Linux dlink-DFDADE 2.6.30-1-orion5x #1 Tue Aug 18 04:19:30 UTC 2009 armv5tel GNU/Linux
Personalities : [raid1] [raid0] 
md1 : active raid0 dm-0[1] dm-1[0]
      2097024 blocks 64k chunks
      
md0 : active raid1 sda4[0] sdb4[1]
      513984 blocks [2/2] [UU]
      
unused devices: &lt;none&gt;

/dev/sda:
 Timing cached reads:   246 MB in  2.01 seconds = 122.14 MB/sec
 Timing buffered disk reads:  132 MB in  3.00 seconds =  43.93 MB/sec

/dev/sdb:
 Timing cached reads:   242 MB in  2.01 seconds = 120.27 MB/sec
 Timing buffered disk reads:  138 MB in  3.01 seconds =  45.87 MB/sec

/dev/md1:
 Timing cached reads:   234 MB in  2.01 seconds = 116.15 MB/sec
 Timing buffered disk reads:  130 MB in  3.03 seconds =  42.85 MB/sec
</pre>
<br /><pre>
+ ./remove.md1.sh
+ mdadm --manage --stop /dev/md1
mdadm: stopped /dev/md1
+ mdadm --manage --remove /dev/md1
+ yes
+ mdadm --create --verbose /dev/md1 --level=1 --raid-devices=2 --spare-devices=0 --force /dev/vga/raid.a /dev/vgb/raid.b
mdadm: /dev/vga/raid.a appears to be part of a raid array:
    level=raid0 devices=2 ctime=Sat Sep  5 15:10:31 2009
mdadm: /dev/vgb/raid.b appears to be part of a raid array:
    level=raid0 devices=2 ctime=Sat Sep  5 15:10:31 2009
mdadm: size set to 1048512K
Continue creating array? mdadm: array /dev/md1 started.
+ ./hdparm-test.sh
+ test -d out
+ uname -a
++ date +%Y%m%d_%H%M%S
+ cat /proc/mdstat
+ hdparm -tT /dev/sda /dev/sdb /dev/md1
+ tee out/20090905_151114
Linux dlink-DFDADE 2.6.30-1-orion5x #1 Tue Aug 18 04:19:30 UTC 2009 armv5tel GNU/Linux
Personalities : [raid1] [raid0] 
md1 : active (auto-read-only) raid1 dm-0[1] dm-1[0]
      1048512 blocks [2/2] [UU]
        resync=PENDING
      
md0 : active raid1 sda4[0] sdb4[1]
      513984 blocks [2/2] [UU]
      
unused devices: &lt;none&gt;

/dev/sda:
 Timing cached reads:   116 MB in  2.01 seconds =  57.84 MB/sec
 Timing buffered disk reads:  118 MB in  3.00 seconds =  39.32 MB/sec

/dev/sdb:
 Timing cached reads:   114 MB in  2.01 seconds =  56.79 MB/sec
 Timing buffered disk reads:  140 MB in  3.03 seconds =  46.27 MB/sec

/dev/md1:
 Timing cached reads:   234 MB in  2.02 seconds = 116.07 MB/sec
 Timing buffered disk reads:  110 MB in  3.01 seconds =  36.49 MB/sec
</pre>
<br /><h2 id="updates">updates</h2>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
  
  
 <div class="fetchrss_title">
   <a href="https://www.cyrius.com/">Martin Michlmayr</a>
 </div>


  </div>
  
 <ul class="fetchrss_items">
  
  
    
  <li class="fetchrss_item">
    <a href="https://www.cyrius.com/blog/foss/foss-foundation-research/">Research on FOSS foundations</a>
    
      <p class="fetchrss_description">
        <p>I worked on research on FOSS foundations and published two reports:</p>
<h2>Growing Open Source Projects with a Stable Foundation</h2>
<p>This primer covers non-technical aspects that the majority of projects will have to consider at some point.  It also explains how FOSS foundations can help projects grow and succeed.</p>
<p>This primer explains:</p>
<ul>
<li>What issues and areas to consider</li>
<li>How other projects and foundations have approached these topics</li>
<li>What FOSS foundations bring to the table</li>
<li>How to choose a FOSS foundation</li>
</ul>
<p>You can download <a href="https://www.cyrius.com/foss-foundations/growing-open-source-projects.pdf">Growing Open Source Projects with a Stable Foundation</a>.</p>
<h2>Research report</h2>
<p>The research report describes the findings of the research and aims to help understand the operations and challenges FOSS foundations face.</p>
<p>This report covers topics such as:</p>
<ul>
<li>Role and activities of foundations</li>
<li>Challenges faced and gaps in the service offerings</li>
<li>Operational aspects, including reasons for starting an org and choice of jurisdiction</li>
<li>Trends, such as the "foundation in a foundation" model</li>
<li>Recommendations for different stakeholders</li>
</ul>
<p>You can download the <a href="https://www.cyrius.com/foss-foundations/foss-foundations-research.pdf">research report</a>.</p>
<h2>Acknowledgments</h2>
<p>This research was sponsored by Ford Foundation and Alfred P. Sloan Foundation.  The research was part of their <a href="https://www.fordfoundation.org/campaigns/critical-digital-infrastructure-research/">Critical Digital Infrastructure Research</a> initiative, which investigates the role of open source in digital infrastructure.</p>
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://www.cyrius.com/blog/beancount/ledger2beancount26/">ledger2beancount 2.6 released</a>
    
      <p class="fetchrss_description">
        <p>I released version 2.6 of <a href="https://github.com/beancount/ledger2beancount">ledger2beancount</a>, a ledger to beancount converter.</p>
<p>Here are the changes in 2.6:</p>
<ul>
<li>Round calculated total if needed for <code>price==cost</code> comparison</li>
<li>Add <code>narration_tag</code> config variable to set narration from metadata</li>
<li>Retain unconsummated payee/payer metadata</li>
<li>Ensure UTF-8 output and assume UTF-8 input</li>
<li>Document UTF-8 issue on Windows systems</li>
<li>Add option to move posting-level tags to the transaction itself</li>
<li>Add support for the <code>alias</code> sub-directive of <code>account</code> declarations</li>
<li>Add support for the <code>payee</code> sub-directive of <code>account</code> declarations</li>
<li>Support configuration file called <code>.ledger2beancount.yaml</code></li>
<li>Fix uninitialised value warning in hledger mode</li>
<li>Print warning if account in assertion has sub-accounts</li>
<li>Set commodity for commodity-less balance assertion</li>
<li>Expand path name of <code>beancount_header</code> config variable</li>
<li>Document handling of buckets</li>
<li>Document pre- and post-processing examples</li>
<li>Add <code>Dockerfile</code> to create Docker image</li>
</ul>
<p>Thanks to Alexander Baier, Daniele Nicolodi, and GitHub users bratekarate, faaafo and mefromthepast for various bug reports and other input.</p>
<p>Thanks to Dennis Lee for adding a Dockerfile and to Vinod Kurup for fixing a bug.</p>
<p>Thanks to Stefano Zacchiroli for testing.</p>
<p>You can get <a href="https://github.com/beancount/ledger2beancount">ledger2beancount from GitHub</a>.</p>
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://www.cyrius.com/blog/beancount/beancount2ledger13/">beancount2ledger 1.3 released</a>
    
      <p class="fetchrss_description">
        <p>I released version 1.3 of <a href="https://beancount2ledger.readthedocs.io/">beancount2ledger</a>, the beancount to ledger converter that was moved from <code>bean-report ledger</code> into a standalone tool.</p>
<p>You can get <a href="https://github.com/beancount/beancount2ledger">beancount2ledger from GitHub</a> or via <a href="https://pypi.org/project/beancount2ledger/">pip install</a>.</p>
<p>Here are the changes in 1.3:</p>
<ul>
<li>Add rounding postings only when required (<a href="https://github.com/beancount/beancount2ledger/issues/9">issue #9</a>)</li>
<li>Avoid printing too much precision for a currency (<a href="https://github.com/beancount/beancount2ledger/issues/21">issue #21</a>)</li>
<li>Avoid creating two or more postings with null amount (<a href="https://github.com/beancount/beancount2ledger/issues/23">issue #23</a>)</li>
<li>Add price to cost when needed by ledger (<a href="https://github.com/beancount/beancount2ledger/issues/22">issue #22</a>)</li>
<li>Preserve posting order (<a href="https://github.com/beancount/beancount2ledger/issues/18">issue #18</a>)</li>
<li>Add config option <code>indent</code></li>
<li>Show metadata with hledger output</li>
<li>Support setting auxiliary dates and posting dates from metadata (<a href="https://github.com/beancount/beancount2ledger/issues/14">issue #14</a>)</li>
<li>Support setting the code of transactions from metadata</li>
<li>Support mapping of account and currency names (<a href="https://github.com/beancount/beancount2ledger/issues/24">issue #24</a>)</li>
<li>Improve documentation:<ul>
<li>Add user guide</li>
<li>Document limitations (<a href="https://github.com/beancount/beancount2ledger/issues/12">issue #12</a>)</li>
</ul>
</li>
</ul>
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://www.cyrius.com/blog/beancount/ledger2beancount25/">ledger2beancount 2.5 released</a>
    
      <p class="fetchrss_description">
        <p>I released version 2.5 of <a href="https://github.com/beancount/ledger2beancount">ledger2beancount</a>, a ledger to beancount converter.</p>
<p>Here are the changes in 2.5:</p>
<ul>
<li>Don't create negative cost for lot without cost</li>
<li>Support complex implicit conversions</li>
<li>Handle typed metadata with value <code>0</code> correctly</li>
<li>Set per-unit instead of total cost when cost is missing from lot</li>
<li>Support commodity-less amounts</li>
<li>Convert transactions with no amounts or only <code>0</code> amounts to notes</li>
<li>Fix parsing of transaction notes</li>
<li>Keep tags in transaction notes on same line as transaction header</li>
<li>Add beancount config options for non-standard root names automatically</li>
<li>Fix conversion of fixated prices to costs</li>
<li>Fix removal of price when <code>price==cost</code> but when they use different number formats</li>
<li>Fix removal of price when <code>price==cost</code> but per-unit and total notation mixed</li>
<li>Fix detection of tags and metadata after posting/aux date</li>
<li>Use <code>D</code> directive to set default commodity for hledger</li>
<li>Improve support for postings with commodity-less amounts</li>
<li>Allow empty comments</li>
<li>Preserve leading whitespace in comments in postings and transaction headers</li>
<li>Preserve indentation for tags and metadata</li>
<li>Preserve whitespace between amount and comment</li>
<li>Refactor code to use more data structures</li>
<li>Remove dependency on <code>Config::Onion</code> module</li>
</ul>
<p>Thanks to input from Remco Rĳnders, Yuri Khan, and Thierry. Thanks to Stefano Zacchiroli and Kirill Goncharov for testing my changes.</p>
<p>You can get <a href="https://github.com/beancount/ledger2beancount">ledger2beancount from GitHub</a></p>
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://www.cyrius.com/blog/beancount/ledger2beancount24/">ledger2beancount 2.4 released</a>
    
      <p class="fetchrss_description">
        <p>I released version 2.4 of <a href="https://github.com/beancount/ledger2beancount">ledger2beancount</a>, a ledger to beancount converter.</p>
<p>There are two notable changes in this release:</p>
<ol>
<li>I fixed two regressions introduced in the last release.  Sorry about the breakage!</li>
<li>I improved support for hledger.  I believe all syntax differences in hledger are supported now.</li>
</ol>
<p>Here are the changes in 2.4:</p>
<ul>
<li>Fix regressions introduced in version 2.3<ul>
<li>Handle price directives with comments</li>
<li>Don't assume implicit conversion when price is on second posting</li>
</ul>
</li>
<li>Improve support for hledger<ul>
<li>Fix parsing of hledger tags</li>
<li>Support commas as decimal markers</li>
<li>Support digit group marks through <code>commodity</code> and <code>D</code> directives</li>
<li>Support <code>end aliases</code> directive</li>
<li>Support regex aliases</li>
<li>Recognise total balance assertions</li>
<li>Recognise sub-account balance assertions</li>
</ul>
</li>
<li>Add support for <code>define</code> directive</li>
<li>Convert all uppercase metadata tags to all lowercase</li>
<li>Improve handling of ledger lots without cost</li>
<li>Allow transactions without postings</li>
<li>Fix parsing issue in commodity declarations</li>
<li>Support commodities that contain quotation marks</li>
<li>Add <code>--version</code> option to show version</li>
<li>Document problem of mixing <code>apply</code> and <code>include</code></li>
</ul>
<p>Thanks to Kirill Goncharov for pointing out one regressions, to Taylor R Campbell for for a patch, to Stefano Zacchiroli for some input, and finally to Simon Michael for input on hledger!</p>
<p>You can get <a href="https://github.com/beancount/ledger2beancount">ledger2beancount from GitHub</a></p>
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://www.cyrius.com/blog/beancount/beancount2ledger11/">beancount2ledger 1.1 released</a>
    
      <p class="fetchrss_description">
        <p>Martin Blais recently <a href="https://groups.google.com/forum/#!topic/beancount/kM4s4raf1y4">announced that he'd like to re-organize the beancount code</a> and split out some functionality into separate projects, including the beancount to ledger/hledger conversion code previously provided by bean-report.</p>
<p>I agreed to take on the maintenance of this code and I've now released <a href="https://github.com/beancount/beancount2ledger/">beancount2ledger, a beancount to ledger/hledger converter</a>.</p>
<p>You can install beancount2ledger with pip:</p>
<div class="code"><pre class="code literal-block">pip3 install beancount2ledger
</pre></div>

<p>Please <a href="https://github.com/beancount/beancount2ledger/issues">report issues to the GitHub tracker</a>.</p>
<p>There are a number of outstanding issues I'll fix soon, but please report any other issues you encounter.</p>
<p>Note that I'm not very familiar with hledger.  I intend to sync up with hledger author Simon Michael soon, but please file an issue if you notice any problems with the hledger conversion.</p>
<p>Version 1.1 contains a number of fixes compared to the latest code in bean-report:</p>
<h2>1.1 (2020-07-24)</h2>
<ul>
<li>Preserve metadata information (<a href="https://github.com/beancount/beancount2ledger/issues/3">issue #3</a>)</li>
<li>Preserve cost information (lot dates and lot labels/notes) (<a href="https://github.com/beancount/beancount2ledger/issues/5">issue #5</a>)</li>
<li>Avoid adding two prices in hledger (<a href="https://github.com/beancount/beancount2ledger/issues/2">issue #2</a>)</li>
<li>Avoid trailing whitespace in account open declarations (<a href="https://github.com/beancount/beancount2ledger/issues/6">issue #6</a>)</li>
<li>Fix indentation issue in postings (<a href="https://github.com/beancount/beancount2ledger/issues/8">issue #8</a>)</li>
<li>Fix indentation issue in price entries</li>
<li>Drop time information from price (<code>P</code>) entries</li>
<li>Add documentation</li>
<li>Relicense under GPL-2.0-or-later (<a href="https://github.com/beancount/beancount2ledger/issues/1">issue #1</a>)</li>
</ul>
<h2>1.0 (2020-07-22)</h2>
<ul>
<li>Split ledger and hledger conversion from <code>bean-report</code> into a standalone tool</li>
<li>Add man page for <code>beancount2ledger</code>(1)</li>
</ul>
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://www.cyrius.com/blog/beancount/ledger2beancount23/">ledger2beancount 2.3 released</a>
    
      <p class="fetchrss_description">
        <p>I released version 2.3 of <a href="https://github.com/zacchiro/ledger2beancount">ledger2beancount</a>,
a ledger to beancount converter.</p>
<p>There are three notable changes with this release:</p>
<ol>
<li>Performance has significantly improved.  One large, real-world test case has gone from around 160 seconds to 33 seconds.  A smaller test case has gone from 11 seconds to ~3.5 seconds.</li>
<li>The documentation is <a href="https://ledger2beancount.readthedocs.io/">available online now</a> (via Read the Docs).</li>
<li>The <a href="https://github.com/beancount/ledger2beancount">repository has moved</a> to the beancount GitHub organization.</li>
</ol>
<p>Here are the changes in 2.3:</p>
<ul>
<li>Improve speed of ledger2beancount significantly</li>
<li>Improve parsing of postings for accuracy and speed</li>
<li>Improve support for inline math</li>
<li>Handle lots without cost</li>
<li>Fix parsing of lot notes followed by a virtual price</li>
<li>Add support for lot value expressions</li>
<li>Make parsing of numbers more strict</li>
<li>Fix behaviour of dates without year</li>
<li>Accept default ledger date formats without configuration</li>
<li>Fix implicit conversions with negative prices</li>
<li>Convert implicit conversions in a more idiomatic way</li>
<li>Avoid introducing trailing whitespace with hledger input</li>
<li>Fix loading of config file</li>
<li>Skip ledger directive <code>import</code></li>
<li>Convert documentation to <code>mkdocs</code></li>
</ul>
<p>Thanks to Colin Dean for some feedback.  Thanks to Stefano Zacchiroli for prompting me into investigating performance issues (and thanks to the developers of the Devel::NYTProf profiler).</p>
<p>You can get <a href="https://github.com/beancount/ledger2beancount">ledger2beancount from GitHub</a></p>
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://www.cyrius.com/blog/beancount/ledger2beancount22/">ledger2beancount 2.2 released</a>
    
      <p class="fetchrss_description">
        <p>I released version 2.2 of <a href="https://github.com/zacchiro/ledger2beancount">ledger2beancount</a>,
a ledger to beancount converter.</p>
<p>Here are the changes in 2.2:</p>
<ul>
<li>Show warning for unknown <code>apply</code> directive</li>
<li>Recognize <code>apply rate</code> directive (an alias of <code>apply fixed</code>)</li>
<li>Don't convert meta-data on ignored virtual postings but keep as comments</li>
<li>Update location of beancount repository</li>
</ul>
<p>You can get <a href="https://github.com/zacchiro/ledger2beancount">ledger2beancount from GitHub</a>.</p>
<p>Thanks to GitHub user MarinBernard for reporting a bug with virtual
postings!</p>
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://www.cyrius.com/blog/beancount/ledger2beancount21/">ledger2beancount 2.1 released</a>
    
      <p class="fetchrss_description">
        <p>I released version 2.1 of <a href="https://github.com/zacchiro/ledger2beancount">ledger2beancount</a>,
a ledger to beancount converter.</p>
<p>Here are the changes in 2.1:</p>
<ul>
<li>Handle postings with posting dates and comments but no amount</li>
<li>Show transactions with only one posting (without <code>bucket</code>)</li>
<li>Adding spacing between automatic declarations</li>
<li>Preserve preliminary info at the top</li>
</ul>
<p>You can get <a href="https://github.com/zacchiro/ledger2beancount">ledger2beancount from GitHub</a>.</p>
<p>Thanks to Thierry (thdox) for reporting a bug and for fixing some
typos in the documentation.  Thanks to Stefano Zacchiroli for
some good feedback.</p>
      </p>
    
  </li>

  
    
  <li class="fetchrss_item">
    <a href="https://www.cyrius.com/blog/beancount/ledger2beancount20/">ledger2beancount 2.0 released</a>
    
      <p class="fetchrss_description">
        <p>I released version 2.0 of <a href="https://github.com/zacchiro/ledger2beancount">ledger2beancount</a>,
a ledger to beancount converter.</p>
<p>Here are the changes in 2.0:</p>
<ul>
<li>Handle comments in <code>account</code> and <code>commodity</code> declarations</li>
<li>Handle transactions with a single posting (without <code>bucket</code>)</li>
<li>Handle empty metadata values</li>
<li>Rewrite Emacs modeline</li>
</ul>
<p>You can get <a href="https://github.com/zacchiro/ledger2beancount">ledger2beancount from GitHub</a>.</p>
      </p>
    
  </li>

  
 </ul>

</div>
















<!-- wiki: {fetchatom: http://www.cyrius.com/journal/index.atom full}
--></div><br /></div>
<hr/><div>Attachments: dmesg.txt</div>]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>debian, hardware, howto</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?dns_323</guid>
<pubDate>Sat, 05 Sep 2009 13:29:16 -0000</pubDate>
</item>
<item>
<title><![CDATA[SocialText Open Wiki Install]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?socialtext_open_wiki_install</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: howto, SocialText</div><hr/><div class="wiki">
<p>
Here are some quick notes about installation on clean Debian etch machine</p>
<p>
This page is aimed towards system administrators, if you want information how to customize design of page take a look at <a href="https://saturn.ffzg.hr/rot13/index.cgi?socialtext_css_design" title="(225 months) This page collect various parts which used to be in [Socialtext Open Wiki Install], but since they a...">SocialText CSS design</a> (which is included on bottom of this page).</p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#helper_packages">Dobrica Pavlinušić's random unstructured stuff (Helper packages)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Helper packages} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#install_source">Dobrica Pavlinušić's random unstructured stuff (Install source)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Install source} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#update_existing_checkout">Dobrica Pavlinušić's random unstructured stuff (Update existing checkout)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Update existing checkout} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#add_new_admin_user">Dobrica Pavlinušić's random unstructured stuff (Add new admin user)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Add new admin user} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#configuring_mailer">Dobrica Pavlinušić's random unstructured stuff (Configuring mailer)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Configuring mailer} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#postfix">Dobrica Pavlinušić's random unstructured stuff (postfix)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] postfix} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#crontab">Dobrica Pavlinušić's random unstructured stuff (crontab)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] crontab} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#handling_e_mail_errors">Dobrica Pavlinušić's random unstructured stuff (Handling e-mail errors)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Handling e-=mail errors} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#customize_template">Dobrica Pavlinušić's random unstructured stuff (Customize template)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Customize template} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#fix_rss_feed_errors">Dobrica Pavlinušić's random unstructured stuff (Fix RSS feed errors)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Fix RSS feed errors} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#change_e_mail_address_of_workspace">Dobrica Pavlinušić's random unstructured stuff (Change e-mail address of workspace)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Change e-=mail address of workspace} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#access_simple_version_of_page">Dobrica Pavlinušić's random unstructured stuff (Access simple version of page)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Access simple version of page} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#configure_sane_resource_usage">Dobrica Pavlinušić's random unstructured stuff (Configure sane resource usage)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Configure sane resource usage} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#convert_rss_feed_urls_to_absolute">Dobrica Pavlinušić's random unstructured stuff (Convert RSS feed URLs to absolute)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Convert RSS feed URLs to absolute} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#problems_with_8_bit_utf_8_encoded_characters_in_urls">Dobrica Pavlinušić's random unstructured stuff (Problems with 8-bit UTF-8 encoded characters in URLs)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Problems with 8-=bit UTF-=8 encoded characters in URLs} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#enable_html_wafl_in_workspace">Dobrica Pavlinušić's random unstructured stuff (Enable html wafl in workspace)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Enable html wafl in workspace} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#upgrade_to_2_2">Dobrica Pavlinušić's random unstructured stuff (Upgrade to 2.2)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Upgrade to 2.2} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#socialtext_resting">Dobrica Pavlinušić's random unstructured stuff (Socialtext::Resting)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Socialtext::Resting} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#missing_directory">Dobrica Pavlinušić's random unstructured stuff (Missing directory)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Missing directory} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#missing_skins">Dobrica Pavlinušić's random unstructured stuff (Missing skins)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Missing skins} --></span></li>
</ul></ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="helper_packages">Helper packages</h1>
<pre>
sudo apt-get install wv xpdf-utils unrtf unzip links
sudo cpan MP3::Tag
</pre>
<br /><h1 id="install_source">Install source</h1>
<pre>
svn co https://repo.socialtext.net:8999/svn/socialtext/trunk socialtext
cd socialtext/nlw

# checkout lastest Socialtext::Resting client
svn export --force https://repo.socialtext.net:8999/svn/socialtext-clients/trunk/rest/perl/Socialtext-Resting/lib/Socialtext/ lib/Socialtext/

./configure --socialtext-open 1 --apache-proxy 0 --force-ssl-login 1
make
sudo bash
make install
update-rc.d -f apache-perl remove
update-rc.d st-apache defaults
update-rc.d ceqlotron defaults
/etc/init.d/st-apache start
/etc/init.d/ceqlotron start
</pre>
<br /><h1 id="update_existing_checkout">Update existing checkout</h1>
<pre>
cd socaialtext
svn update
cd nlw
./configure --socialtext-open 1 --apache-proxy 0 --force-ssl-login 1
make
make test
sudo make install
sudo /etc/init.d/st-apache stop
sudo /etc/init.d/ceqlotron restart
sudo /etc/init.d/st-apache start
</pre>
<br /><h1 id="add_new_admin_user">Add new admin user</h1>
<pre>
sudo -u www-data st-admin create-user --email dpavlin@rot13.org --password wikidream \
  --first-name Dobrica --last-name Pavlinusic
sudo -u www-data st-admin add-workspace-admin --email dpavlin@rot13.org
</pre>
<br /><h1 id="configuring_mailer">Configuring mailer</h1>
<h2 id="postfix">postfix</h2>
<p>
Install and configure postfix for mail delivery</p>
<pre>
apt-get install postfix
vi /etc/postfix/main
</pre>
<br /><p>
Important lines are following:</p>
<pre>
alias_maps = hash:/etc/aliases, hash:/etc/aliases.deliver
alias_database = hash:/etc/aliases, hash:/etc/aliases.deliver
</pre>
<br /><p>
They add <tt>/etc/aliases.deliver</tt> (which SocialText generates with names of wiki workspaces) to configuration.</p>
<p>
Next, we need to create <tt>/etc/aliases.deliver.db</tt> which is binary version of database needed for postfix. It's extremly important that <tt>aliases.deliver</tt> file is owned by <tt>www-data</tt> because postfix picks user which will do e-mail delivery based on owner of aliases file. If your owner of <tt>/var/www/socialtext</tt> is some other user than <tt>www-data</tt> you will have to modify following command appropriately:</p>
<pre>
# make www-data owner of file
chown www-data:root /etc/aliases.deliver
# allow root group to write in /etc/
chmod g+w /etc/
# create /etc/aliases.deliver.db
sudo postalias /etc/aliases.deliver
</pre>
<br /><p>
Now restart postfix as <tt>root</tt> user</p>
<pre>
/etc/init.d/postfix restart
</pre>
<br /><h2 id="crontab">crontab</h2>
<p>
Add following to <tt>/etc/crontab</tt> to refresh aliases database for postfix regularly:</p>
<pre>
*/10 *  * * *   root    postalias /etc/aliases.deliver
</pre>
<br /><h1 id="handling_e_mail_errors">Handling e-mail errors</h1>
<pre>
sudo tail /var/log/mail.log | grep st-admin
</pre>
<br /><blockquote>
dsn=5.3.0, status=bounced (Command died with status 13: &quot;/usr/local/bin/st-admin deliver-email --workspace bio&quot;. Command output: open nlw-stats.log: Permission denied at /usr/local/share/perl/5.8.8/Socialtext/Statistics.pm line 103. END failed--call queue aborted. )</blockquote>
<br /><p>
This problem is reported on socialtext-devel list, but no response so far.</p>
<pre>
# sudo vi +24 /usr/local/share/perl/5.8.8/Socialtext/Statistics.pm
Readonly my $LOG_NAME =&gt; 'nlw-stats.log';
Readonly my $LOG_PATH =&gt; $ENV{APACHE_LOG_DIR}
    ? &quot;$ENV{APACHE_LOG_DIR}/$LOG_NAME&quot;       
    : &quot;/tmp/$LOG_NAME&quot;;
</pre>
<br /><h1 id="customize_template">Customize template</h1>
<p>
Remove &quot;Did you know?&quot; box from dashboard</p>
<pre>
sudo vi /usr/share/nlw/template/view/homepage
</pre>
<br /><p>
Or from your <tt>socialtext/nlw</tt> checkout (so that <tt>make install</tt> will install correct one):</p>
<pre>
vi share/template/view/homepage
</pre>
<br /><h1 id="fix_rss_feed_errors">Fix RSS feed errors</h1>
<p>
If you are using <tt>{fetchrss http://blog.rot13.org/index.xml}</tt> and having problems with RSS feeds, try to re-installing two perl modules:</p>
<pre>
sudo cpan XML::RSS XML::Atom
</pre>
<br /><h1 id="change_e_mail_address_of_workspace">Change e-mail address of workspace</h1>
<p>
This configuration change will feed responses to e-mails generated by wiki back into wiki. You might not want to do that! :-)</p>
<pre>
st-admin set-workspace-config --workspace rot13 \
  email_notification_from_address '&quot;random unstructured stuff&quot; &lt;rot13@wiki.rot13.org&gt;'
</pre>
<br /><h1 id="access_simple_version_of_page">Access simple version of page</h1>
<p>
Every SocialText wiki has a lite version available at <a target="_blank" title="(external link)" href="http://wiki.example.com/lite/page/:workspace/">http://wiki.example.com/lite/page/:workspace/</a></p>
<p>
For this wiki it's <a target="_blank" title="(external link)" href="http://saturn.ffzg.hr/lite/page/rot13">http://saturn.ffzg.hr/lite/page/rot13</a></p>
<h1 id="configure_sane_resource_usage">Configure sane resource usage</h1>
<p>
Since SocialText wiki is designed to run on dedicated box, it's resource requiements are not for faint-hearted users. However, if you are installing it on machine with constraint hardware (or virtual machine) you might want to decrease number of <tt>apache-perl</tt> server which are created on startup and kept running. Each apache child takes about 80Mb of RAM, so lowering number of children will have beneficial effect on your memory usage.</p>
<p>
If you open <tt>/etc/apache-perl/st-httpd.conf</tt> you will see comment that describes command used for generating this configuration. So, let's edit command limits, re-create config and restart apache:</p>
<pre>
vi +485 dev-bin/gen-config
dev-bin/gen-config --sitewide --apache-proxy=0 --hostname=saturn.ffzg.hr
/etc/init.d/st-apache reload
</pre>
<br /><h1 id="convert_rss_feed_urls_to_absolute">Convert RSS feed URLs to absolute</h1>
<p>
If you need to fetch RSS feeds from remote URLs and those providers create only relative URLs in feeds (like svnweb does) that this patch might help you: <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/FetchRSSPlugin.pm.diff?action=attachments_download;page_name=socialtext_open_wiki_install;id=20070930135911-0-21709">FetchRSSPlugin.pm.diff</a><!-- wiki: {file: FetchRSSPlugin.pm.diff} --></span></p>
<p>
It does dirty magic to prepend hostname before URL in feeds making them work from Socialtext wiki which is on different host.</p>
<h1 id="problems_with_8_bit_utf_8_encoded_characters_in_urls">Problems with 8-bit UTF-8 encoded characters in URLs</h1>
<p>
It seems that trunk of socialtext</p>
<pre>
Repository Root: https://repo.socialtext.net:8999/svn/socialtext
Repository UUID: 593ce9bc-2028-0410-bb98-c566b643a948
Revision: 6127
Node Kind: directory
Schedule: normal
Last Changed Author: jjp
Last Changed Rev: 6028
Last Changed Date: 2007-12-10 19:38:21 +0100 (Mon, 10 Dec 2007)
</pre>
<br /><p>
has problems with <tt>CGI.pm</tt> 3.31. As a temporary work-around use <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/backpan.sh?action=attachments_download;page_name=socialtext_open_wiki_install;id=20071215215102-0-8116">backpan.sh</a><!-- wiki: {file: backpan.sh} --></span> to download <tt>CGI.pm</tt> 3.29 which is known to work.</p>
<h1 id="enable_html_wafl_in_workspace">Enable html wafl in workspace</h1>
<p>
This enables <tt>.html</tt> markup which enables embedded html into wiki page</p>
<pre>
st-admin set-workspace-config --workspace razmjenavjestina allows_html_wafl 1
</pre>
<br /><h1 id="upgrade_to_2_2">Upgrade to 2.2</h1>
<p>
There are various problems with this upgrade.</p>
<h2 id="socialtext_resting">Socialtext::Resting</h2>
<p>
For a start, you will have to install Socialtext::Resting clinet <strong>in the middle</strong> of <tt>make install</tt> because import of help workspace will fail.</p>
<p>
You can get it from <a target="_blank" title="(external link)" href="https://repo.socialtext.net:8999/svn/socialtext-clients/trunk/rest/perl/Socialtext-Resting">https://repo.socialtext.net:8999/svn/socialtext-clients/trunk/rest/perl/Socialtext-Resting</a></p>
<h2 id="missing_directory">Missing directory</h2>
<pre>
mkdir /etc/apache-perl/socialtext-conf.d
</pre>
<br /><h2 id="missing_skins">Missing skins</h2>
<p>
<a target="_blank" title="(external link)" href="http://code.google.com/p/socialtext-skins/wiki/SkinningIssues">http://code.google.com/p/socialtext-skins/wiki/SkinningIssues</a></p>
<pre>

</pre>
<br /><p>
Problem not yet solved.</p>
<hr />
<span class="nlw_phrase"><div class="wiki-include-page">
<div class="wiki-include-title"><a href='https://saturn.ffzg.hr/rot13/index.cgi?socialtext_css_design' >SocialText CSS design</a> </div>
<div class="wiki-include-content">
<p>
This page collect various parts which used to be in <a href="https://saturn.ffzg.hr/rot13/index.cgi?socialtext_open_wiki_install" title="(218 months) Here are some quick notes about installation on clean Debian etch machine This page is aimed towards...">Socialtext Open Wiki Install</a>, but since they are more oriented towards wiki admins and designers, it's here as separate page.</p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#new_skin_css_design_creation">Dobrica Pavlinušić's random unstructured stuff (New skin (CSS design) creation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] New skin (CSS design) creation} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#keep_local_changes_in_svn">Dobrica Pavlinušić's random unstructured stuff (Keep local changes in SVN)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Keep local changes in SVN} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="new_skin_css_design_creation">New skin (CSS design) creation</h1>
<pre>
cd /usr/share/nlw/css/
cp -r st rot13
st-admin set-workspace-config --workspace rot13 skin_name rot13
vi rot13/screen.css
</pre>
<br /><p>
See also <a target="_blank" title="(external link)" href="http://www.eu.socialtext.net/open/index.cgi?css_kit">CSS kit<!-- wiki-renamed-hyperlink "CSS kit"<http://www.eu.socialtext.net/open/index.cgi?css_kit> --></a> at SocialText Open Wiki</p>
<h1 id="keep_local_changes_in_svn">Keep local changes in SVN</h1>
<p>
It's important to save local modifications, because next <tt>make install</tt> <strong>will overwrite</strong> your changes in <tt>/usr/share/nlw</tt>. One possibility is to do overlay svn checout over <tt>/usr/share/nlw</tt> and than <tt>svn add</tt> and <tt>svn commit</tt> every change:</p>
<pre>
cd /usr/share
svn co file:///data/st-custom/share nlw.svn
cd nlw.svn
find . | cpio -pdu ../nlw/
cd - &amp;&amp; rm -Rf nlw.svn
cd nlw
svn info
</pre>
</div></div><!-- wiki: {include: [SocialText CSS design]} --></span><br /></div>
<hr/><div>Attachments: backpan.sh, FetchRSSPlugin.pm.diff</div>]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>howto, SocialText</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?socialtext_open_wiki_install</guid>
<pubDate>Thu, 22 May 2008 16:00:39 -0000</pubDate>
</item>
<item>
<title><![CDATA[https using stunnel]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?https_using_stunnel</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: howto, http, https, ssl</div><hr/><div class="wiki">
<p>
Quick guide based on <a target="_blank" title="(external link)" href="http://www.edna.narrabilis.com/2006/06/01/stunnel-for-mysql-server-and-client/">stunnel for mysql - server and client<!-- wiki-renamed-hyperlink "stunnel for mysql =- server and client"<http://www.edna.narrabilis.com/2006/06/01/stunnel=-for=-mysql=-server=-and=-client/> --></a> to add https to existing http server on demand.</p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#installation">Dobrica Pavlinušić's random unstructured stuff (Installation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Installation} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#create_certificate">Dobrica Pavlinušić's random unstructured stuff (Create certificate)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Create certificate} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#configuration_file">Dobrica Pavlinušić's random unstructured stuff (Configuration file)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Configuration file} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#start_tunnel">Dobrica Pavlinušić's random unstructured stuff (Start tunnel)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Start tunnel} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="installation">Installation</h1>
<pre>
apt-get install stunnel4
</pre>
<br /><h1 id="create_certificate">Create certificate</h1>
<pre>
cd /etc/stunnel
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout https.pem -out https.pem
</pre>
<br /><h1 id="configuration_file">Configuration file</h1>
<p>
<tt>/etc/stunnel/httpd.conf</tt></p>
<pre>
cert = /etc/stunnel/https.pem
sslVersion = SSLv3
debug = 7

[https]
accept  = 443
connect = 80
TIMEOUTclose = 0
</pre>
<br /><h1 id="start_tunnel">Start tunnel</h1>
<pre>
stunnel4 /etc/stunnel/https.conf
</pre>
</div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>howto, http, https, ssl</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?https_using_stunnel</guid>
<pubDate>Sun, 20 Jan 2008 15:43:20 -0000</pubDate>
</item>
<item>
<title><![CDATA[Cisco VPN]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?cisco_vpn</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: Cisco, howto, linux, vpn</div><hr/><div class="wiki">
<p>
Use <a target="_blank" title="(external link)" href="http://svn.unix-ag.uni-kl.de/vpnc/">vpnc<!-- wiki-renamed-hyperlink "vpnc"<http://svn.unix=-ag.uni=-kl.de/vpnc/> --></a> instead of Cisco VPN client</p>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#source">Dobrica Pavlinušić's random unstructured stuff (Source)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Source} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#support_template">Dobrica Pavlinušić's random unstructured stuff (Support template)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Support template} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#start_connection">Dobrica Pavlinušić's random unstructured stuff (Start connection)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Start connection} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#fix_routes">Dobrica Pavlinušić's random unstructured stuff (Fix routes)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Fix routes} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="source">Source</h1>
<pre>
svn co http://svn.unix-ag.uni-kl.de/vpnc/trunk vpnc
cd vpnc
make
sudo make install
</pre>
<br /><h1 id="support_template">Support template</h1>
<pre>
pcf2vpnc Support_template.pcf &gt; /etc/vpnc/foobar.conf
</pre>
<br /><p>
Hash password security, eh?</p>
<h1 id="start_connection">Start connection</h1>
<pre>
sudo /usr/local/sbin/vpnc --no-detach --debug 2 foobar
</pre>
<br /><h1 id="fix_routes">Fix routes</h1>
<p>
I didn't like that all my traffic was going over VPN</p>
<pre>
sudo route del default
route add default gw 192.168.1.1
route add -net 192.168.4.0 netmask 255.255.255.0 dev tun0
</pre>
</div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>Cisco, howto, linux, vpn</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?cisco_vpn</guid>
<pubDate>Tue, 23 Oct 2007 18:26:02 -0000</pubDate>
</item>
</channel>
</rss>