<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5590772396683017088</id><updated>2012-01-26T10:26:45.979+02:00</updated><category term='embedded'/><category term='Jason Calacanis'/><category term='Debian'/><category term='zapec'/><category term='Canon CLC 3200'/><category term='OpenOffice'/><category term='SDK'/><category term='Digital-OPSiS'/><category term='battery drain'/><category term='asterisk'/><category term='ssh tunnel'/><category term='CUPS'/><category term='fax'/><category term='python'/><category term='GalaxyHero'/><category term='opencoffee'/><category term='GoogleEarth Ubuntu'/><category term='hashlib'/><category term='OSLEC'/><category term='Zaptel'/><category term='Samsung'/><category term='ubuntu'/><category term='PRI'/><category term='md5'/><category term='Android'/><category term='AIX'/><category term='i7500'/><category term='Galaxy'/><title type='text'>Beyond bits and bytes</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-7261467296045775819</id><published>2012-01-26T09:56:00.002+02:00</published><updated>2012-01-26T10:26:45.988+02:00</updated><title type='text'>NetMos 9845 Multiserial on Ubuntu 10.04</title><content type='html'>I have installed a NetMos 9845 Multiserial (8 port) card on my pc as i need several serial ports for a project.&lt;br /&gt;Problem is Ubuntu does not recognize more than 4 ports by default.&lt;br /&gt;To solve this you need to add a kernel boot parameter to instruct the kernel during boot to look for more serial devices.&lt;br /&gt;&lt;br /&gt;With Grub2 on the machine, you can no longer edit the grub kernel parameters directly as Grub2 uses a templeting system.&lt;br /&gt;So use your favorite editor and open (as root)&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;/etc/default/grub&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;there you will see a line&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;change it to&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;GRUB_CMDLINE_LINUX_DEFAULT="quiet splash 8250.nr_uarts=8"&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;save the file and then issue the command&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sudo update-grub&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;for the changes to take effect&lt;br /&gt;&lt;br /&gt;Reboot your machine and check dmesg for the number of serial ports you now have&lt;br /&gt;In my case it looks like this &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;:/etc/grub.d$ dmesg | grep ttyS&lt;br /&gt;[    0.709951] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A&lt;br /&gt;[    0.710235] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A&lt;br /&gt;[    0.710400] 0000:05:01.0: ttyS4 at I/O 0xc000 (irq = 19) is a 16550A&lt;br /&gt;[    0.710477] 0000:05:01.0: ttyS5 at I/O 0xc100 (irq = 19) is a 16550A&lt;br /&gt;[    0.710551] 0000:05:01.0: ttyS6 at I/O 0xc200 (irq = 19) is a 16550A&lt;br /&gt;[    0.710626] 0000:05:01.0: ttyS7 at I/O 0xc300 (irq = 19) is a 16550A&lt;br /&gt;[    0.710700] 0000:05:01.0: ttyS1 at I/O 0xc400 (irq = 19) is a 16550A&lt;br /&gt;[    0.710775] 0000:05:01.0: ttyS2 at I/O 0xc500 (irq = 19) is a 16550A&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;You can also check the number and setting of the serial ports using the setserial command for every port&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sudo setserial  /dev/ttyS7 -a &lt;br /&gt;/dev/ttyS7, Line 7, UART: 16550A, Port: 0xc300, IRQ: 19&lt;br /&gt; Baud_base: 115200, close_delay: 50, divisor: 0&lt;br /&gt; closing_wait: 3000&lt;br /&gt; Flags: spd_normal skip_test&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-7261467296045775819?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/7261467296045775819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=7261467296045775819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7261467296045775819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7261467296045775819'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2012/01/netmos-9845-multiserial-on-ubuntu-1004.html' title='NetMos 9845 Multiserial on Ubuntu 10.04'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-2380880748010689865</id><published>2012-01-22T10:36:00.002+02:00</published><updated>2012-01-22T11:14:05.329+02:00</updated><title type='text'>Getting your Android phone recognized by adb for debugging</title><content type='html'>In an &lt;a href="http://skoroneos.blogspot.com/2009/11/setting-up-android-sdk-on-ubuntu-for.html"&gt;older post&lt;/a&gt; i have shown hot to get a Samsung phone "recognized"  by adb for debugging.&lt;br /&gt;These were the "early days" of Android development...&lt;br /&gt;Since then Android got more mature (so did adb) and now there are many companies producing Android compatible phones that developers want to use for testing/debugging their apps.&lt;br /&gt;One of the main issues people have in Ubuntu is how to get the correct udev rules for their phone, as there are many sites ans post with old info or targeting specific phones.&lt;br /&gt;The other problem developers face is how to use the phone in debug mode without having to run adb as root.&lt;br /&gt;&lt;br /&gt;First thing to do is have a go at the official &lt;a href="http://developer.android.com/guide/developing/device.html"&gt;Android dev page&lt;/a&gt;&lt;br /&gt;It has (most of) the instruction you need to get your phone connected and recognized.&lt;br /&gt;&lt;br /&gt;It all boils down to creating a new udev rule file and adding something like this&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev" &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Basically you have to tell udev that devices with idVendor=="0bb4" should get read/write privileges (the MODE="0666" part) for the group "plugdev"&lt;br /&gt;In this example, the vendor ID 0bb4 is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.&lt;br /&gt;&lt;br /&gt;It also has an extensive list of vendor id's you can use to match your device.&lt;br /&gt;&lt;br /&gt;In case your device manufacturer is not in that list, there is an easy way to find the vendor id of your device.&lt;br /&gt;Connect your device and issue &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;lsusb&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;and you will get a list of connected usb devices and their associated vendor and device id's&lt;br /&gt;&lt;br /&gt;in my case it looks like this&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;Bus 001 Device 015: ID 12d1:1038 Huawei Technologies Co., Ltd. &lt;br /&gt;Bus 001 Device 005: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter&lt;br /&gt;Bus 001 Device 004: ID 05e3:0702 Genesys Logic, Inc. USB 2.0 IDE Adapter&lt;br /&gt;Bus 001 Device 003: ID 0409:0050 NEC Corp. &lt;br /&gt;Bus 001 Device 002: ID 03f0:4105 Hewlett-Packard ScanJet 4370&lt;br /&gt;Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Locate your device (in this case it's the Huawei Technologies Co., Ltd) and the first part of the ID 12d1:1038 (i.e the 12d1) is the idVendor you need you need to put in the udev rules&lt;br /&gt;&lt;br /&gt;Another common problem developers face is that although the udev rules are correct the phone does not connect to adb and shows up as a number of ???????????? when issuing an "adb devices" command.&lt;br /&gt;&lt;br /&gt;The only way to get the phone connected is to start the adb with root privileges using sudo ,which in my book is a big "NoNo"&lt;br /&gt;To solve this you need to set the correct user and group in the udev rules&lt;br /&gt;Here is how my udev entry looks like&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", OWNER="your-user-name" GROUP="your-group"&lt;br /&gt;SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;To get your username and group issue the command&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;id&lt;/blockquote&gt;&lt;br /&gt;and look for the uid and gid entries&lt;br /&gt;in my case they look like this&lt;br /&gt;&lt;br /&gt;uid=1000(stelios) gid=1000(stelios)&lt;br /&gt;&lt;br /&gt;Use the uid name in parenthesis in the OWNER and gid name in the GROUP, restart udev and now you will be able to access the phone from adb as a normal user without having to issue sudo&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-2380880748010689865?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/2380880748010689865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=2380880748010689865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/2380880748010689865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/2380880748010689865'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2012/01/getting-your-android-phone-recognized.html' title='Getting your Android phone recognized by adb for debugging'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-1590775218827197706</id><published>2011-06-19T22:47:00.003+03:00</published><updated>2011-06-19T23:01:35.385+03:00</updated><title type='text'>Running out of inodes</title><content type='html'>Here is the problem.&lt;br /&gt;Had a gazillion of small files stored in a 1TB partition and everything was fine, then we need it to move these files to a smaller partition and guess what, we could not.&lt;br /&gt;What happened is that we would run out of inodes in the new smaller partition when copying the data over.&lt;br /&gt;&lt;br /&gt;Lesson learned ?&lt;br /&gt;If you create a small partition and have a ton of small files&lt;span style="font-weight:bold;"&gt; you will&lt;/span&gt; run out of inodes, and if you use Ext4 and have flex_bg in features, then &lt;span style="font-weight:bold;"&gt;you can't use tune2fs to increase inodes&lt;/span&gt; in that partition.&lt;br /&gt;So then the only option is to reformat the partition and increase the number of inodes&lt;br /&gt;&lt;br /&gt;Some would argue that you could use an other filesystem with dynamic inode allocation, but personally I would go with ext4 over any version of riserfs,xfs whatever as its way more mature.&lt;br /&gt;&lt;br /&gt;To avoid the problem do the following when formatting:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;mkfs.ext4 -I 512 /dev/foo &lt;br /&gt;tune2fs -i0 -c0 -o journal_data_writeback /dev/foo&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Formatting this way will give you way more inodes than a "normal" format would as it increases the inode size from the default 256.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-1590775218827197706?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/1590775218827197706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=1590775218827197706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/1590775218827197706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/1590775218827197706'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2011/06/running-out-of-inodes.html' title='Running out of inodes'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-3162703173623266482</id><published>2011-01-14T11:39:00.004+02:00</published><updated>2011-01-14T11:52:11.222+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CUPS'/><category scheme='http://www.blogger.com/atom/ns#' term='GoogleEarth Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='Canon CLC 3200'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><title type='text'>Canon CLC 3200 Ubuntu and Debian  Drivers</title><content type='html'>If you are looking for the CUPS drivers of the &lt;a href="http://www.canon-europe.com/For_Work/Products/Professional_Print/Digital_Colour_Production/CLC3200/index.asp"&gt;Canon CLC 3200&lt;/a&gt; for Ubuntu and Debian you can get them from here for both 32 and 64 bit version.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;meta equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;a href="http://software.canon-europe.com/products/0010073.asp"&gt;http://software.canon-europe.com/products/0010073.asp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Have tested them on Ununtu 10.04 both on 32bit and 64bit machines and works great.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-3162703173623266482?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/3162703173623266482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=3162703173623266482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3162703173623266482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3162703173623266482'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2011/01/canon-clc-3200-ubuntu-and-debian.html' title='Canon CLC 3200 Ubuntu and Debian  Drivers'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-7624789489415519336</id><published>2010-10-04T10:54:00.002+03:00</published><updated>2010-10-04T10:58:44.525+03:00</updated><title type='text'>Using the web2py framework on Eclipse</title><content type='html'>Here is a &lt;a href="http://allisterx.multiply.com/journal/item/274/Using_the_web2py_framework_on_Eclipse"&gt;nice post&lt;/a&gt; on getting &lt;a href="http://www.web2py.com/"&gt;web2py&lt;/a&gt; to work through Eclipse for faster/better debugging&lt;div&gt;&lt;br /&gt;web2py is one of the best Python frameworks out there are the moment and if you are into Python or looking for a framework to develop the next "killer" web app have a look at it.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-7624789489415519336?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/7624789489415519336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=7624789489415519336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7624789489415519336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7624789489415519336'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2010/10/using-web2py-framework-on-eclipse.html' title='Using the web2py framework on Eclipse'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-9452299534914638</id><published>2010-05-27T12:41:00.003+03:00</published><updated>2010-05-27T13:36:27.968+03:00</updated><title type='text'>Fix asterisk addons problems for Ubuntu</title><content type='html'>There is a &lt;a href="https://bugs.launchpad.net/ubuntu/+source/asterisk-addons/+bug/560656"&gt;bug&lt;/a&gt; in the recent asterisk-addons package shipped with Ubuntu 10.04&lt;br /&gt;The result is that all the modules that are part of the package fail to load with a message like this&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;WARNING[13478]: loader.c:800 load_resource: Module 'app_addon_sql_mysql' could not be loaded.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Till this get fixed by the Ubuntu people here a quick fix&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sudo aptitude install asterisk-dev&lt;br /&gt;wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.2.1.tar.gz&lt;br /&gt;tar xvzf asterisk-addons-1.6.2.1.tar.gz&lt;br /&gt;cd asterisk-addons-1.6.2.1&lt;br /&gt;./configure&lt;br /&gt;make&lt;br /&gt;&lt;br /&gt;sudo su&lt;br /&gt;&lt;br /&gt;cp -a apps/*.so /usr/lib/asterisk/modules/ &lt;br /&gt;cp -a cdr/*.so /usr/lib/asterisk/modules/&lt;br /&gt;cp -a channels/*.so /usr/lib/asterisk/modules/&lt;br /&gt;cp -a formats/*.so /usr/lib/asterisk/modules/&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-9452299534914638?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/9452299534914638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=9452299534914638' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/9452299534914638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/9452299534914638'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2010/05/fix-asterisk-addons-problems-for-ubuntu.html' title='Fix asterisk addons problems for Ubuntu'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-5833694188482197558</id><published>2010-05-14T08:36:00.002+03:00</published><updated>2010-05-14T08:38:58.866+03:00</updated><title type='text'>Generate passwords with crypt and random salt</title><content type='html'>Here is a small perl script i found sometime ago to generate crypted passwords with random salt values&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;$plain=$ARGV[0];  ##  Read the command line argument&lt;br /&gt;&lt;br /&gt;if (!$plain){ ##  No parameter pased&lt;br /&gt;  print "Usage: $0 plain_text_password\n";&lt;br /&gt;  exit;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;##  Use the Process id &amp; time to generate the salt.&lt;br /&gt;srand($$|time);                                 # random seed&lt;br /&gt;@saltchars=(a..z,A..Z,0..9,'.','/');            # valid salt chars&lt;br /&gt;$salt=$saltchars[int(rand($#saltchars+1))];     # first random salt char&lt;br /&gt;$salt.=$saltchars[int(rand($#saltchars+1))];    # second random salt char&lt;br /&gt;$newuser = crypt ($newuser, $salt);&lt;br /&gt;&lt;br /&gt;##  Generate the encrypted password&lt;br /&gt;$crypted=crypt ($plain, $salt);&lt;br /&gt;&lt;br /&gt;print $crypted,"\n";&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-5833694188482197558?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/5833694188482197558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=5833694188482197558' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/5833694188482197558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/5833694188482197558'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2010/05/generate-passwords-with-crypt-and.html' title='Generate passwords with crypt and random salt'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-363914092259715944</id><published>2010-03-02T08:58:00.003+02:00</published><updated>2010-03-02T09:44:30.546+02:00</updated><title type='text'>Τα μαύρα χάλια μας και καλό κουράγιο</title><content type='html'>Παρακολουθώ τους τελευταίους μήνες όλα αυτά που συμβαίνουν γύρω από τα οικονομικά της χώρας και πραγματικά αναρωτιέμαι ο 2 χρόνος γιός μου σε τι κατάσταση θα ζήσει.&lt;br /&gt;&lt;br /&gt;Ξεκινήσαμε από το "η κρίση εμάς δεν πιάνει", ακούσα για λεφτά που υπήρχαν και μετά "εξαφανίστηκαν" και έγιναν κοψίματα μισθών, νέους έμμεσους φόρους (τη χειρότερη μορφή φορολόγησης) μέτρα εδώ, μέτρα εκεί, κομπίνες, ρεμούλες και κατασπατάληση χρημάτων αλλά πουθένα δεν άκουσα κάποιον από τους πολιτικούς μας να αναλαμβάνει ευθύνη για αυτά που έχουν γίνει στην χώρα τα τελευταία 40 χρόνια και μας έχουν οδηγήση σε αυτή τη θέση.&lt;br /&gt;&lt;br /&gt;Λέω μήπως, μήπως οι κύριοι βουλευτές, υπουργοί και λοιποί "παρά το ...."  (συμπληρώστε το κενό με ότι καρεκλοκένταυρο θέλετε) θα έπρεπε πρώτα να κόψουν τις δικές τους *πραγματικές* αμοιβές 50% και μετά να ζητήσουν από όλους τους υπόλοιπους να "θυσιασούν" μισθούς και λοιπά άλλα ?&lt;br /&gt;Όχι ότι θα σωθούμε έτσι, (γιατί και του χρόνου, αν δεν υπάρξει διακανονισμός τους χρέους, &lt;a href="http://www.livepedia.gr/index.php/Σεισάχθεια"&gt;σεισάχθια&lt;/a&gt; το είπαν οι αρχαίοι τα ίδια και περισσότερα θα χρωστάμε) άλλα το να βάζουν όλοι αυτοί που έριξαν τη χώρα στα "βράχια" με τις πολιτκές τους,τις αποφάσεις τους και τις λοπές ρεμούλες τα τελευταία 40 χρόνια, τους "άλλους" να την ξελασπώσουν *πάλι*, και αυτοί να κάνουν εξεταστικές και να τσεπώνουν τα 300άρια άνα συνδρίαση είναι λίγο...γυφτιά.&lt;br /&gt;Από την άλλη όμως, οι γύφτοι μια χαρά άνθρωποί είναι και δεν φταίνε σε τίποτα για την σημερινή κατάσταση, οπότε μάλλον θα πρέπει να αλλάξουμε τη λέξη από γυφτιά σε "βουλεφτιά" ή "πολιτεφτιά" γιατί μόνο έτσι μπορούμε να καταλάβουμε το πραγματικό νόημα του τι συμβαίνει.&lt;br /&gt;&lt;br /&gt;Και για να μην παρεξηγούμαστε, όχι ότι είμαι αντίθετος στη μείωση της σπατάλης στο Δημόσιο, το κόψιμο των "επιδομάτων" στους αργόσχολους του Δημοσίου (έδω καταντήσαμε να παίρνουν επίδομα για να μην παίρνουν 'φακελάκι'και καλά) από τους οποίους οι μισοί τουλάχιστον θα έπρεπε να πάρουν πόδι και να πάνε σπίτια τους.&lt;br /&gt;&lt;br /&gt;Δυστηχώς το μόνο που θα καταφέρουν οι πολιτικοί μας θα είναι μια τρύπα στο νερό, τα νούμερα δεν κάνουν λάθος.&lt;br /&gt;Αν χρωστάς παραπάνω από αυτά που παράγεις δεν υπάρχει περίπτωση ποτέ να μπορέσεις να μειώσεις το χρέος.&lt;br /&gt;Στην καλύτερη περίπτωση μπορείς να το μετατοπίσεις για "λίγο αργότερα" (όπως γίνονταν συστηματικά μέχρι τώρα) αλλά το τέλος θα είναι πάντα το ίδιο. Θα πτωχεύσης.&lt;br /&gt;&lt;br /&gt;Είμαστε σαν το ασθενή που είναι στην εντατική και οι "συγγενείς και φίλοι" τον κρατάνε στη ζωή για να μπορέσει να τους γράψει το "οικοπεδάκι" και να πάρουν ότι μπρορούν πριν το "μοιραίο", και το "μοιραίο" ίσως είναι πιο κοντά από όσο εμείς νομίζουμε.&lt;br /&gt;&lt;br /&gt;Οπότε, καλό κουράγιο Έλληνες.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-363914092259715944?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/363914092259715944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=363914092259715944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/363914092259715944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/363914092259715944'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2010/03/blog-post.html' title='Τα μαύρα χάλια μας και καλό κουράγιο'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-2313054231879419520</id><published>2010-02-16T16:20:00.004+02:00</published><updated>2010-02-16T16:28:04.005+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenOffice'/><title type='text'>Creating OpenOffice Horizontal Lines</title><content type='html'>Following is a 'shortcut' for OpenOffice to create horizontal lines&lt;br /&gt;&lt;br /&gt;Horizontal lines can be created in Writer by typing a specific symbol three times on a line by itself and then pressing Enter. &lt;br /&gt;The choice of symbol * - = # ~ _  decides the type of line that is created.&lt;br /&gt;&lt;br /&gt;You can find more shortcuts and other OpenOfice related stuff &lt;a href="http://dotancohen.com/eng/openoffice_tricks.html"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-2313054231879419520?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/2313054231879419520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=2313054231879419520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/2313054231879419520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/2313054231879419520'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2010/02/creating-openoffice-horizontal-lines.html' title='Creating OpenOffice Horizontal Lines'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-1377513538760147808</id><published>2010-02-08T18:57:00.006+02:00</published><updated>2010-02-12T09:36:24.846+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PRI'/><category scheme='http://www.blogger.com/atom/ns#' term='OSLEC'/><category scheme='http://www.blogger.com/atom/ns#' term='Zaptel'/><category scheme='http://www.blogger.com/atom/ns#' term='zapec'/><category scheme='http://www.blogger.com/atom/ns#' term='asterisk'/><category scheme='http://www.blogger.com/atom/ns#' term='fax'/><title type='text'>Solving fax issues in Asterisk</title><content type='html'>"Asterisk","fax" and "problem" are three words  you find often in forums and threads of people looking for help.&lt;br /&gt;In the age of email,and pdf there are still large number of companies relying in fax to transmit documents.&lt;br /&gt;The reasons are many, but the problems implementors face are common.&lt;br /&gt;&lt;br /&gt;Bad quality of faxes with "missing" or malformed lines, large number of failed faxes etc.&lt;br /&gt;Most of this issues come from two facts.&lt;br /&gt;The first is that we are trying to use a medium that was primarily designed for human voice to carry high speed analog modem signals and second,that fax standards are &lt;a href="http://www.soft-switch.org/ramblings/?p=11"&gt;not so "standard".&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Putting asterisk to handle faxes can be both a blessing and a curse for those two reasons.&lt;br /&gt;&lt;br /&gt;Asterisk has the ability to detect if an incoming (or outgoing) call is a fax and do a number of things, depending if its acting as a "pass-through" or receive the fax.&lt;br /&gt;&lt;br /&gt;The first thing Asterisk does is try to detect if the call is a fax call and shutdown the echo canceler on that channel.&lt;br /&gt;For this to work, asterisk listens for the CNG tone emitted by the calling fax and if found, disables the echo canceler in zaptel.&lt;br /&gt;&lt;br /&gt;The CNG is in the CCITT (ITU-T) Recommendation T.30 and describes how FAX calls are established.&lt;br /&gt;&lt;br /&gt;During the call setup/establishment process, there are two tone signals that are send:&lt;br /&gt;&lt;br /&gt;CNG and CED&lt;br /&gt;&lt;br /&gt;The CNG signal *may* be sent from the Originating FAX machine after dialing is complete. &lt;br /&gt;The CNG signal consists of the transmission of 1100 Hz for 1/2 second, followed by a 3 second silent (2100 Hz OFF) period.&lt;br /&gt;&lt;br /&gt;The CED signal *may* be sent by the Terminating FAX machine anywhere between 1.8 to 2.5 seconds AFTER answering the call. The CED signal consists of a 2100 Hz tone that is from 2.6 to 4 seconds in duration. The CED tone is useful for disabling any echo cancellers on the line.&lt;br /&gt;&lt;br /&gt;(notice the *may*, don't you love clearly defined standards ;)&lt;br /&gt;&lt;br /&gt;Asterisk then tries to redirect the call flow to the 'fax' extension, if its present in the context that is currently executing in the dialplan.&lt;br /&gt;There you can use an asterisk application to receive faxes or redirect to another port etc.&lt;br /&gt;&lt;br /&gt;Recently we faced a problem with one of our clients that is using an E1 for voice and fax calls.&lt;br /&gt;The calls come in through the E1 and the faxes are connected to an 8 port analog card &lt;br /&gt;Some of the faxes received had quality issues and we tried to figure out what the problem was.&lt;br /&gt;&lt;br /&gt;After a lot of head scratching and countless tries we realized two things.&lt;br /&gt;The PRI card was somehow "loosing" some frames and that the echo canceler, &lt;a href="http://www.rowetel.com/ucasterisk/oslec.html"&gt;OSLEC&lt;/a&gt; in this case, was not shutting down when a fax was received.&lt;br /&gt;The first issue was easy to solve, as we discovered that the PRI card was sharing the same IRQ as the network card, so switching the pci slot and making sure that the PRI did not share IRQ's with any other device.&lt;br /&gt;&lt;br /&gt;The tricky part was to figure out why the echo canceler was not shutting down when the call was a fax call.&lt;br /&gt;The problem with an E1 (or T1) is that the calls don't use "fixed" channel numbers as in a pstn card for example, where you know that number X is on channel Y.&lt;br /&gt;The provider is sending the call to the first available channel and its up to the dialplan to determine where the call would be routed.&lt;br /&gt;Shutting down the echo canceler manually for all of the E1 channels, solved the issue of the faxes but created 'random' problems of echo to the voice channels.&lt;br /&gt;&lt;br /&gt;So i started looking in detail (i.e the code) how asterisk detects faxes.&lt;br /&gt;&lt;br /&gt;What i realized is that asterisk needs a 3-5 seconds *after* the call is answered to determine if this is a fax call,shutdown the echo canceler and then jump to the 'fax' priority.&lt;br /&gt;If you "bridge" the call to another zap channel (or to sip channel of an ATA for example) before that, then the EC stays on.&lt;br /&gt;And this was exactly what we were doing in our case.&lt;br /&gt;As soon as the call come in, we bridged it to the analog card, not giving enough time to asterisk to shutdown the EC.&lt;br /&gt;&lt;br /&gt;So the problem can be solved by adding a delay of 5 seconds and let asterisk plenty of time to determine is this is a fax call or if your extension is a fax only extension (i.e you don't expect to receive any voice calls on that number) explicitly disable the echo canceller using the zapec(off) command in the dialplan.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[PRI_INCOMING]&lt;br /&gt;&lt;br /&gt;exten =&gt; _XXXX,1,NoOP(Incoming call)&lt;br /&gt;exten =&gt; _XXXX,n,answer()&lt;br /&gt;;give the caller something to hear while we wait.&lt;br /&gt;exten =&gt; _XXXX,n,Ringing&lt;br /&gt;exten =&gt; _XXXX,n,Wait(5)&lt;br /&gt;&lt;br /&gt;This was not a fax but a normal call so let's answer it&lt;br /&gt;exten =&gt; _XXXX,n,Dial(SIP/&lt;your-sip-phone&gt;,30,r)&lt;br /&gt;exten =&gt; _XXXX,n,Hangup()&lt;br /&gt;&lt;br /&gt;;This is were we land if asterisk detects a fax call&lt;br /&gt;exten =&gt; fax,1,Goto(in_fax,s,1)&lt;br /&gt;&lt;br /&gt;;FAX&lt;br /&gt;[in_fax]&lt;br /&gt;;turn the echo canceler off for this channel&lt;br /&gt;exten =&gt; s,1,ZapEC(off)&lt;br /&gt;;call the zap channel the fax is connected to&lt;br /&gt;exten =&gt; s,n,Dial(ZAP&lt;your-fax-line&gt;,60,r,tT)&lt;br /&gt;exten =&gt; s,n,Hangup&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;One drawback of having a single line handling both fax and voice is that detection can not be 100% accurate.&lt;br /&gt;This can be either because Asterisk did not detect correctly the CNG or the that calling fax was not sending a CNG at all.&lt;br /&gt;&lt;br /&gt;A quick note here is that all of the above are true for zaptel based channels (pri and pstn cards) plus bristuffed (bri) zaptel.&lt;br /&gt;I am not 100% sure how other channels (Sangoma for example) handle this.&lt;br /&gt;&lt;br /&gt;And one last advice.&lt;br /&gt;To make the quality of of faxes even better make sure that you have the &lt;a href="http://en.wikipedia.org/wiki/Error_correction_mode"&gt;ECM mode&lt;/a&gt; of the fax turned on both for transmition and reception.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-1377513538760147808?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/1377513538760147808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=1377513538760147808' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/1377513538760147808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/1377513538760147808'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2010/02/solving-fax-issues-in-asterisk.html' title='Solving fax issues in Asterisk'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-3547723538830236195</id><published>2010-02-04T16:18:00.003+02:00</published><updated>2010-02-04T16:24:01.595+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hashlib'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='md5'/><title type='text'>Get the md5 hash of a file from Python</title><content type='html'>Python has a module called &lt;a href="http://docs.python.org/library/hashlib.html"&gt;haslib&lt;/a&gt; that provides secure hashes and message digests.&lt;br /&gt;To get the md5 hash of a file all you have to do is this&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;import hashlib&lt;br /&gt;&lt;br /&gt;in_file=open('path/to/file','rb').read()&lt;br /&gt;hashlib.md5(in_file).hexdigest()&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-3547723538830236195?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/3547723538830236195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=3547723538830236195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3547723538830236195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3547723538830236195'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2010/02/get-tge-md5-hash-of-file-from-python.html' title='Get the md5 hash of a file from Python'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-6367234058402607217</id><published>2010-02-01T11:07:00.001+02:00</published><updated>2010-02-01T11:09:17.919+02:00</updated><title type='text'>Life imitating art ?</title><content type='html'>With the pending financial crisis in Greece, and with the recognition that our poticians have the *MAJOR* blame for what's coming, i still could not figure out why there are so many negative reports about the Greek economy that makes borrowing even more expensive and thus hindering even more the efforts for a recovery.&lt;br /&gt;Then i remembered one of the dialogs from the movie "Sneakers"&lt;br /&gt;&lt;br /&gt;Cosmo: Posit: People think a bank might be financially shaky.&lt;br /&gt;Martin Bishop: Consequence: People start to withdraw their money.&lt;br /&gt;Cosmo: Result: Pretty soon it is financially shaky.&lt;br /&gt;Martin Bishop: Conclusion: You can make banks fail.&lt;br /&gt;Cosmo: Bzzt. I've already done that. Maybe you've heard about a few? Think bigger.&lt;br /&gt;Martin Bishop: Stock market?&lt;br /&gt;Cosmo: Yes.&lt;br /&gt;Martin Bishop: Currency market?&lt;br /&gt;Cosmo: Yes.&lt;br /&gt;Martin Bishop: Commodities market?&lt;br /&gt;Cosmo: Yes.&lt;br /&gt;Martin Bishop: Small countries?&lt;br /&gt;&lt;br /&gt;And these come out of movie script back in 1992...&lt;br /&gt;Life imitating art ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-6367234058402607217?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/6367234058402607217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=6367234058402607217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/6367234058402607217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/6367234058402607217'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2010/02/life-imitating-art.html' title='Life imitating art ?'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-4598757545597813688</id><published>2010-01-25T19:05:00.004+02:00</published><updated>2010-01-25T19:15:29.559+02:00</updated><title type='text'>Reverting an SVN commit</title><content type='html'>Here is a one liner that helps a lot when trying to revert to an old commit after you realized that you have foobared your repository.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;svn merge -c -R repository &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;where -R is the revision number you want to revert to.&lt;br /&gt;What happens is that if R is negative it will be regarded as an inverse merge and the commit will be removed instead of added.&lt;br /&gt;&lt;br /&gt;so&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;svn -c -99 http://svn.somewhere.com/trunk&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;will revert you trunk to revision 99&lt;br /&gt;&lt;br /&gt;P.S Don't forget to commit after the merge if you want the reversal to be permanent&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-4598757545597813688?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/4598757545597813688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=4598757545597813688' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/4598757545597813688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/4598757545597813688'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2010/01/reverting-svn-commit.html' title='Reverting an SVN commit'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-5072704025558887155</id><published>2010-01-23T14:30:00.003+02:00</published><updated>2010-01-23T15:33:07.831+02:00</updated><title type='text'>Using SAPI 4/5 voices with text to speech in Asterisk</title><content type='html'>For a while now i have been working on TTS (text to speech) on Asterisk for a startup i am running with two friends. &lt;br /&gt;One of my biggest problems was that the available voices for Greek in linux are very limited,sounding like robots with a laryngitis problem in some cases. &lt;br /&gt;And from what i understood (or actually hear) with the exception of English most of the other languages had similar problems.&lt;br /&gt;Windows has a large number of commercial "voices" that use the SAPI interface like the AT&amp;T natural voices, Nuance, and Loqundo, but i could not find any solution that would allow me to use them with Asterisk.&lt;br /&gt;Plus i wanted something that could easily scale to hundreds of channels and be low costs or free as in beer.&lt;br /&gt;&lt;br /&gt;So i used pyTTS and web2py to create, in essence, a web service that given a string returns a file with the spoken text.&lt;br /&gt;This service runs on a Windows machine and provides a very simple API to allow selection of the language,voice and fine tuning that might be required.&lt;br /&gt;Once the service is invoked it returns a wav file with the spoken text.&lt;br /&gt;&lt;br /&gt;A simple python script on the asterisk side provides a library, called ast-SAPI, that handles the communication with the web service and returns a wav file.&lt;br /&gt;it pretty much works the same way as flite when its told to create wav files.&lt;br /&gt;&lt;br /&gt;At the moment the ast-sapi gets called by a Python AGI script.&lt;br /&gt;The Python AGI receives the text and settings from the Asterisk dialplan, calls the library and then streams the resulting wav.&lt;br /&gt;Also got an asterisk app build using flite's asterisk app as a template,to do the same from the dialplan and avoid the AGI. It works but there are some issues that need to be addressed.&lt;br /&gt;&lt;br /&gt;The benefits of this solution are many.&lt;br /&gt;&lt;br /&gt;I get good quality voices to use with asterisk and since this is similar to a web service is easy to scale and spread the load to many machines.&lt;br /&gt;&lt;br /&gt;Its still in a prototype stage, needs more work and i already spotted some places where things need to be changed, but overall seems to work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-5072704025558887155?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/5072704025558887155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=5072704025558887155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/5072704025558887155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/5072704025558887155'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2010/01/using-sapi-45-voices-with-text-to.html' title='Using SAPI 4/5 voices with text to speech in Asterisk'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-2545876087640485178</id><published>2010-01-18T16:56:00.004+02:00</published><updated>2010-01-18T17:25:57.665+02:00</updated><title type='text'>web2py - Getting the admin panel to work remotely</title><content type='html'>I have spend sometime looking at the web2py framework the past few days, as i was looking for a python based framework for a project.&lt;br /&gt;My first impression is that it has some nice features but as with all "frameworks" the learning curve can be steep.&lt;br /&gt;&lt;br /&gt;After going through the manual over the weekend i decided to take the plunge and install it in a dev machine.&lt;br /&gt;This is a vm machine running Ubuntu server, so there is no local browsing capabilities everything is done over the network.&lt;br /&gt;Got web2py installed, run the server and then tried to access the admin interface from my remote workstation and got this.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Admin is disabled because unsecure channel&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;According to the documentation the admin and appadmin only work from localhost and remotely via ssl (ssh tunnel or https)&lt;br /&gt;Looking at what it takes to config Apache to test-run web2py i decided i need another simpler solution.&lt;br /&gt;&lt;br /&gt;I found this &lt;a href="http://blog.i4pace.net/frog/user/Teru/article/2009-04-06/72"&gt;blog post&lt;/a&gt; that had instructions on how to get web2py going with a self-signed certificate and gave it go.&lt;br /&gt;(Note that there are some typos in instructions given in the blog, but its easy to figure them out)&lt;br /&gt;&lt;br /&gt;So i created the certificates and tried to access web2py from https this time.&lt;br /&gt;No i was getting a strange error in Firefox&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;SSL received a record that exceeded the maximum permissible length.&lt;br /&gt;&lt;br /&gt;(Error code: ssl_error_rx_record_too_long)&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The problem was that web2py was still sending http and not https to the browser, so probably the https was not working&lt;br /&gt;&lt;br /&gt;I used the command line switches of web2py and provided the exact path to the certificates &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;python web2py.py -a pass -i 192.168.1.3 -p 8000 -c /etc/ssl/self_signed/server.crt -k /etc/ssl/self_signed/server.key&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;and got a new message form web2py&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;WARNING:root:OpenSSL libraries unavailable. SSL is OFF&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;It turned out that Openssl was installed on the dev machine but the python bindings were not.&lt;br /&gt;so issuing a &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sudo aptitude install python-openssl&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;solved this and remote access to web2py's admin console was available over https.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-2545876087640485178?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/2545876087640485178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=2545876087640485178' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/2545876087640485178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/2545876087640485178'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2010/01/web2py-getting-admin-panel-to-work.html' title='web2py - Getting the admin panel to work remotely'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-65096670181338751</id><published>2009-12-30T00:36:00.014+02:00</published><updated>2010-01-02T23:59:32.294+02:00</updated><title type='text'>Solving Asterisk DTMF callerid issues - or why i love Open Source</title><content type='html'>I have been busy the last few days with an issue that has come up, with a new batch of GSM FCT's we need to interface with some of our deployed &lt;a href="http://www.digital-opsis.com/?ID=4&amp;SUBID=4"&gt;Hermes e-IPBX &lt;/a&gt;units.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.digital-opsis.com/?ID=4&amp;SUBID=4"&gt;Hermes e-IPBX &lt;/a&gt;is a solution we have worked on for sometime now and basically is a build-from-scratch linux distro tailored for use with Asterisk as a PBX.&lt;br /&gt;It's a "compact" solution, requiring around 32MB of flash for the entire system including a custom web based UI we have developed.&lt;br /&gt;&lt;br /&gt;For a number of reasons that would take a lot of time to explain (and make excellent material for another blog post) our current version of Hermes e-ipbx uses Asterisk 1.2 and not the latest stable 1.4 or 1.6&lt;br /&gt;&lt;br /&gt;The problem we faced, was that we could not get callerid working with these new FCT units.&lt;br /&gt;As it turned out these units were using dtmf and not fsk to pass the callerid info between the first and second ring.&lt;br /&gt;&lt;br /&gt;So at the begging we though, "hey that's not a problem, asterisk supports dtmf for callerid, all we have to do is change the cidsignalling variable in zapata.conf to use dtmf."&lt;br /&gt;We could not be more wrong...&lt;br /&gt;&lt;br /&gt;No matter what configuration we tried in zapata.conf, asterisk was throughing errors and we could not get the callerid info.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;  &lt;br /&gt;  -- Starting simple switch on 'Zap/1-1'&lt;br /&gt;        Dec 28 00:07:29 ERROR[3896]: callerid.c:276 callerid_feed: fsk_serie&lt;br /&gt;        made mylen &lt; 0 (-1)&lt;br /&gt;        Dec 28 00:07:29 WARNING[3896]: chan_zap.c:6627 ss_thread: CallerID feed&lt;br /&gt;        failed: Success&lt;br /&gt;        Dec 28 00:07:29 WARNING[3896]: chan_zap.c:6671 ss_thread: CallerID&lt;br /&gt;        returned with error on channel 'Zap/1-1'&lt;br /&gt;           -- Executing Wait("Zap/1-1", "5") in new stack&lt;br /&gt;        Dec 28 00:07:29 DEBUG[3896]: chan_zap.c:4001 zt_handle_dtmfup: DTMF&lt;br /&gt;        digit: 9 on Zap/1-1&lt;br /&gt;        Dec 28 00:07:29 DEBUG[3896]: chan_zap.c:4001 zt_handle_dtmfup: DTMF&lt;br /&gt;        digit: 1 on Zap/1-1&lt;br /&gt;        Dec 28 00:07:29 DEBUG[3896]: chan_zap.c:4001 zt_handle_dtmfup: DTMF&lt;br /&gt;        digit: 0 on Zap/1-1&lt;br /&gt;        Dec 28 00:07:29 DEBUG[3896]: chan_zap.c:4001 zt_handle_dtmfup: DTMF&lt;br /&gt;        digit: 5 on Zap/1-1&lt;br /&gt;        Dec 28 00:07:31 DEBUG[3896]: chan_zap.c:4907 __zt_exception: Exception&lt;br /&gt;        on 14, channel 1&lt;br /&gt;        Dec 28 00:07:31 DEBUG[3896]: chan_zap.c:4092 zt_handle_event: Got event&lt;br /&gt;        Ring Begin(18) on channel 1 (index 0)&lt;br /&gt;        Dec 28 00:07:32 DEBUG[3896]: chan_zap.c:4907 __zt_exception: Exception&lt;br /&gt;        on 14, channel 1&lt;br /&gt;        Dec 28 00:07:32 DEBUG[3896]: chan_zap.c:4092 zt_handle_event: Got event&lt;br /&gt;        Ring/Answered(2) on channel 1 (index 0)&lt;br /&gt;        Dec 28 00:07:32 DEBUG[3896]: chan_zap.c:4441 zt_handle_event: Setting&lt;br /&gt;        IDLE polarity due to ring. Old polarity was 0&lt;br /&gt;        Dec 28 00:07:34 DEBUG[3896]: pbx.c:1548&lt;br /&gt;        pbx_substitute_variables_helper_full: Function result is '"" &lt;&gt;'&lt;br /&gt;           -- Executing NoOp("Zap/1-1", "CALLERID="" &lt;&gt;") in new stack&lt;br /&gt;        Dec 28 00:07:36 DEBUG[3896]: chan_zap.c:4907 __zt_exception: Exception&lt;br /&gt;        on 14, channel 1&lt;br /&gt;        Dec 28 00:07:36 DEBUG[3896]: chan_zap.c:4092 zt_handle_event: Got event&lt;br /&gt;        Ring Begin(18) on channel 1 (index 0)&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;As you can see asterisk does capture part of the callerid (which is 2114019105 in this case) *after* the initial first ring, but misses the rest of it (last 4 digits).&lt;br /&gt;&lt;br /&gt;Trying to figure out what the issue was, the first though was that the dtmf send by the device was somehow distorted,&lt;br /&gt;What was need it, was a way to capture what the device was sending and check it.&lt;br /&gt;So i decided to used one of what i call, asterisk's hidden super-weapons, ztmonitor.&lt;br /&gt;ztmonitor is a utility that comes with asterisk and allows you to monitor a Zap (aka Dahdi) channel for signal level and also save a 'raw' image of what comes in or goes out through that interface.&lt;br /&gt;It has proven a valuable tool in the past when we were trying to solve some echo issues a customer had.&lt;br /&gt;&lt;br /&gt;The following command can be used to record any given zap channel, mixing input and output streams in a single file&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;ztmonitor "channel number" -f "file_name.raw" &lt;/channel&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;ztmonitor has also options to capture input and output streams in different files and also get the stream without echo canceling applied.&lt;br /&gt;&lt;br /&gt;Once you have captured the data, you can convert them to a wav file for further processing using sox.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sox -r 8000 -s -w -c 1 "file_name.raw" "file_name.wav"&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;What that gives you is a wav file of both streams ready for further processing and investigation.&lt;br /&gt;&lt;br /&gt;First thing to do is to have a visual view of the captured signal.&lt;br /&gt;&lt;br /&gt;There are several open source tools but i use Audacity for this task, as it provides several interesting features.&lt;br /&gt;&lt;br /&gt;Following is what the captured streams looked like when loaded in Audacity.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://twitxl.com/storage/aaaato/view-15304865542172019340.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 1024px; height: 689px;" src="http://twitxl.com/storage/aaaato/view-15304865542172019340.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;By measuring the different parts of the stream the following info was gathered.&lt;br /&gt;&lt;br /&gt;After the 1st ring ends, there is a 640ms delay before the dtmf starts.&lt;br /&gt;Dtmf pulses have a length of 84ms and there is inter-digit delay of 120ms.&lt;br /&gt;&lt;br /&gt;Things looked "normal",there are a few glitches in the captured stream but nothing too big and the level of noise was not big, so next we had to test if the dtmf pulses were valid.&lt;br /&gt;&lt;br /&gt;And the tool of choice for this kind of work is none other than &lt;a href="http://www.baycom.org/~tom/ham/linux/multimon.html"&gt;multimon&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Multimon can decode a variety of digital transmission modes commonly found on UHF radio using the soundcard or a wav file as input and DTMF is one of the supported.&lt;br /&gt;&lt;br /&gt;It's also pretty straight forward to use&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;multimon -a DTMF  -t wav ./streamtx.raw.wav&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;would produce an output like that.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;multimod  (C) 1996/1997 by Tom Sailer HB9JNX/AE4WA&lt;br /&gt;available demodulators: POCSAG512 POCSAG1200 POCSAG2400 EAS AFSK1200 AFSK2400 AFSK2400_2 HAPN4800 FSK9600 DTMF ZVEI SCOPE&lt;br /&gt;Enabled demodulators: DTMF&lt;br /&gt;DTMF: 2&lt;br /&gt;DTMF: 1&lt;br /&gt;DTMF: 1&lt;br /&gt;DTMF: 4&lt;br /&gt;DTMF: 0&lt;br /&gt;DTMF: 1&lt;br /&gt;DTMF: 9&lt;br /&gt;DTMF: 1&lt;br /&gt;DTMF: 0&lt;br /&gt;DTMF: 5&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That proved that the dtmf send by the device was OK, so where is the problem ?&lt;br /&gt;&lt;br /&gt;After looking at source code and searching for people with similar problems, it was clear that dtmf callerid in asterisk 1.2 is "partially" working.&lt;br /&gt;What partially means, is that there are basically 3 ways callerid is send.&lt;br /&gt;One is between the gap of the first and second ring, second is by signaling a polarity reversal before the first ring and as i found out in some countries callerid is send before the ring without any signalling (i.e polarity reversal)&lt;br /&gt;Also in the case dtmf is used to send the callerid a start-of-callerid is send before the number in the means of a letter (which is different depending on country)&lt;br /&gt;&lt;br /&gt;In Asterisk 1.2 when the callerid is send with dtmf there is only support for the polarity reversal method and not the other two.&lt;br /&gt;The good thing was, that a lot of Indian telcos where using dtmf between the first and second ring so there was a &lt;a href="https://issues.asterisk.org/view.php?id=6683"&gt;patch available&lt;/a&gt; for 1.2 that never made it in the svn, but got incorporated in 1.4 and 1.6.&lt;br /&gt;&lt;br /&gt;So i got the patch,removed some of the debug lines and rebuilded chan_zap.&lt;br /&gt;&lt;br /&gt;Now i could get the last 8 digits of the callerid the FCT send, but some reason i was missing the initial two...&lt;br /&gt;It looked like the dtmf detection routine was kicking-in a bit too late, missing the first 2 dtmf digits.&lt;br /&gt;After a bit more of head-scratching i remembered there was definition in the zaptel card driver (wctdm.c) that was defining the time the line would take to settle after the ring.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;#define DEFAULT_RING_DEBOUNCE  64              /* Ringer Debounce (64 ms) */&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Setting this to 32 ms solved the issue of the two first missing digits.&lt;br /&gt;&lt;br /&gt;The whole procedure took several days, till we managed to solve the issue, but consider the alternative if this was a closed source system, where we would have to file a bug report to the company supplying the software.&lt;br /&gt;We would probably had to wait for an answer for much longer provided they had enough interest (and resources) to fix the issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-65096670181338751?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/65096670181338751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=65096670181338751' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/65096670181338751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/65096670181338751'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/12/solving-asterisk-dtmf-callerid-issues.html' title='Solving Asterisk DTMF callerid issues - or why i love Open Source'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-4354550008414432686</id><published>2009-11-01T10:48:00.008+02:00</published><updated>2009-11-01T16:23:34.326+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Samsung'/><category scheme='http://www.blogger.com/atom/ns#' term='GalaxyHero'/><category scheme='http://www.blogger.com/atom/ns#' term='Galaxy'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><category scheme='http://www.blogger.com/atom/ns#' term='SDK'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Setting up Android SDK on Ubuntu for the Samsung Galaxy</title><content type='html'>On my quest to get the Samsung Galaxy a new "ROM" to fix the issues mentioned in my last post, i installed the GalaxyHero ROM which is a custom (or "cooked") ROM.&lt;br /&gt;The GalaxyHero does offer solutions to many of the issues i mentioned with the original Galaxy firmware and even the IIE update.&lt;br /&gt;As usual when dealing with new devices, firmware updates of this nature,are a good way to "brick" your device so i took my time Googling, reading and taking notes of the actions required for the update, which among other things give you root access to the phone.&lt;br /&gt;&lt;br /&gt;The first problem i encountered after downloading and installing the Android SDK and the Eclipse plugin on my 64bit Ubuntu desktop is that the phone was not recognized by the SDK.&lt;br /&gt;Typing in the SDK tools dir &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;adb devices &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;came up with an empty list.&lt;br /&gt;&lt;br /&gt;After a bit more search here is what you need to do to get your Samsung Galaxy to connect with adb on Ubuntu and allow debugging on the phone.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;On the phone, in Settings/Applications/Development, check the box "USB debugging".&lt;br /&gt;&lt;br /&gt;Then add a new udev rule for the phone &lt;br /&gt;Create a file using your favorite text editor in /etc/udev/rules.d/11-android.rules&lt;br /&gt;and add the following line&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;SUBSYSTEM=="usb_device", SYSFS{idVendor}=="04e8", MODE="0666"&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Please note that the USB vendor ID &lt;span style="font-weight:bold;"&gt;is not the same&lt;/span&gt; for Samsung and other Android phones (aka HTC) and most of the documentation i found refers to HTC's id.&lt;br /&gt;&lt;br /&gt;Then type this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;sudo chmod a+rx /etc/udev/rules.d/11-android.rules&lt;br /&gt;sudo /etc/init.d/udev restart&lt;br /&gt;./adb kill-server&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The above will make the phone "recognizable" by Ubuntu,but still if you try connect with adb it does not work.&lt;br /&gt;The problem is that the adb shipped with the Android SDK up to this writting (Nov 1st 2009) does not work with the Galaxy.&lt;br /&gt;&lt;br /&gt;To overcome this you need a patched version of adb &lt;br /&gt;More details and the source to build the adb yourself can be found in the &lt;a href="http://www.android-hilfe.de/o2-samsung-galaxy-i7500-forum/4021-adb-jetzt-auch-auf-dem-galaxy.html#post38582"&gt;German Galaxy forum&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;cd to your Android SDK tools dir&lt;br /&gt;&lt;br /&gt;rename the original adb&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mv adb orig-adb&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;download,unzip and make executable the patched adb &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;wget http://floe.butterbrot.org/external/adb.gz&lt;br /&gt;gunzip adb.gz&lt;br /&gt;chmod +x adb&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;then start the adb server&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;./adb start-server&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;see if the phone is recognized&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;./adb devices&lt;br /&gt;List of devices attached &lt;br /&gt;I7500c0xVS8PQ4H device&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Next i will post a few simple steps to get the GalaxyHero ROM installed even without the adb&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-4354550008414432686?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/4354550008414432686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=4354550008414432686' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/4354550008414432686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/4354550008414432686'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/11/setting-up-android-sdk-on-ubuntu-for.html' title='Setting up Android SDK on Ubuntu for the Samsung Galaxy'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-358610688910559451</id><published>2009-10-25T11:40:00.008+02:00</published><updated>2009-10-26T08:13:24.445+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Samsung'/><category scheme='http://www.blogger.com/atom/ns#' term='i7500'/><category scheme='http://www.blogger.com/atom/ns#' term='battery drain'/><category scheme='http://www.blogger.com/atom/ns#' term='Galaxy'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>My first week with an Android phone - Samsung Galaxy i7500</title><content type='html'>It's almost a week since I got my first Android based phone a Samsung Galaxy i7500 and so I decided to write a few things of what has happened these last few days.&lt;br /&gt;But before the “dirty” tech details a few words about the process that got me there.&lt;br /&gt;&lt;br /&gt;For a few months now I have been looking for a new phone,partly because my (t)rusty Qtek 9000, Windows Mobile 6.1 phone has started showing its age,partly because I was interested in looking into mobile phone development in the new platforms that have been around for a while.&lt;br /&gt;As you expect the candidates were 2. &lt;br /&gt;iPhone 3G(S) from Apple and an Android based phone with the iPhone having some advantage.&lt;br /&gt;&lt;br /&gt;So I started looking around the net to see what is need it to get into programming these 2 platforms and what  the dev communities  say.&lt;br /&gt;(I had some experience in mobile device programming both in the Microsoft Mobile and Linux, on the Neo Freerunner phone sometime in the past, but not with the new technologies that have come up since.)&lt;br /&gt;&lt;br /&gt;To my “surprise” I realized that in order to get into iPhone development you had to be on a Mac platform (at least when I was doing my Googling, things change fast) and you had to have Apple's “blessing” if you wanted to get your application in the Apple store... Hmmm&lt;br /&gt;&lt;br /&gt;No one can deny that Apple has  some really good products and technologies but after I have “seen the light” with Open Source I really dislike the vendor lock-in.&lt;br /&gt;Don't get me wrong Apple fans, as I said, the products are great but if another company (say Microsoft) had pulled the same “tricks” Apple is pulling on Palm for example, people with pitchforks would be camped outside the Microsoft HQ asking for heads to roll...&lt;br /&gt;&lt;br /&gt;So after deciding not to go the Apple way, the next question was... “which Android based phone  ?”&lt;br /&gt;&lt;br /&gt;A lot more Googling and visits to the local wireless operator shops (I am in Greece) to find the phone.&lt;br /&gt;The result. &lt;br /&gt;Most of the Android phones in the (Greek) market were HTC based and hovering in the 500 Euro range, but what caught my eye was the Samsung i7500.&lt;br /&gt;The AMOLED screen looked fantastic and the specs were great, (although the RAM was a bit on the “low side”) and had all the bits and pieces to use it both as a dev platform and “normal” phone.&lt;br /&gt;The only thing I missed (at that time) was the keyboard, which was a great additions and the main reason I have kept my Qtek for so long.&lt;br /&gt;&lt;br /&gt;So I got the phone, and started my journey into the world of Android and Samsung i7500.&lt;br /&gt;&lt;br /&gt;The good stuff first...&lt;br /&gt;&lt;br /&gt;The AMOLED screen is really great :)&lt;br /&gt;The Android Market (Thank you Apple for the idea ) is really cool. I wondered how we lived without “application stores” so long :)&lt;br /&gt;The design of the phone was great although "plastic" in finish.&lt;br /&gt;&lt;br /&gt;And the bad stuff...&lt;br /&gt;&lt;br /&gt;Power management with the default firmware sucks, big time...&lt;br /&gt;There is no VPN support (at least with the Cupcake version the phone was shipped)&lt;br /&gt;Tethering is not supported&lt;br /&gt;The 5 MPixel  camera has some serious lag issues&lt;br /&gt;The default browser has file uploads disabled for “security reasons” &lt;br /&gt;If you try to sync your Outlook contacts you need...Google (mail,calendar etc)&lt;br /&gt;The control software (Samsung New PC Studio) shipped with the phone runs only on Windows and DOES NOT support firmware updates of the phone (what the Samsung people were thinking ???!!!)&lt;br /&gt;&lt;br /&gt;Let's see them in more detail&lt;br /&gt;&lt;br /&gt;After charging overnight and started using the phone, with all systems up (wifi,3G,bluetooth,GPS) I noticed that the battery was draining fast. At the beginning I thought it was because it was a new battery and LiIon batteries need a few charging cycles before the “settle” to their peak.&lt;br /&gt;&lt;br /&gt;After a couple more days and several charging cycles I decided to shutdown all the wireless and leave only the GSM part of the phone on. Same thing.&lt;br /&gt;Did more Googling, found out that others had the same problem and the problem was the firmware and it had to be  updated..&lt;br /&gt;But wait... The Samsung New PC Studio says I have the latest firmware (and does not even recognize the phone when going for an update)&lt;br /&gt;More Googling... &lt;br /&gt;The version of the PC Studio Samsung ships with the phone.... can not updated it.... need newer from the German Samsung side...&lt;br /&gt;Download, install, reboot,phone recognized this time, but no new firmware....Dito again.&lt;br /&gt;More Googling....&lt;br /&gt;Need a 3rd party program and a firmware image people have literally hacked out of the Samsung site.&lt;br /&gt;Done it, and phone works as it should (3 days now with no re-charge)&lt;br /&gt;/me Thanks Samsung for having to spend a day looking for all these.&lt;br /&gt;&lt;br /&gt;Next task....&lt;br /&gt;&lt;br /&gt;Move my contacts from the Windows Mobile based phone to the Android one...&lt;br /&gt;(Still trying to)&lt;br /&gt;Well it looks that unless you use Google services and upload all your contacts and calendar data there, you are in for the long ride...&lt;br /&gt;&lt;br /&gt;Tried to take some photos with the 5 Mpixel camera the phone has...&lt;br /&gt;Disappointed... The camera lag is such that you have to press the shutter button a couple of seconds in advance... Forget those fast moving fotos...&lt;br /&gt;&lt;br /&gt;Ok managed to take some pictures, let's try to upload them to Twitter using the web application of TwitXL...&lt;br /&gt;The Upload button of the page was disabled by the buildin browser, Hmmm so I need an application like the iPhone does ? At least they have an 'explanation'  that their system does not have a “filesystem” , what about Android ? (Must be the first Linux based filesystem-less system)&lt;br /&gt;&lt;br /&gt;Wanted to do a VPN with the office, (free wifi access points are nice, but do you want all our data unencrypted over wifi ? I don't.) no luck either...&lt;br /&gt;Android 1.5 (Capcake) does not have VPN support, 1.6 (Donut) has.&lt;br /&gt;There is no “official” Samsung image with Donut for the moment, but the good people of the dev community have came up with solutions of their own (this is were Open Source makes all the difference)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What's the verdict after all these ?&lt;br /&gt;The phone was not ready for the market... I think Samsung has pushed it out the door, to get into the “Google Wave” with little or no QC&lt;br /&gt;If a non technical inclined person gets his/her hands on this phone they will return it for service in the next few days... not good, unless of course the market you are after are the “techies” like me, that can swift through pages and pages of forums and blogs looking for the little piece of info to fix it...&lt;br /&gt;&lt;br /&gt;Android has potential, but still needs a lot of work and refinement if its going to be in “peoples” phones and not just for the techies.&lt;br /&gt;&lt;br /&gt;BTW if you are new to the Galaxy i7500 and strangling with the same issues, this &lt;a href="http://wiki.dandascalescu.com/reviews/gadgets/pda_phones/samsung_i7500_galaxy"&gt;link&lt;/a&gt; can help (at least it did in my case)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-358610688910559451?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/358610688910559451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=358610688910559451' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/358610688910559451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/358610688910559451'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/10/my-first-week-with-android-phone.html' title='My first week with an Android phone - Samsung Galaxy i7500'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-7534119516363062422</id><published>2009-09-12T21:28:00.002+03:00</published><updated>2009-09-12T21:55:32.936+03:00</updated><title type='text'>Installing compact fluorecent lamps - A year later</title><content type='html'>Last November i decided to remove all incandescent lamps from the house and replace them with low power compact fluorescent one's.&lt;br /&gt;I replaced 35 100 Watt lamps with the Osram EL Dulux 20W.&lt;br /&gt;http://www.osram.com/osram_com/News/General_Interest_Press/2007/Press616042.jsp&lt;br /&gt;&lt;br /&gt;I chose those because mainly i liked the type of light they produced and decided to pay the extra cost to save some CO2 from the planet and go "green" on lighting.&lt;br /&gt;&lt;br /&gt;A compact fluorescent lamp is much more expensive to buy than a standard incandescent one, but you save on the long run from the lower electricity consumption and the *longer* working life its supposed to have.&lt;br /&gt;&lt;br /&gt;The Osram El Dulux 20W was rated at 10.000h which would replace 10 normal lamps, according to what is printed on the box.&lt;br /&gt;Assuming an average of 6h of working time for the lamp per day , it should last for approx 1666 days or 4.5 years before it fails.&lt;br /&gt;&lt;br /&gt;Well  i can report that in less than a year, 8 from the 35 lamps have failed and need it to be replaced.&lt;br /&gt;That's almost 1 in 4 (or close to 25%) loss and sure is not what i had hoped for.&lt;br /&gt;&lt;br /&gt;I am not sure why the lamps failed, as they failed in random intervals and random places in the house, with the first staring 3-4 months after it was installed.&lt;br /&gt;&lt;br /&gt;I don't believe that anyone from Osram will read this blog post but in the case it does, i have kept most of the failed lamps,as i was looking for a place that would accept them for recycling (yes lamps get recycled and need to be recycled as they contain some "serious" metals and not so good chemicals) and if you want i can send them back for you to test with all expenses paid.&lt;br /&gt;&lt;br /&gt;In any case, Osram,  you should check your quality as you have a really dissatisfied customer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-7534119516363062422?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/7534119516363062422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=7534119516363062422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7534119516363062422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7534119516363062422'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/09/installing-compact-fluorecent-lamps.html' title='Installing compact fluorecent lamps - A year later'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-1842026189676371412</id><published>2009-06-13T17:51:00.002+03:00</published><updated>2009-06-13T18:00:14.200+03:00</updated><title type='text'>European Commission pushes for software patents via a trusted court</title><content type='html'>First of all a warning. If part of the following text looks Greek to you,it's because it is. :)&lt;br /&gt;It's part of a message i received from Konstantina Zoehrer regarding the new "initiative" to get software patents in EU, through the backdoor by use of a "trusted court".&lt;br /&gt;For more info check this &lt;a href="http://press.ffii.org/Press_releases/European_Commission_pushes_for_software_patents_via_a_trusted_court"&gt;link&lt;/a&gt;.&lt;br /&gt;There is a &lt;a href="http://petition.stopsoftwarepatents.eu/stats/"&gt;petition&lt;/a&gt;also you can sign.&lt;br /&gt;&lt;br /&gt;Well it looks like "special interests" follow the good old saying "if you fail once, try again"&lt;br /&gt;So, let's try and stop them one more time.&lt;br /&gt;&lt;br /&gt;Greek text follows&lt;br /&gt;&lt;br /&gt;Προτρέπουμε τους νομοθέτες μας&lt;br /&gt;&lt;br /&gt;* να περάσουν εθνικές νομικές διευκρινίσεις για το δίκαιο ευρεσιτεχνίας για να αποκλείσουν οποιοδήποτε πατέντα λογισμικού,&lt;br /&gt;* να ακυρώσουν όλους τους εγκεκριμένους ισχυρισμούς για πατέντες που μπορεί να παραβιάζονται από λογισμικό το οποίο τρέχει σε προγραμματιζόμενες συσκευές,&lt;br /&gt;* επίσης να αγωνιστούν για τη διάδοση των εν λόγω κανόνων σε Ευρωπαϊκό επίπεδο, συμπεριλαμβανομένης της Ευρωπαϊκής Σύμβασης Διπλωμάτων Ευρεσιτεχνίας.&lt;br /&gt;&lt;br /&gt;ΥΠΟΓΡΑΨΤΕ ΤΗΝ ΑΙΤΗΣΗhttp://petition.stopsoftwarepatents.eu/stats/&lt;br /&gt;&lt;br /&gt;Διαβάστε περισσότερα εδώ http://press.ffii.org/Press_releases/European_Commission_pushes_for_software_patents_via_a_trusted_court&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-1842026189676371412?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/1842026189676371412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=1842026189676371412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/1842026189676371412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/1842026189676371412'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/06/european-commission-pushes-for-software.html' title='European Commission pushes for software patents via a trusted court'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-5341551980231891211</id><published>2009-06-02T10:51:00.003+03:00</published><updated>2009-06-02T11:19:29.523+03:00</updated><title type='text'>First results on a WiFi security survey</title><content type='html'>For the past few weeks i am working on a paper for the security of the wifi networks.&lt;br /&gt;Part of my research was to look at the state of security of deployed wifi AP all over Athens.&lt;br /&gt;Athens is a rather large city (4+ million people leave here) and i believe that a sample of that size could be indicative of the general state if wifi all over.&lt;br /&gt;&lt;br /&gt;The first results are rather mixed.&lt;br /&gt;&lt;br /&gt;The good news is that the number of wifi ap's deployed is really large. &lt;br /&gt;By driving through some of th main streets crossing Athens, and some of the business areas i found more that 10.000 unique MAC's of AP.&lt;br /&gt;Considering that i only covered a very small portion of the Athens metropolitan area and was only driving on main roads, i estimate that the number of deployed AP will be over 200.000 to 250.000 and this is a really a very conservative estimate.&lt;br /&gt;&lt;br /&gt;The bad news now.&lt;br /&gt;&lt;br /&gt;More than 50% of the AP's surveyed,are using no encryption or WEP and from those using WPA 70% is using the default ESSID's set by the ISP's that provided the unit,making them easy targets for rainbow table attacks.&lt;br /&gt;&lt;br /&gt;It looks like that most people trust the settings their ISP provides when they get their adsl IAD, or don't how to change them or simply are unaware of how wifi works and the dangers.&lt;br /&gt;One ISP in particular seems to be the "king of unprotected wifi AP" in Athens as 3/4 of all the AP's with their ESSID is either open or using WEP.&lt;br /&gt;&lt;br /&gt;I am still collecting data and working on the paper, but given the rather large number of samples i allready got i don't think the results will change much,but this is something to see.&lt;br /&gt;&lt;br /&gt;On the funny side of things, if people do decide to change their ESSID they can be very creative :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-5341551980231891211?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/5341551980231891211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=5341551980231891211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/5341551980231891211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/5341551980231891211'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/06/first-results-on-wifi-security-survey.html' title='First results on a WiFi security survey'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-153408655650870869</id><published>2009-05-11T11:36:00.003+03:00</published><updated>2009-06-02T11:39:51.899+03:00</updated><title type='text'>First results and thoughs on WPA security</title><content type='html'>I have spend the last few days reading about and playing around with the various tools available for cracking WPA and here is what i came to.&lt;br /&gt;&lt;br /&gt;Contrary to the "hype" WPA is not cracked, as WEP was. &lt;br /&gt;No "fatal" design flaw has been found that can be exploited to get access to your wifi network.&lt;br /&gt;The *current* and *known* (there is no way to emphasize this more) ways of getting access to WPA protected network is by the "old" way of the dictionary and/or brute force attacks and "rainbow tables".&lt;br /&gt;That been send, the "weak link" in your WPA security is actual your chosen password.&lt;br /&gt;If your password can be easily "guessed" (8 characters passwords with numbers (i.e bith dates) or known words like "/dev/null" :) then you might get into trouble if someone targets you.&lt;br /&gt;Another thing that i realized is that by hiding your ESSID you are actually becoming an easier target to an attack.&lt;br /&gt;This has to do with the fact that your ESSID is actually part of the key and the empty ESSID is on the top 10 of ESSID's people have pre-calculated rainbow tables for.&lt;br /&gt;&lt;br /&gt;So to make your WPA wifi more secure do the following&lt;br /&gt;&lt;br /&gt;    1)Select a unique ESSID, an as attacker could not use a ready-made rainbow table, and would have to recalculate the PMK's and that can take some time, even with the help of Pyrit and some serious hardware.&lt;br /&gt;&lt;br /&gt;    2) Try to select a random password at least 20 characters long.&lt;br /&gt;&lt;br /&gt;    3) Switch to AES insted of TKIP&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-153408655650870869?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/153408655650870869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=153408655650870869' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/153408655650870869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/153408655650870869'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/05/first-results-and-thoughs-on-wpa.html' title='First results and thoughs on WPA security'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-5598200141762753347</id><published>2009-05-08T10:21:00.008+03:00</published><updated>2009-05-17T23:14:03.575+03:00</updated><title type='text'>Getting Pyrit to work on my system and other WPA-PSK related rand</title><content type='html'>Recently i started reading about WPA-PSK security, as a client was using it, in their office, and after some discussion, wanted to see how (in)secure might be.&lt;br /&gt;&lt;br /&gt;After some reading it looks like the best way to hack a WPA-PSK based system (for the moment) is to create a rainbow table of possible PMK's  (Pairwise Master Key) and then let loose tools like cowpatty and aircrack-ng.&lt;br /&gt;Basically you exchange time for space, as the same PMK can be used on any AP with same SSID.&lt;br /&gt;&lt;br /&gt;The problem is, that a PMK requires something in the range of 16.000+ rounds of SHA-1 and this requires some really big computing power.&lt;br /&gt;To give you an idea of the computing power required, my quad core@3Ghz can do about 1.2K PMK's/sec,which is not that bad, but will take weeks to go over a descent word list.&lt;br /&gt;&lt;br /&gt;Doing some more search i found that there is a program called &lt;a href="http://code.google.com/p/pyrit/"&gt;Pyrit&lt;/a&gt;, that uses the power of the GPU to do some serious PMK crunching. My "vanilla" (not over clocked)  Nvidia 8800 GT does 4.800/sec while other, newer Nvidia cards can reach close to 50.000/sec PMK's&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;UPDATE 17/5/2009&lt;br /&gt;The problem mentioned below is solved in revision 99 of Pyrit&lt;br /&gt;Looks like it was a &lt;a href="http://pyrit.wordpress.com/2009/05/14/cuda-2-2-breaks-pyrit/"&gt;CUDA 2.2 bug&lt;/a&gt;&lt;br /&gt;I am leaving the text for 'historical reasons' but you can safely ignore the fix&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;So i updated my CUDA drivers and SDK (Pyrit requires CUDA 2,2), got Pyrit from the SVN, build it and run my first benchmark, using only the CPU's. &lt;br /&gt;Things were good, so i moved on to build the Nvidia CUDA module for Pyrit.&lt;br /&gt;The build was ok &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;stelios@Athena:~/pyrit/pyrit-read-only/cpyrit_cuda$ ./setup.py build&lt;br /&gt;running build&lt;br /&gt;running build_ext&lt;br /&gt;Compiling CUDA module using nvcc 2.2, V0.2.1221...&lt;br /&gt;ptxas info    : Compiling entry function 'cuda_pmk_kernel'&lt;br /&gt;ptxas info    : Used 42 registers, 32+24 bytes smem, 12 bytes cmem[1]&lt;br /&gt;Building modules...&lt;br /&gt;stelios@Athena:~/pyrit/pyrit-read-only/cpyrit_cuda$ sudo ./setup.py&lt;br /&gt;install&lt;br /&gt;running install&lt;br /&gt;running build&lt;br /&gt;running build_ext&lt;br /&gt;Skipping rebuild of Nvidia CUDA kernel ...&lt;br /&gt;Building modules...&lt;br /&gt;running install_lib&lt;br /&gt;running install_egg_info&lt;br /&gt;Removing /usr/lib/python2.5/site-packages/CPyrit_CUDA-0.2.3.egg-info&lt;br /&gt;Writing /usr/lib/python2.5/site-packages/CPyrit_CUDA-0.2.3.egg-info&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;but when trying to run the benchmark again i got an error&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;stelios@Athena:~/pyrit/pyrit-read-only/cpyrit_cuda$ pyrit benchmark&lt;br /&gt;Pyrit 0.2.3 (C) 2008, 2009 Lukas Lueg http://pyrit.googlecode.com&lt;br /&gt;This code is distributed under the GNU General Public License v3&lt;br /&gt;&lt;br /&gt;The ESSID-blobspace seems to be empty; you should create an ESSID...&lt;br /&gt;&lt;br /&gt;Failed to load CUDA-core (CUDA_ERROR_INVALID_IMAGE).&lt;br /&gt;Running benchmark for at least 60 seconds...&lt;br /&gt;&lt;br /&gt;CPU-Core (x86_64): 302.43 PMKs/s, 99.41% occupancy&lt;br /&gt;CPU-Core (x86_64): 292.03 PMKs/s, 90.08% occupancy&lt;br /&gt;CPU-Core (x86_64): 300.92 PMKs/s, 87.42% occupancy&lt;br /&gt;CPU-Core (x86_64): 303.17 PMKs/s, 99.17% occupancy&lt;br /&gt;&lt;br /&gt;Benchmark done. 1198.55 PMKs/s total.&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;For some reason the CUDA part was failing to load. &lt;br /&gt;&lt;br /&gt;Googling about the error, i found a couple others had the same issue, so it was not just me, doing something wrong.&lt;br /&gt;I emailed the author, but received no reply, so after a day started looking at the code to see where the problem comes from. Open Source rulez :)&lt;br /&gt;&lt;br /&gt;It turned out that the module failed to load the CUDA kernel.&lt;br /&gt;Pyrit "converts" the CUDA cubit module to an include file _cpyrit_cudakernel.cubin.h and then uses the CUDA API to load the kernel module.&lt;br /&gt;In my case ,For some reason the _cpyrit_cudakernel.cubin.h seems to have an invalid&lt;br /&gt;cuda kernel image.&lt;br /&gt;&lt;br /&gt;So i changed the part that loads the kernel in _cpyrit_cuda.c from the include file &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;ret = cuModuleLoadData(&amp;self-&gt;mod, &amp;__cudakernel_module);&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;to&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;ret = cuModuleLoad(&amp;self-&gt;mod, "/your/path/to/cubitfile/_cpyrit_cudakernel.cubin");&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;(P.S add the correct path to your cubit file)&lt;br /&gt;&lt;br /&gt;that loads the cubit file directly.&lt;br /&gt;&lt;br /&gt;That got the problem fixed and benchmark worked like a charm&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;stelios@Athena:~/pyrit/pyrit-read-only/cpyrit_cuda$ pyrit benchmark&lt;br /&gt;Pyrit 0.2.2 (C) 2008, 2009 Lukas Lueg http://pyrit.googlecode.com&lt;br /&gt;This code is distributed under the GNU General Public License v3&lt;br /&gt;&lt;br /&gt;Running benchmark for at least 60 seconds...&lt;br /&gt;&lt;br /&gt;CUDA-Device #1 'GeForce 8800 GT': 4796.11 PMKs/s, 89.75% occupancy&lt;br /&gt;CPU-Core (x86_64): 283.45 PMKs/s, 84.37% occupancy&lt;br /&gt;CPU-Core (x86_64): 298.66 PMKs/s, 96.09% occupancy&lt;br /&gt;CPU-Core (x86_64): 289.44 PMKs/s, 99.15% occupancy&lt;br /&gt;&lt;br /&gt;Benchmark done. 5667.66 PMKs/s total.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Haven't looked at why the _cpyrit_cudakernel.cubin.h has a corrupted&lt;br /&gt;kernel, will probably do so, during the weekend and post any patches to fix it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-5598200141762753347?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/5598200141762753347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=5598200141762753347' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/5598200141762753347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/5598200141762753347'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/05/getting-pyrit-to-work-on-my-system-and.html' title='Getting Pyrit to work on my system and other WPA-PSK related rand'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-7183105355689785428</id><published>2009-04-03T12:23:00.004+03:00</published><updated>2009-04-03T13:05:16.205+03:00</updated><title type='text'>Cudos to Intersys for their support</title><content type='html'>Yesterday i received the replacement for my 42" Toshiba LCD TV from &lt;a href="http://www.intersys.gr/"&gt;Intersys&lt;/a&gt;, the local Toshiba distributor. &lt;br /&gt;Although i am kind of disappointed with Toshiba's quality, as this is the second TV from Toshiba with panel problems in 2 years, i am really pleased by the support i received from their local agent.&lt;br /&gt;&lt;br /&gt;In both cases not only they exchange the TV but i received a newer model. (This time i got a &lt;a href="http://www.home-entertainment.toshiba.co.uk/en/Regza-LCD-TV/40-49-LCD-TV-screen-size/42-Regza-LCD-TV-ZV-Series/"&gt;Toshiba REGZA 42ZV555DG &lt;/a&gt;as a replacement for REGZA 42XV505DG i had )&lt;br /&gt;Intersys acknowledging my frustration even offered to replace it with a different brand they distribute and a much larger TV (a 50" Panasonic plasma) but for a number of reasons i decided not to do so.&lt;br /&gt;They have send the new TV to my home and picked up the old one, without having to pay anything, or go through hoops.&lt;br /&gt;&lt;br /&gt;In difficult economic times like this, keeping the service and support level to your customers is really difficult, but at the same time its a very good way to keep customer loyalty.&lt;br /&gt;Bad times are not going to last for ever and on when things turn better, i believe all this effort will payback.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-7183105355689785428?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/7183105355689785428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=7183105355689785428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7183105355689785428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7183105355689785428'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/04/cudos-to-intersys-for-their-support.html' title='Cudos to Intersys for their support'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-6561793738142742247</id><published>2009-03-26T22:34:00.002+02:00</published><updated>2009-03-26T22:41:31.114+02:00</updated><title type='text'></title><content type='html'>It's been almost a month since my last blog post...&lt;br /&gt;Day to day work and my new pet project &lt;a href="http://twitxl.com"&gt;TwitXL&lt;/a&gt; are taking most of my time these days.&lt;br /&gt;The Athens &lt;a href="http://mediacamp.gr"&gt;MediaCamp09 &lt;/a&gt;was a nice "distraction" also.&lt;br /&gt;Met some very interesting people, with cool ideas.&lt;br /&gt;&lt;br /&gt;I have several "half baked" posts that i need to finish and clear up so i can post them. Hope that i'll get some free time during next week.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-6561793738142742247?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/6561793738142742247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=6561793738142742247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/6561793738142742247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/6561793738142742247'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/03/its-been-almost-month-since-my-last.html' title=''/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-1737723816892244732</id><published>2009-02-21T12:00:00.002+02:00</published><updated>2009-02-21T12:13:48.046+02:00</updated><title type='text'>Displaying UTF8 characters from mysql using bash</title><content type='html'>I was working on a bash script that was using mysql to retrieve utf8 encoded names from a table.&lt;br /&gt;Everything was smooth till i used some non English chars, like Greek and Brazilian and then i started seen a bunch of ? printed instead of the characters i was expecting.&lt;br /&gt;I spend a morning looking around for a solution as i though that this was a BASH issue.&lt;br /&gt;No matter what i tried the result was the same. &lt;br /&gt;Then i added one more switch to the mysql query i was doing, to force mysql to output the result in utf-8, in case it was not doing so (which i was *sure* it was, as the tables were in utf-8 encoding.)&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;--default-character-set=utf8 &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;After adding this all my problems were solved...&lt;br /&gt;&lt;br /&gt;Mental note : Make sure, that when i am "sure" about something, always test it, just to be sure it works as "expected".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-1737723816892244732?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/1737723816892244732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=1737723816892244732' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/1737723816892244732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/1737723816892244732'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/02/displaying-utf8-characters-from-mysql.html' title='Displaying UTF8 characters from mysql using bash'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-3238557147904119118</id><published>2009-02-03T11:16:00.003+02:00</published><updated>2009-02-03T11:22:59.753+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GoogleEarth Ubuntu'/><title type='text'>GoogleEarth 5 on Ubuntu 8.10</title><content type='html'>Got GoogleEarth today and tried to install it on my Ubuntu Desktop. Once it was installed running the binary gave me the following error&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;googleearth-bin: relocation error: /usr/lib32/i686/cmov/libssl.so.0.9.8: symbol BIO_test_flags, version OPENSSL_0.9.8 not defined in file libcrypto.so.0.9.8 with link time reference&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;To solve this just cd to the GoogleEarth dir rename the libcrypto in something else.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;stelios@Athena:~$ cd google-earth/&lt;br /&gt;stelios@Athena:~/google-earth$ mv libcrypto.so.0.9.8 orig-libcrypto.so.0.9.8&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-3238557147904119118?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/3238557147904119118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=3238557147904119118' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3238557147904119118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3238557147904119118'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/02/googleearth-5-on-ubuntu-810.html' title='GoogleEarth 5 on Ubuntu 8.10'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-4128567771386128671</id><published>2009-01-31T05:48:00.004+02:00</published><updated>2009-01-31T05:52:09.807+02:00</updated><title type='text'>Ubuntu one liner - Find out which packages are installed</title><content type='html'>The following one liner can be useful if you want to see which packages are installed in your Ubuntu machine. (it should work on debian also)&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;dpkg --get-selections | grep -v deinstall &lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-4128567771386128671?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/4128567771386128671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=4128567771386128671' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/4128567771386128671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/4128567771386128671'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/01/ubuntu-one-liner-find-out-which.html' title='Ubuntu one liner - Find out which packages are installed'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-391411871258049446</id><published>2009-01-26T23:02:00.004+02:00</published><updated>2009-01-26T23:14:54.912+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Digital-OPSiS'/><category scheme='http://www.blogger.com/atom/ns#' term='AIX'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>When getting a tcp packet from USA than a local ISP is faster...</title><content type='html'>Today i decided to update our desktop linux machines to the latest and greatest Ubuntu version (8.10).&lt;br /&gt;I was using it for sometime on my laptop and decided it would not break anything so it was time for an upgrade.&lt;br /&gt;Since &lt;a href="http://www.digital-opsis.com/"&gt;Digital-OPSiS&lt;/a&gt; office is in Athens, Greece,we use gr.archieve.ubuntu.com as a repo to pull updates etc.&lt;br /&gt;I noticed that the download speed was not that great so i switched one of the machines to use the use the US mirror instead... and it took about 40% less time to download the same packages...&lt;br /&gt;Doing a simple ping to the gr and us mirrors cleared things a bit more.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;stelios@DIAS-Linux:~$ ping gr.archive.ubuntu.com&lt;br /&gt;PING patroklos.noc.ntua.gr (147.102.222.211) 56(84) bytes of data.&lt;br /&gt;64 bytes from patroklos.noc.ntua.gr (147.102.222.211): icmp_seq=1 ttl=58 time=197 ms&lt;br /&gt;64 bytes from patroklos.noc.ntua.gr (147.102.222.211): icmp_seq=2 ttl=58 time=199 ms&lt;br /&gt;64 bytes from patroklos.noc.ntua.gr (147.102.222.211): icmp_seq=3 ttl=58 time=201 ms&lt;br /&gt;64 bytes from patroklos.noc.ntua.gr (147.102.222.211): icmp_seq=4 ttl=58 time=197 ms&lt;br /&gt;64 bytes from patroklos.noc.ntua.gr (147.102.222.211): icmp_seq=5 ttl=58 time=194 ms&lt;br /&gt;64 bytes from patroklos.noc.ntua.gr (147.102.222.211): icmp_seq=6 ttl=58 time=202 ms&lt;br /&gt;64 bytes from patroklos.noc.ntua.gr (147.102.222.211): icmp_seq=7 ttl=58 time=204 ms&lt;br /&gt;&lt;br /&gt;--- patroklos.noc.ntua.gr ping statistics ---&lt;br /&gt;7 packets transmitted, 7 received, 0% packet loss, time 5998ms&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rtt min/avg/max/mdev = 194.562/199.653/204.150/3.273 ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;stelios@DIAS-Linux:~$ ping us.archive.ubuntu.com&lt;br /&gt;PING us.archive.ubuntu.com (91.189.88.31) 56(84) bytes of data.&lt;br /&gt;64 bytes from leningradskaya.canonical.com (91.189.88.31): icmp_seq=1 ttl=54 time=90.2 ms&lt;br /&gt;64 bytes from leningradskaya.canonical.com (91.189.88.31): icmp_seq=2 ttl=54 time=89.9 ms&lt;br /&gt;64 bytes from leningradskaya.canonical.com (91.189.88.31): icmp_seq=3 ttl=54 time=90.3 ms&lt;br /&gt;64 bytes from leningradskaya.canonical.com (91.189.88.31): icmp_seq=4 ttl=54 time=89.5 ms&lt;br /&gt;64 bytes from leningradskaya.canonical.com (91.189.88.31): icmp_seq=5 ttl=54 time=89.1 ms&lt;br /&gt;64 bytes from leningradskaya.canonical.com (91.189.88.31): icmp_seq=6 ttl=54 time=88.6 ms&lt;br /&gt;&lt;br /&gt;--- us.archive.ubuntu.com ping statistics ---&lt;br /&gt;3 packets transmitted, 3 received, 0% packet loss, time 1998ms&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rtt min/avg/max/mdev = 88.453/89.106/90.142/0.816 ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;It looks like it takes 2.5 times more time to reach the local Athens uni, where the mirror is than the US mirror.&lt;br /&gt;I was aware that there are capacity issues at the AIX the Greek providers are using for interconnecting but this is really ridiculous...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-391411871258049446?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/391411871258049446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=391411871258049446' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/391411871258049446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/391411871258049446'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/01/when-getting-tcp-packet-from-usa-than.html' title='When getting a tcp packet from USA than a local ISP is faster...'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-7573229852814858401</id><published>2009-01-23T14:13:00.006+02:00</published><updated>2009-01-26T23:16:34.307+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssh tunnel'/><category scheme='http://www.blogger.com/atom/ns#' term='embedded'/><category scheme='http://www.blogger.com/atom/ns#' term='asterisk'/><title type='text'>Doing a reverse ssh tunnel the embedded way</title><content type='html'>Having a large number of asterisk pbx installations creates some interesting problems to people who provide support for them.&lt;br /&gt;One of tha major issues is how do you get access to the PBX if it is sitting behind a firewall/nat where you have little on no control and/or has a dynamic ip.&lt;br /&gt;In most cases you could forward the ssh port from the vpn/router to the the asterisk machine but there are several problem that can come up with this way.&lt;br /&gt;1) More and more companies have a strict "no incoming ports open" policy.&lt;br /&gt;2) Having a permanent "unrestricted" access to the pbx equipment and its logs and functions,might make some companies very skeptic.&lt;br /&gt;On the other having to send a tech person to a 2 hour drive to add an extension or make a minor modification to the dialplan is rather expensive and would create a real support nightmare.&lt;br /&gt;&lt;br /&gt;After thinking about it and discussing with our clients (and their clients), we came up with the idea of a customer triggered solution that would create some form of secure "tunnel" from the Hermes e-IPBX to the suport center of the company that is providing support for the PBX.&lt;br /&gt;&lt;br /&gt;The idea is simple.&lt;br /&gt;If a tech needs to access the PBX remotely, a person in the company calls an extension, enters a password and the the pbx creates a secure tunnel to the server of the support company giving them access.&lt;br /&gt;Once support has finished, the person in the company calls again the same extension shutting down the tunnel, and everything goes back to normal.&lt;br /&gt;No open ports, no "unauthorized" access.&lt;br /&gt;&lt;br /&gt;The question then came, to what type of secure tunnel we would use.&lt;br /&gt;The solution had to provide a secure login and also access to web interface (port 80) of the pbx&lt;br /&gt;Since Hermes e-IPBX runs on embedded devices also it had to be something small in size.&lt;br /&gt;With this in mind we started investigating two options.&lt;br /&gt;A PPTP vpn and a reverse ssh tunnel.&lt;br /&gt;&lt;br /&gt;We started with the ssh option first, as almost all of the required pieces of software where in place,as Hermes e-IPBX is using &lt;a href="http://matt.ucc.asn.au/dropbear/dropbear.html"&gt;dropbear &lt;/a&gt;as an ssh client/server.&lt;br /&gt;&lt;br /&gt;One very little know fact about the ssh is that on top of providing secure logins to remote hosts, it can create secure tunnels between two points and forward  ports between them.&lt;br /&gt;Another even less known fact is that it can create reverse tunnels, where machine A which is behind a firewall/nat can be accessed by machine B without having to change anything in machine's A firewall/nat.&lt;br /&gt;For this to work, machine B must have a publicly accessible ssh server.&lt;br /&gt;&lt;br /&gt;It goes like this&lt;br /&gt;&lt;br /&gt;Machine A initiated a reverse ssh tunnel connection to machines B ssh serv&lt;br /&gt;er.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;# ssh -fNR [bind_address:]port:host:hostport]  [user@]hostname&lt;/blockquote&gt;&lt;br /&gt;Once this is done machine B initiates a LOCAL connection to the port machine A is using as forward.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;# ssh localhost -p port&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;As example we want to access the target node (name: localhost) from our node (name: www.support-example.org). The port we want to access is port 22 and it will be accessible from our node at port 2222. &lt;blockquote&gt;# ssh -fNR 2222:localhost:22 www.support-example.com&lt;/blockquote&gt; After that, the you are prompted password as  usual. After successful login, the command quit but it will remains in background.To access the target node, use our node to access the forwarded port (2222). So let say, if you want to ssh into the machine (because we have forwarded ssh port), we can use this command &lt;blockquote&gt;# ssh localhost -p 2222&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt; That is all. You now have loged in to the remote machine.&lt;br /&gt;&lt;br /&gt;We had this example tested using our Ubuntu desktops but when we tried to implemented to the Hermes e-IPBX a few problems come up.&lt;br /&gt;&lt;br /&gt;First, dropbear requires slightly modified commands&lt;br /&gt;so the&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;# ssh -fNR 2222:localhost:22 www.support-example.com&lt;/blockquote&gt;&lt;br /&gt;becomes&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;# ssh -f - N -R 2222:localhost:22 www.support-example.com&lt;/blockquote&gt;&lt;br /&gt;Second and most important, the moment we had machine's B 22 port open (the one with the publicly accessible ssh server)  we received a number of brute force ssh password guessing attacks.&lt;br /&gt;Normally this would not be much of a security problem (unless of course your root password is "sex" or "god" :) but it is both annoying having to switft over large logs with failed attempts and also could work as a potential DOS attack.&lt;br /&gt;&lt;br /&gt;The good thing about this ssh brute force attacks is that in most cases are started by "script kiddies" and the only port they scan is 22.&lt;br /&gt;So if you move your ssh server to another higher port the problem pretty much disappears.&lt;br /&gt;Off course as an added protection to your extra-secure-ssh-password :) it would make sense to put the machine with the ssh server on the dmz zone of your network. In the case your extra-secure-ssh-password is not so secure or a security hole is found in your ssh server.&lt;br /&gt;&lt;br /&gt;So assuming you move the ssh server to port 3333 the command on machine A should become&lt;br /&gt;&lt;br /&gt;# ssh -p 3333 -f - N -R 2222:localhost:22 www.support-example.com&lt;br /&gt;&lt;br /&gt;In a following post i'll show how to merge all the above with the asterisk dialplan and create a neat support feature.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-7573229852814858401?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/7573229852814858401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=7573229852814858401' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7573229852814858401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7573229852814858401'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/01/doing-reverse-ssh-tunnel-embedded-way.html' title='Doing a reverse ssh tunnel the embedded way'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-7899708897358160587</id><published>2009-01-20T11:57:00.004+02:00</published><updated>2009-01-20T12:10:56.464+02:00</updated><title type='text'>The Voltcraft energy Logger 3500 has arrived</title><content type='html'>The Voltcraft energy Logger 3500 has arrived today and already had the first surprise.&lt;br /&gt;As a test, I connected an extension cord which had my mobile's charger, and a BT handset charger to see how its working.&lt;br /&gt;I unplugged the devices one after the other to see how much the current consumed was dropping and even when i had both of them disconnected Volcraft was registering a 1W power consumption.&lt;br /&gt;I though it was weird,considering that the extension cord is  passive, but then i noticed that my extension cord  has a switch with a light, to show when its on or off.&lt;br /&gt;Switching off the cord power consumption went to 0...&lt;br /&gt;Wow 1W from the lamp of the extension cord !&lt;br /&gt;Although this is close to the error range of the Voltcraft,that made me wonder how many other devices are"hidden" consumers of electricity around the house or the office.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-7899708897358160587?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/7899708897358160587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=7899708897358160587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7899708897358160587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7899708897358160587'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/01/voltcraft-energy-logger-3500-has.html' title='The Voltcraft energy Logger 3500 has arrived'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-579300119821254377</id><published>2009-01-15T14:37:00.011+02:00</published><updated>2009-01-16T11:24:37.185+02:00</updated><title type='text'>Measuring embedded asterisk power consumption</title><content type='html'>For sometime now i wanted to look at the power consumption of embedded devices running asterisk compared to a "standard" pc (if such a thing exists) and possible extend it also to measure standard PBX's.&lt;br /&gt;&lt;br /&gt;With a first look it looks easy enough, but as with all measurements where  you want an accurate result the devil is in the details.&lt;br /&gt;&lt;br /&gt;First problem that has to be answered is "How do you get an accurate measurement of the power consumption"&lt;br /&gt;&lt;br /&gt;There are several low-cost "energy metering devices" ( 15-20 Euros) in the market, in some cases you can find then in supermarkets also, but the accuracy they provide is rather dubious.&lt;br /&gt;From a first look most could not measure power if the power was less than 5W, which is close to what a lot of embedded boards are rated at.&lt;br /&gt;Also is very close to what most PC power supplies would consume in idle mode.&lt;br /&gt;&lt;br /&gt;There are some professional equipment out there  but spending 400-2500K Euros was not an option.&lt;br /&gt;So after some search and reading i found a device that looks accurate enough and won't make a big dent on the budget.&lt;br /&gt;&lt;br /&gt;This was &lt;a href="http://www.conrad-international.com/?article=125323"&gt;Voltcraft Plus Energy Logger 3500&lt;/a&gt; from Conrad.de&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Gx6joISuIwk/SW8yvz8mMII/AAAAAAAAAA8/CMRxarGIcIQ/s1600-h/125323_LB_02_FB.EPS.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 350px; height: 199px;" src="http://3.bp.blogspot.com/_Gx6joISuIwk/SW8yvz8mMII/AAAAAAAAAA8/CMRxarGIcIQ/s400/125323_LB_02_FB.EPS.jpg" alt="" id="BLOGGER_PHOTO_ID_5291503884163231874" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;According to the specs it could measure :&lt;br /&gt;&lt;br /&gt;Operating voltage               230 V/AC&lt;br /&gt;Performance measurement display 0.1 -3500 W&lt;br /&gt;Performance consumption display 0.000 - 9999 kWh&lt;br /&gt;Display                         3-cell with 4 positions each&lt;br /&gt;Tariff range                    0,000 - 9,999&lt;br /&gt;Accuracy                        5 - 3500 W (± 1% + 1 count)&lt;br /&gt;                             2 -5 W (± 5% + 1 count)&lt;br /&gt;                             less than 2W (± 15% + 1 count)&lt;br /&gt;&lt;br /&gt;So it provides a +- 5% accuracy from 2-5 W which is rather good for a device that costs 50 Euros.&lt;br /&gt;&lt;br /&gt;The other big advantage is that it uses an SD card to store measurements and comes with a piece of software to display the data captured.&lt;br /&gt;&lt;br /&gt;I have placed an order for it and i expect it to arrive within next week.&lt;br /&gt;That would give me enough time to figure out which devices and the way to test them.&lt;br /&gt;&lt;br /&gt;Any ideas/suggestions/criticism is welcome.&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-579300119821254377?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/579300119821254377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=579300119821254377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/579300119821254377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/579300119821254377'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/01/for-sometime-now-i-wanted-to-look-at.html' title='Measuring embedded asterisk power consumption'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Gx6joISuIwk/SW8yvz8mMII/AAAAAAAAAA8/CMRxarGIcIQ/s72-c/125323_LB_02_FB.EPS.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-576911064756735860</id><published>2009-01-12T11:26:00.002+02:00</published><updated>2009-01-12T11:37:45.835+02:00</updated><title type='text'>Musopen ! copyright free (public domain) music</title><content type='html'>I was looking for free (as in beer) music i could use with our &lt;a href="http://www.digital-opsis.com/?ID=4&amp;amp;SUBID=4"&gt;HERMES e-IPBX&lt;/a&gt; for Music On Hold.&lt;br /&gt;After some Googling i found &lt;a href="http://www.musopen.com/"&gt;Musopen&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://www.musopen.com/"&gt;Musopen&lt;/a&gt; is an online music library of copyright free (public domain) music.&lt;br /&gt;As a footnote, If you finally decide to use it please make a donation ( i know from experience that most Open Source project need help in any form)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-576911064756735860?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/576911064756735860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=576911064756735860' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/576911064756735860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/576911064756735860'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/01/musopen-copyright-free-public-domain.html' title='Musopen ! copyright free (public domain) music'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-8302667047964730830</id><published>2009-01-11T12:03:00.002+02:00</published><updated>2009-01-11T12:06:48.055+02:00</updated><title type='text'>World PSTN Tone Database</title><content type='html'>If you are interested in setting your sip phones or asterisk dialtone (or other tones) to be similar to the country you are in there is an online database with tone settings&lt;br /&gt;&lt;br /&gt;http://www.3amsystems.com/wireline/tone-search.htm&lt;br /&gt;&lt;br /&gt;It provides the frequency and cadence info plus it displays it with the format to be used by asterisk or sipura/linksys phones.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-8302667047964730830?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/8302667047964730830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=8302667047964730830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/8302667047964730830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/8302667047964730830'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/01/world-pstn-tone-database.html' title='World PSTN Tone Database'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-3075537805780673377</id><published>2009-01-09T11:57:00.003+02:00</published><updated>2009-01-09T12:16:50.770+02:00</updated><title type='text'>Updating the NVIDA CUDA driver in Ubuntu</title><content type='html'>I am running Ubuntu 8.04 (Hardy) 64bit on my desktop and also have the NVIDIA CUDA installed to do some "R&amp;amp;D" work on accelerating asterisk codecs using the NVIDIA GPU's.&lt;br /&gt;Since Ubuntu does not provide a package with the CUDA drivers i had them manually installed.&lt;br /&gt;&lt;br /&gt;All things are great till you get a new kernel update from Ubuntu...&lt;br /&gt;After the kernel update the NVIDIA driver (as expected) does not load and your X server switches to a low resolution mode.&lt;br /&gt;Then you need to re-install the NVIDIA CUDA drivers and it can be a bit problematic since the installer requires X server to be shut-down.&lt;br /&gt;&lt;br /&gt;So here is what i do&lt;br /&gt;&lt;br /&gt;First press&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;CTRL-ALT-F1&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;to switch to a terminal window, and login&lt;br /&gt;&lt;br /&gt;then type&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;sudo /etc/init.d/gdm stop&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;That stops the X server and you can now install the drivers.&lt;br /&gt;&lt;br /&gt;Go to the dir where the NVIDIA-Linux-x86_64-XXX.XX-pkg2.run file is&lt;br /&gt;(I am currently using NVIDIA-Linux-x86_64-177.67-pkg2.run) and write&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;sudo ./NVIDIA-Linux-x86_64-177.67-pkg2.run&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The installer will warn you about an allready installed driver but you can ignore it.&lt;br /&gt;Then it will not find a pre-build module so it will build it on the fly.&lt;br /&gt;&lt;br /&gt;When asked about updating your X server config, answer no, as this will probably mess-it up.&lt;br /&gt;&lt;br /&gt;Do a reboot and the NVIDA logo (with the big BETA) should come up and you should now be in the same mode as before the kernel update.&lt;br /&gt;&lt;br /&gt;BTW you do not need to update the NVIDIA SDK or the tools.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-3075537805780673377?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/3075537805780673377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=3075537805780673377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3075537805780673377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3075537805780673377'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/01/updating-nvida-cuda-driver-in-ubuntu.html' title='Updating the NVIDA CUDA driver in Ubuntu'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-7067094036372504361</id><published>2009-01-04T12:25:00.001+02:00</published><updated>2009-01-04T12:27:26.476+02:00</updated><title type='text'>Happy New Year</title><content type='html'>Happy New Year to everyone !&lt;br /&gt;Let's hope that things will get better this year, although the first sings are not that good :(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-7067094036372504361?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/7067094036372504361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=7067094036372504361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7067094036372504361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7067094036372504361'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2009/01/happy-new-year.html' title='Happy New Year'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-7161456552300115114</id><published>2008-12-12T01:04:00.004+02:00</published><updated>2008-12-12T01:18:32.562+02:00</updated><title type='text'>Compiling Asterisk on Ubuntu server</title><content type='html'>I wanted to test something on Asterisk for a project and need it a new clean install.&lt;br /&gt;Instead of setting up another machine i decided to use the power of my desktop machine ( an intel quad core with 8GBram) and go for a VM.&lt;br /&gt;I decided to use QEMU for the VM as i am using it for embedded development for sometime now and it has proven a very reliable tool (plus its free :)  &lt;br /&gt;I created an Ubuntu server on the VM, but then i realized that the asterisk packages shipping with Ubuntu server were rather old.&lt;br /&gt;So i downloaded asterisk, asterisk-addons, libpri and zaptel and started the building process.&lt;br /&gt;For those of you who decide to go the same way, following are the packages you need to get asterisk with realtime (aka mysql support) to build.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;sudo apt-get install build-essential speex libspeex-dev gsm-utils \&lt;br /&gt;libgsm1-dev libgsmme-dev libgsm1 libgsm-tools \&lt;br /&gt;libncurses5-dev ncurses-term libncurses5-dbg libsqlxx-dev doxygen&lt;br /&gt;&lt;br /&gt;You will also need to install the linux kernel headers &lt;br /&gt;so do a 'uname -r" and then &lt;br /&gt;&lt;br /&gt;sudo apt-get install linux-headers-your-kernel-version-here&lt;br /&gt;&lt;br /&gt;Once all these get install, follow the standard procedure to build libpri,zaptel,asterisk and asterisk-addons&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-7161456552300115114?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/7161456552300115114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=7161456552300115114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7161456552300115114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7161456552300115114'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2008/12/compiling-asterisk-on-ubuntu-server.html' title='Compiling Asterisk on Ubuntu server'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-5022492869368663378</id><published>2008-12-08T13:08:00.005+02:00</published><updated>2008-12-08T13:29:39.800+02:00</updated><title type='text'>Altec Telecoms - Charges beyond the "grave"</title><content type='html'>To many of you who do not know it, Altec Telecoms *WAS* a Greek VOIP provider that went bankrupt a couple of months ago.&lt;br /&gt;I was using their service, a pre-paid one, and i was paying using PayPal for a DID line plus the costs of the calls i was making.&lt;br /&gt;When it wend bankrupt, services to customers terminated and i had something in the range of 30 Euros pre-paid to them, which i pressumed that had gone to the "never-never land"&lt;br /&gt;Then i started receiving these emails&lt;br /&gt;To those of you that the first part looks...Greek, don't worry it is :)&lt;br /&gt;&lt;br /&gt;English text follows&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Αγαπητέ / αγαπητή SKORONEOS,&lt;br /&gt;&lt;br /&gt;Με το μήνυμα αυτό σας ενημερώνουμε ότι η ισχύς του i-CallIn αριθμού 2116875170 που έχετε δεσμεύσει, θα λήξει την 13/12/2008, οπότε και θα αφαιρέσουμε το ποσό των 1 € από το υπόλοιπό σας για να ανανεώσουμε την ισχύ του για τον επόμενο μήνα.&lt;br /&gt;&lt;br /&gt;Σε περίπτωση που το υπόλοιπο του λογαριασμού σας δεν επαρκεί, ο αριθμός θα απενεργοποιηθεί (δηλαδή δεν θα μπορείτε να δέχεστε κλήσεις σε αυτόν) αλλά δεν θα αποδεσμευθεί. Θα εξακολουθήσει να είναι δεσμευμένος για εσάς για τους επόμενους 6 μήνες.&lt;br /&gt;&lt;br /&gt;Εναλλακτικά, μπορείτε να ενεργοποιήσετε / ανανεώσετε το i-Call Unlimited για ένα μήνα επιλέγοντας αυτόν τον αριθμό, οπότε θα ανανεώσουμε την ισχύ του για ένα μήνα εντελώς δωρεάν! Περισσότερα για το i-Call Unlimited διαβάστε στο site του i-Call (http://www.i-call.gr/unlimited.aspx).&lt;br /&gt;&lt;br /&gt;Σας ευχαριστούμε!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dear SKORONEOS,&lt;br /&gt;&lt;br /&gt;With this message we are informing you that your i-CallIn number 2116875170 will expire on 13/12/2008. On that date, we will deduct from your account's "wallet" the amount of 1 € to renew this number for the next month.&lt;br /&gt;&lt;br /&gt;In case your account's balance is insufficient, the number will be deactivated (you will not be able to receive calls on it), but it will not be released from you. It will continue to be reserved for you for the next 6 months.&lt;br /&gt;&lt;br /&gt;Alternatively, you can activate / renew i-Call Unlimited and select this number, in which case we will renew the number for an additional month free of charge! Read more about i-Call Unlimited at the i-Call site (http://www.i-call.gr/unlimited.aspx).&lt;br /&gt;&lt;br /&gt;Thank you!&lt;br /&gt;&lt;br /&gt;A charge notification from a bankrupt company, that has shutdown operations !!!???? WOW !&lt;br /&gt;&lt;br /&gt;Well it looks like Altec Telecoms is now in a "zombi" state, as the people who worked there have "taken over" the installations in order to "protect the company assets until the bankruptcy court comes out with a decision" i.e get some money as compensation.&lt;br /&gt;&lt;br /&gt;The weird think is that although i can not connect to their sip.server, they still have internet connection and can send emails and also their TDM lines are working, so when you call the DID assigned to you  get directed to the voicemail...&lt;br /&gt;&lt;br /&gt;I thank God, i decided to go with the pre-pay plan and pay with Paypal and not with a contract/monthly credit card charge, as i believe i would have seen charges been applied to the credit-card and then go though the pains of contacting the bank for canceling them....&lt;br /&gt;&lt;br /&gt;My .2 euro cent advice to Altec Telecom customers paying with credit card... check your credit card statments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-5022492869368663378?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/5022492869368663378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=5022492869368663378' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/5022492869368663378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/5022492869368663378'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2008/12/altec-telecoms-charges-beyond-grave.html' title='Altec Telecoms - Charges beyond the &quot;grave&quot;'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-3963662778093868775</id><published>2008-10-23T13:12:00.003+03:00</published><updated>2008-10-23T13:20:28.682+03:00</updated><title type='text'>Preparing for my son's baptizing</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Gx6joISuIwk/SQBPr9PKQyI/AAAAAAAAAAU/ojempRUk62g/s1600-h/proskitirio0002.jpeg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 221px; height: 320px;" src="http://4.bp.blogspot.com/_Gx6joISuIwk/SQBPr9PKQyI/AAAAAAAAAAU/ojempRUk62g/s320/proskitirio0002.jpeg" alt="" id="BLOGGER_PHOTO_ID_5260291981359858466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Gx6joISuIwk/SQBOyvJICCI/AAAAAAAAAAM/4GUYMmsuMN8/s1600-h/proskitirio0001.jpeg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 226px; height: 320px;" src="http://1.bp.blogspot.com/_Gx6joISuIwk/SQBOyvJICCI/AAAAAAAAAAM/4GUYMmsuMN8/s320/proskitirio0001.jpeg" alt="" id="BLOGGER_PHOTO_ID_5260290998323906594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;There is a lot of activity in the house as we are preparing for my son's baptizing on November 9th.&lt;br /&gt;We are expecting family from all over Greece and friends from abroad so preparations are underway for sometime now, but we are now moving to "overdrive"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-3963662778093868775?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/3963662778093868775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=3963662778093868775' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3963662778093868775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3963662778093868775'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2008/10/preparing-for-my-sons-baptizing.html' title='Preparing for my son&apos;s baptizing'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Gx6joISuIwk/SQBPr9PKQyI/AAAAAAAAAAU/ojempRUk62g/s72-c/proskitirio0002.jpeg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-7711211145752850077</id><published>2008-10-23T12:28:00.003+03:00</published><updated>2008-10-23T12:52:45.792+03:00</updated><title type='text'>OSLEC code optimization</title><content type='html'>While working on my first CUDA app, i had a look at &lt;a href="http://www.rowetel.com/ucasterisk/oslec.html"&gt;OSLEC&lt;/a&gt; as i though it would be a good candidate for parallel execution..&lt;br /&gt;OSLEC is an Open Source echo canceler, written by  David Row and used by asterisk.&lt;br /&gt;After profiling the code,I found 2 places that i thought could benefit from some optimization. These were 2 loops that OSLEC spends considerable time in.&lt;br /&gt;The first looked like that, and its part of the FIR filter in OSLEC&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt; int i;&lt;br /&gt;    int offset1;&lt;br /&gt;    int offset2;&lt;br /&gt;&lt;br /&gt;    fir-&gt;history[fir-&gt;curr_pos] = sample;&lt;br /&gt;&lt;br /&gt;    offset2 = fir-&gt;curr_pos;&lt;br /&gt;    offset1 = fir-&gt;taps - offset2;&lt;br /&gt;    y = 0;&lt;br /&gt;    for (i = fir-&gt;taps - 1;  i &gt;= offset1;  i--)&lt;br /&gt;        y += fir-&gt;coeffs[i]*fir-&gt;history[i - offset1];&lt;br /&gt;    for (  ;  i &gt;= 0;  i--)&lt;br /&gt;        y += fir-&gt;coeffs[i]*fir-&gt;history[i + offset2];&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;By unrolling it it becomes like that&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt; int i;&lt;br /&gt;    int offset1;&lt;br /&gt;    int offset2;&lt;br /&gt;    int position;&lt;br /&gt;&lt;br /&gt;    fir-&gt;history[fir-&gt;curr_pos] = sample;&lt;br /&gt;&lt;br /&gt;    offset2 = fir-&gt;curr_pos;&lt;br /&gt;    offset1 = fir-&gt;taps - offset2;&lt;br /&gt;    y = 0;&lt;br /&gt;//    for (i = fir-&gt;taps - 1;  i &gt;= offset1;  i--)&lt;br /&gt;//        y += fir-&gt;coeffs[i]*fir-&gt;history[i - offset1];&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    i=fir-&gt;taps - 1;&lt;br /&gt;    while ( i &gt;= offset1 )&lt;br /&gt;    {&lt;br /&gt;      position=i-offset1;&lt;br /&gt;        y += fir-&gt;coeffs[i]*fir-&gt;history[position];&lt;br /&gt;        y += fir-&gt;coeffs[i-1]*fir-&gt;history[position-1];&lt;br /&gt;        y += fir-&gt;coeffs[i-2]*fir-&gt;history[position-2];&lt;br /&gt;        y += fir-&gt;coeffs[i-3]*fir-&gt;history[position-3];&lt;br /&gt;        y += fir-&gt;coeffs[i-4]*fir-&gt;history[position-4];&lt;br /&gt;        y += fir-&gt;coeffs[i-5]*fir-&gt;history[position-5];&lt;br /&gt;        y += fir-&gt;coeffs[i-6]*fir-&gt;history[position-6];&lt;br /&gt;        y += fir-&gt;coeffs[i-7]*fir-&gt;history[position-7];&lt;br /&gt;&lt;br /&gt;        y += fir-&gt;coeffs[i-8]*fir-&gt;history[position-8];&lt;br /&gt;        y += fir-&gt;coeffs[i-9]*fir-&gt;history[position-9];&lt;br /&gt;        y += fir-&gt;coeffs[i-10]*fir-&gt;history[position-10];&lt;br /&gt;        y += fir-&gt;coeffs[i-11]*fir-&gt;history[position-11];&lt;br /&gt;        y += fir-&gt;coeffs[i-12]*fir-&gt;history[position-12];&lt;br /&gt;        y += fir-&gt;coeffs[i-13]*fir-&gt;history[position-13];&lt;br /&gt;        y += fir-&gt;coeffs[i-14]*fir-&gt;history[position-14];&lt;br /&gt;        y += fir-&gt;coeffs[i-15]*fir-&gt;history[position-15];&lt;br /&gt;&lt;br /&gt;        i=i-16;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;and guess what,after recompiling there was 10% speed increase in OSLEC execution.&lt;br /&gt;Then i moved to the second part that OSLEC spends a lot of time, the coefficient calculation.&lt;br /&gt;Unrolling this loop gave roughly another 10% speed increase.&lt;br /&gt;Roughly 20% speed increase in total, that's not bad :)&lt;br /&gt;&lt;br /&gt;To verify that the increase were not an x86 "fluke" i added the patches to the oslec code in &lt;a href="http://www.digital-opsis.com/index.php?ID=4&amp;SUBID=1"&gt;E-IPBX&lt;/a&gt; and recompiled the WARP version.&lt;br /&gt;(&lt;a href="http://www.pikatechnologies.com/english/View.asp?x=608"&gt;WARP&lt;/a&gt; is a powerpc based PBX appliance from &lt;a href="http://www.pikatech.com/"&gt;PIKA&lt;/a&gt; that we are working on)&lt;br /&gt;&lt;br /&gt;I kept the original speedtest program and build 2 more adding each patch.&lt;br /&gt;Bellow are the results first the unmodified speetest,and then with the first patch and the last with both patches.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;root@e-ipbx:/$ speedtest  &lt;br /&gt; &lt;br /&gt;Testing OSLEC with 128 taps (16 ms tail)&lt;br /&gt;CPU executes 527.63 MIPS&lt;br /&gt;-------------------------&lt;br /&gt; &lt;br /&gt;Method 1: gettimeofday() at start and end&lt;br /&gt;  601 ms for 10s of speech&lt;br /&gt;  31.71 MIPS&lt;br /&gt;  16.64 instances possible at 100% CPU load&lt;br /&gt;Method 2: samples clock cycles at start and end&lt;br /&gt;  31.71 MIPS&lt;br /&gt;  16.64 instances possible at 100% CPU load&lt;br /&gt;Method 3: samples clock cycles for each call, IIR average&lt;br /&gt;  cycles_worst 140815 cycles_last 3535 cycles_av: 4036&lt;br /&gt;  32.29 MIPS&lt;br /&gt;  16.34 instances possible at 100% CPU load&lt;br /&gt; &lt;br /&gt;root@e-ipbx:/$ ./speedtest2 &lt;br /&gt; &lt;br /&gt;Testing OSLEC with 128 taps (16 ms tail)&lt;br /&gt;CPU executes 528.91 MIPS&lt;br /&gt;-------------------------&lt;br /&gt; &lt;br /&gt;Method 1: gettimeofday() at start and end&lt;br /&gt;  497 ms for 10s of speech&lt;br /&gt;  26.29 MIPS&lt;br /&gt;  20.12 instances possible at 100% CPU load&lt;br /&gt;Method 2: samples clock cycles at start and end&lt;br /&gt;  26.29 MIPS&lt;br /&gt;  20.12 instances possible at 100% CPU load&lt;br /&gt;Method 3: samples clock cycles for each call, IIR average&lt;br /&gt;  cycles_worst 100679 cycles_last 3046 cycles_av: 3933&lt;br /&gt;  31.46 MIPS&lt;br /&gt;  16.81 instances possible at 100% CPU load&lt;br /&gt;root@e-ipbx:/$ ./speedtest3&lt;br /&gt; &lt;br /&gt;Testing OSLEC with 128 taps (16 ms tail)&lt;br /&gt;CPU executes 527.67 MIPS&lt;br /&gt;-------------------------&lt;br /&gt; &lt;br /&gt;Method 1: gettimeofday() at start and end&lt;br /&gt;  485 ms for 10s of speech&lt;br /&gt;  25.59 MIPS&lt;br /&gt;  20.62 instances possible at 100% CPU load&lt;br /&gt;Method 2: samples clock cycles at start and end&lt;br /&gt;  25.59 MIPS&lt;br /&gt;  20.62 instances possible at 100% CPU load&lt;br /&gt;Method 3: samples clock cycles for each call, IIR average&lt;br /&gt;  cycles_worst 142386 cycles_last 2824 cycles_av: 2781&lt;br /&gt;  22.25 MIPS&lt;br /&gt;  23.72 instances possible at 100% CPU load&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Not bad for a few lines of code :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-7711211145752850077?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/7711211145752850077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=7711211145752850077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7711211145752850077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/7711211145752850077'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2008/10/oslec-code-optimization.html' title='OSLEC code optimization'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-3852691911189401105</id><published>2008-10-17T21:18:00.004+03:00</published><updated>2008-10-17T21:22:26.525+03:00</updated><title type='text'>A super-computer in your desktop</title><content type='html'>Today i decided to spend sometime and get &lt;a href="http://www.nvidia.com/object/cuda_home.html#"&gt;NVIDIA CUDA&lt;/a&gt; working on my desktop machine ( A quad Intel Q6600@2.40GHz. with 8 GB of Ram running in 64bit mode)&lt;br /&gt;I had worked with CUDA about a year ago, when it was at the early beta stage but things have moved on a lot since then.&lt;br /&gt;Setting my GeForce 8800 GT on Ubuntu 8.04 took a bit longer than "usual" due to the fact that 8.04 is not supported "out of the box"&lt;br /&gt;Luckily there are some &lt;a href="http://forums.anandtech.com/messageview.aspx?catid=39&amp;threadid=2225245&amp;enterthread=y"&gt;very detailed pages&lt;/a&gt; that helped and in less than an hour, CUDA example programs were happily running.&lt;br /&gt;The GeForce 8800 GT is rated at 350+ GFLOPS which is pretty impressive (consider that &lt;a href="http://en.wikipedia.org/wiki/Cray-2"&gt;Cray-2&lt;/a&gt; could do a "meager" 1.9 GFLOPS)&lt;br /&gt;The only problem (as with a lot of the hardware these days) is that there is very little software to take advantage of it.&lt;br /&gt;My reason of getting CUDA to work is to explore the possibilities of accelerating various pieces of code/applications i am interested in.&lt;br /&gt;Echo canceling (&lt;a href="http://www.rowetel.com/ucasterisk/oslec.html"&gt;OSLEC&lt;/a&gt; for example) and transcoding for &lt;a href="http://www.asterisk.org"&gt;asterisk&lt;/a&gt;, are high on the list and based on the experience i had of porting asterisk to an FPGA there could be some very interesting results.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-3852691911189401105?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/3852691911189401105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=3852691911189401105' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3852691911189401105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/3852691911189401105'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2008/10/super-computer-in-your-desktop_3233.html' title='A super-computer in your desktop'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5590772396683017088.post-6335449357325828933</id><published>2008-10-16T11:17:00.004+03:00</published><updated>2008-10-16T11:52:44.252+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Digital-OPSiS'/><category scheme='http://www.blogger.com/atom/ns#' term='opencoffee'/><category scheme='http://www.blogger.com/atom/ns#' term='Jason Calacanis'/><category scheme='http://www.blogger.com/atom/ns#' term='asterisk'/><title type='text'>Let's start blogging</title><content type='html'>Up till now i had resisted the idea of starting a blog.&lt;br /&gt;The main reason i had as my excuse, was time or to better put it, the lack of it. Trying to run a small business and a family with a new born is enough to make you wish for more hours in a day.&lt;br /&gt;But the real reason was that i though of blogging as just "hype" that will run its course and sooner or later disappear.&lt;br /&gt;&lt;br /&gt;Then i attended the &lt;a href="http://www.opencoffee.gr/"&gt;OpenCoffee&lt;/a&gt; XV meeting in Athens and heard &lt;a href="http://calacanis.com/"&gt;Jason Calacanis&lt;/a&gt; presentation.&lt;br /&gt;At one point he mentioned something like "the more you give to the community the more you will get back" and that really got me thinking.&lt;br /&gt;My company, &lt;a href="http://www.digital-opsis.com/"&gt;Digital-OPSiS&lt;/a&gt;, is developing embedded Open Source solutions for sometime now, so you can say that we own our existence to the mentality of giving to the community.&lt;br /&gt;If the people who started the Open Source movement haven't done so, probably many of the wonderful things that we now take for granted in the IT/Internet would not exist.&lt;br /&gt;I call it the "avalanche effect" and seen it many times with open source projects.&lt;br /&gt;Someone writes a few lines of code, posts the code online,and boom, developers from all over the world start contributing and before you know it you have a killer app in your hands (&lt;a href="http://www.asterisk.org"&gt;Asterisk&lt;/a&gt; anyone :)&lt;br /&gt;&lt;br /&gt;So the same could be true about ideas or thoughts&lt;br /&gt;If Jason had not said that phrase, probably i wouldn't have started this blog,so just think how many people could start something new,solve a problem or just feel better by  things you and i take for granted or just don't mention.&lt;br /&gt;That alone i think is a pretty good reason to start blogging&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5590772396683017088-6335449357325828933?l=skoroneos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://skoroneos.blogspot.com/feeds/6335449357325828933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5590772396683017088&amp;postID=6335449357325828933' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/6335449357325828933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5590772396683017088/posts/default/6335449357325828933'/><link rel='alternate' type='text/html' href='http://skoroneos.blogspot.com/2008/10/lets-start-blogging.html' title='Let&apos;s start blogging'/><author><name>Stelios S. Koroneos</name><uri>http://www.blogger.com/profile/02742743346345518922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_Gx6joISuIwk/SYlerWoOjJI/AAAAAAAAABI/S7UzKTuFy1Q/S220/n688494807_1488615_735.jpg'/></author><thr:total>1</thr:total></entry></feed>
