tag:blogger.com,1999:blog-7098474Tue, 11 Aug 2015 18:13:45 +0000dull-lifefuntoysexcrementimbecilesjunknerdsofficestasiMartincatcavefoodhackersmensathesisweb-two-oh-sucksbasicsendexamhp82249i2c 1wirei_suckmincerunningshiftzensursulaChris’ MiscellaneaMy place to post silly pictures and rants, even though I’m no longer a PhD-student.http://vogelchr.blogspot.com/noreply@blogger.com (Christian Vogel)Blogger299125tag:blogger.com,1999:blog-7098474.post-334931507506555442Sat, 08 Aug 2015 15:15:00 +00002015-08-09T08:14:38.433+00:00Full Disk Encryption with Cyanogenmod CM12.1 on a Samsung Galaxy S4 Mini<div>Update August 9th: Just skip to the last line of this post where we realize that we could have spared us all of the hassles and resize2fs from within the running android system ☺.</div><div><br></div><div><br></div>If you try to enable full disk encryption on Cyanogenmod CM12.1 using the normal settings menu (<i>Security -&gt; Encrypt Phone</i>) it doesn't work, the phone will just soft-reboot and nothing will have happened.<br> <br> If you "logcat" the debugging log of your phone (using adb logcat) within the huge amount of data, some hint about what might have gone wrong can be found:<br> <br> <span style="font-family: Courier New, Courier, monospace;">➜ &nbsp;~ &nbsp;grep Cryptfs logcat_encryption.txt&nbsp;</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;199): Check if PFE is activated on Boot</span><br> <span style="font-family: Courier New, Courier, monospace;">E/Cryptfs ( &nbsp;199): Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/userdata</span><br> <span style="font-family: Courier New, Courier, monospace;">E/Cryptfs ( &nbsp;199): Error getting crypt footer and key</span><br> <span style="font-family: Courier New, Courier, monospace;">E/Cryptfs ( &nbsp;199): Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/userdata</span><br> <span style="font-family: Courier New, Courier, monospace;"><b>E/Cryptfs ( &nbsp;199): Orig filesystem overlaps crypto footer region. &nbsp;Cannot encrypt in place.</b></span><br> <span style="font-family: Courier New, Courier, monospace;">E/Cryptfs ( &nbsp;199): Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/userdata</span><br> <span style="font-family: Courier New, Courier, monospace;"><b>E/Cryptfs ( &nbsp;199): Orig filesystem overlaps crypto footer region. &nbsp;Cannot encrypt in place.</b></span><br> <br> On android, the footer that tells the operating system that an partition is encrypted resides on the end of the filesystem and it needs a little space between the logical end of the filesystem in a partition, and the physical end of the partition to be squeezed in when converting a phone from unencrypted to encrypted.<br> <br> <a href="http://forum.xda-developers.com/nexus-4/help/looking-encryption-footer-t2676700">http://forum.xda-developers.com/nexus-4/help/looking-encryption-footer-t2676700</a><br> <br> Running the recovery system (boot while keeping Volume-Up and Home pressed), we can have a look at the partition sizes and filesystem details. We learn that on my S4 mini, the userdata partition (mmcblk0p24) has a size of 5685231 1k blocks, and the /data filesystem claims a size of 1421307 4k blocks.<br> <br> <span style="font-family: Courier New, Courier, monospace;">$ adb shell</span><br> <span style="font-family: Courier New, Courier, monospace;">~ # cat /proc/partitions</span><br> <span style="font-family: Courier New, Courier, monospace;">major minor &nbsp;#blocks &nbsp;name</span><br> <span style="font-family: Courier New, Courier, monospace;">(...)</span><br> <span style="font-family: Courier New, Courier, monospace;">&nbsp;179 &nbsp; &nbsp; &nbsp; 24 &nbsp; &nbsp;5685231 mmcblk0p24</span><br> <span style="font-family: Courier New, Courier, monospace;">~ # tune2fs -l /dev/block/mmcblk0p24&nbsp;</span><br> <span style="font-family: Courier New, Courier, monospace;">(...)</span><br> <span style="font-family: Courier New, Courier, monospace;">Block count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1421307</span><br> <span style="font-family: Courier New, Courier, monospace;">(...)</span><br> <span style="font-family: Courier New, Courier, monospace;">Block size: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4096</span><br> <br> As <span style="font-family: Courier New, Courier, monospace;">5685231-1421307*4 = 3</span>, that's only 3 meager 1k blocks at the end of the filesystem, whereas the encryption footer needs a space of at least 16k, the allmighty internet tells me. So, let's build a filesystem that leaves 128kByte of free space on the end as I don't know if Android 5 has enlarged the footer from what the websites I had found claims, or if there's some alignment requirement for it. So I'll be generous. <span style="font-family: Courier New, Courier, monospace;">(5685231-128)/4=1421275.75</span> so I'll create a ext4 filesystem occupying <b>142127<span style="background-color: yellow;">5</span> 4k blocks</b>:<br> <br> <span style="font-family: Courier New, Courier, monospace;">~ # mke2fs -b<b>4096</b> -T ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata <b style="background-color: yellow;">142127</b></span><div><span style="font-family: Courier New, Courier, monospace;"><b style="background-color: yellow;">(note: I made a mistake, ch0pped off the 5!)</b></span><br> <span style="font-family: Courier New, Courier, monospace;">mke2fs 1.41.14 (22-Dec-2010)</span><br> <span style="font-family: Courier New, Courier, monospace;">Filesystem label=</span><br> <span style="font-family: Courier New, Courier, monospace;">OS type: Linux</span><br> <span style="font-family: Courier New, Courier, monospace;">Block size=4096 (log=2)</span><br> <span style="font-family: Courier New, Courier, monospace;">Fragment size=4096 (log=2)</span><br> <span style="font-family: Courier New, Courier, monospace;">Stride=0 blocks, Stripe width=0 blocks</span><br> <span style="font-family: Courier New, Courier, monospace;">35600 inodes, 142127 blocks</span><br> <span style="font-family: Courier New, Courier, monospace;">7106 blocks (5.00%) reserved for the super user</span><br> <span style="font-family: Courier New, Courier, monospace;">First data block=0</span><br> <span style="font-family: Courier New, Courier, monospace;">Maximum filesystem blocks=146800640</span><br> <span style="font-family: Courier New, Courier, monospace;">5 block groups</span><br> <span style="font-family: Courier New, Courier, monospace;">32768 blocks per group, 32768 fragments per group</span><br> <span style="font-family: Courier New, Courier, monospace;">7120 inodes per group</span><br> <span style="font-family: Courier New, Courier, monospace;">Superblock backups stored on blocks:&nbsp;</span><br> <span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span>32768, 98304</span><br> <span style="font-family: Courier New, Courier, monospace;"><br> </span> <span style="font-family: Courier New, Courier, monospace;">Writing inode tables: done &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br> <span style="font-family: Courier New, Courier, monospace;">Creating journal (4096 blocks): done</span><br> <span style="font-family: Courier New, Courier, monospace;">Writing superblocks and filesystem accounting information: done</span><br> <span style="font-family: Courier New, Courier, monospace;"><br> </span> <span style="font-family: Courier New, Courier, monospace;">This filesystem will be automatically checked every 33 mounts or</span><br> <span style="font-family: Courier New, Courier, monospace;">180 days, whichever comes first. &nbsp;Use tune2fs -c or -i to override.</span><br> <br> <b>Do I really have to mention at this point that this will erase all your files?</b> Alternatively one could try "resizefs" to resize the filesystem, but that program isn't included in my recovery. Anyhow, it seems to be prudent to try encryption on an otherwise virgin install, as one risks data loss anyhow when performing the encryption process and there are reports of phones not booting up correctly after encyption had been enabled.<br> <br> Then reboot the phone, do a half-hearted initial setup of the device, configure a simple PIN for testing, and encrypt your phone. (I also enabled debugging so that I can run logcat again to catch errors).<br> <br> <span style="font-family: Courier New, Courier, monospace;">$ grep Cryptfs logcat_encryption_newfs.txt</span><br> <span style="font-family: Courier New, Courier, monospace;">(...)</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Check if PFE is activated on Boot</span><br> <span style="font-family: Courier New, Courier, monospace;">E/Cryptfs ( &nbsp;196): Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/userdata</span><br> <span style="font-family: Courier New, Courier, monospace;">E/Cryptfs ( &nbsp;196): Error getting crypt footer and key</span><br> <span style="font-family: Courier New, Courier, monospace;">E/Cryptfs ( &nbsp;196): not running with encryption, aborting</span><br> <span style="font-family: Courier New, Courier, monospace;">E/Cryptfs ( &nbsp;196): Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/userdata</span><br> <span style="font-family: Courier New, Courier, monospace;">D/Cryptfs ( &nbsp;196): Just asked init to shut down class main</span><br> <span style="font-family: Courier New, Courier, monospace;">D/Cryptfs ( &nbsp;196): unmounting /mnt/shell/emulated succeeded</span><br> <span style="font-family: Courier New, Courier, monospace;">D/Cryptfs ( &nbsp;196): unmounting /data succeeded</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): keymaster version is 2</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Using scrypt for cryptfs KDF</span><br> <span style="font-family: Courier New, Courier, monospace;">D/Cryptfs ( &nbsp;196): Just triggered post_fs_data</span><br> <span style="font-family: Courier New, Courier, monospace;">D/Cryptfs ( &nbsp;196): post_fs_data done</span><br> <span style="font-family: Courier New, Courier, monospace;">D/Cryptfs ( &nbsp;196): Just triggered restart_min_framework</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Using scrypt for cryptfs KDF</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Enabling support for allow_discards in dmcrypt.</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): load_crypto_mapping_table: target_type = crypt</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): load_crypto_mapping_table: real_blk_name = /dev/block/platform/msm_sdcc.1/by-name/userdata, extra_params = 1 allow_discards</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Encrypting ext4 filesystem in place...</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Encrypting group 0</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Encrypting from sector 0</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Encrypting group 1</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Encrypted to sector 1356288</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Encrypting from sector 16777216</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Encrypted to sector 16867328</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Encrypting from sector 16874496</span><br> <span style="font-family: Courier New, Courier, monospace;">I/Cryptfs ( &nbsp;196): Encrypted to sector 17014784</span><br> <br> The phone will now reboot and ask for the PIN you entered. Unfortunately this takes *ages*! But if everything is fine, you can now setup your phone to your heart's content and set up a real password to have a securely encrypted phone. We'll have to see how stable this encrypted phone will be in daily use.<br> <br> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/eu5V-UB1tz1dQieTGiFbudMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="144" src="https://lh3.googleusercontent.com/-nVr2JeknpAs/VcYcr3QbmVI/AAAAAAAAFOU/d9k9i6sCQqg/s144-Ic42/IMG_20150808_170842.jpg" width="108"></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br> <div> <span style="background-color: yellow;"><b>Update:</b></span> I made a mistake and chopped off the "5" at the end, so my filesystem only occupies 1/10 of the available space and has a completely unusable size of 500 MB :-(. So, to not have to start all over again, I'll try to resize the file system in place.<br> <br> <div> Login to your android device, and check the filesystem size. Indeed /data is completely ridiculous at 500MB.</div> <div> <br></div> <div> <div> <span style="font-family: Courier New, Courier, monospace;">➜ &nbsp;e2fs &nbsp;adb shell</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">shell@serranoltexx:/ $ su</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">root@serranoltexx:/ # df</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">Filesystem &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Size &nbsp; &nbsp; Used &nbsp; &nbsp; Free &nbsp; Blksize</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">(...)</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">/data &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;553.0M &nbsp; 490.2M &nbsp; &nbsp;62.8M &nbsp; 40</span>96</div> <div> <br></div> </div> <div> Check the sizes of the underlaying block device, and the dmcrypt mapper:</div> <div> <br></div> <div> <span style="font-family: Courier New, Courier, monospace;">root@serranoltexx:/ # cat /proc/partitions</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">major minor &nbsp;#blocks &nbsp;name</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">(...)</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp;179 &nbsp; &nbsp; &nbsp; 24 &nbsp; &nbsp;5685231 mmcblk0p24</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">(...)</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp;254 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp;5685215 dm-0</span></div> <div> <br></div> <div> Indeed, the crypted partition is exactly 16kB smaller (the crypt footer) than the raw block device. So we can hopefully let resize2fs autodiscover the target size. Unfortunately, we cannot access the block device hosting /data, and we can't umount /data because the android framework is still running. So we use the same method as the volume daemon to shutdown most of android. (your device will not no longer react to user input on the buttons or touch secreen):</div> <div> <br></div> <div> <div> <span style="font-family: Courier New, Courier, monospace;">root@serranoltexx:/ # setprop vold.decrypt trigger_shutdown_framework</span></div> </div> <div> <span style="font-family: Courier New, Courier, monospace;">root@serranoltexx:/ # umount /data</span></div> </div> <div> <div> <span style="font-family: Courier New, Courier, monospace;">root@serranoltexx:/ # e2fsck -f /dev/block/dm-0 &nbsp; &nbsp; &nbsp;&nbsp;</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">e2fsck 1.42.9 (28-Dec-2013)</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">Pass 1: Checking inodes, blocks, and sizes</span></div> </div> <div> <span style="font-family: inherit;">(...)</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">(fix problems as they appear here)</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">root@serranoltexx:/ # resize2fs /dev/block/dm-0</span></div> <div> <div> <span style="font-family: Courier New, Courier, monospace;">resize2fs 1.42.9 (28-Dec-2013)</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">Resizing the filesystem on /dev/block/dm-0 to 1421303 (4k) blocks.</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">The filesystem on /dev/block/dm-0 is now 1421303 blocks long.</span></div> </div> <div> <br></div> <div> I rebooted the phone the hard way via <span style="font-family: Courier New, Courier, monospace;">sync; echo b &gt;/proc/sysrq-trigger</span>.</div> <div> <br> Now /data is at the expected size of 5.5 GB.<br> <br></div> <div> <span style="font-family: Courier New, Courier, monospace;">➜ &nbsp;~ &nbsp;adb shell df</span><br> <span style="font-family: Courier New, Courier, monospace;">Filesystem &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Size &nbsp; &nbsp; Used &nbsp; &nbsp; Free &nbsp; Blksize</span><br> <span style="font-family: Courier New, Courier, monospace;">(...)</span><br> <span style="font-family: Courier New, Courier, monospace;">/data &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5.4G &nbsp; 734.3M &nbsp; &nbsp; 4.7G &nbsp; 4096</span></div> <div> <br></div><div>Of course, now that we have found out how to resize an ext4 filesystem in place from within android, we realize that we could have made it that way from the beginning 😉. Without data loss. Just run the last 4 commands but using the physical emmc device and append the right number of blocks we need to resize2fs while the device is still unencrypted...</div><div><br></div><div>e2fsck /dev/block/mmcblk0p24</div><div>resize2fs /dev/block/mmcblk0p24 14221303</div><div><br></div><div>That should do the trick. Reboot and run the normal encryption process.</div><div><br></div> </div>http://vogelchr.blogspot.com/2015/08/full-disk-encryption-with-cyanogenmod.htmlnoreply@blogger.com (Christian Vogel)2tag:blogger.com,1999:blog-7098474.post-1094955262104083476Tue, 07 Jul 2015 06:31:00 +00002015-07-07T06:31:24.092+00:00Public Service Announcement: Putty A recent upgrade of sshd apparently broke my saved putty connections, which have a deprecated key-exchange protocol on the top of the "Algorithm selection policy."<br /> <br /> It manifests itself as a long pause, showing a black putty terminal window, followed by the message: <b>PuTTY Fatal Error: Server unexpectedly closed network connection</b>.<br /> <div> <br /></div> <br /> The putty event window will show it being stuck in the "<span style="font-family: Courier New, Courier, monospace;">Doing Diffie-Hellman group exchange</span>" phase.<br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/fqGO574gfupWfU2jdw2bsdMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="71" src="http://lh3.googleusercontent.com/-4KAiSUny9FM/VZtwdVg0S1I/AAAAAAAAFEU/dnzvXNzi3o8/s144/dh-group-exchange-putty-log.png" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> If you run your sshd in debug mode, you'll see that sshd isn't happy with the selection of the key exchange protocol.<br /> <br /> <span style="font-family: Courier New, Courier, monospace;">➜ &nbsp;~ &nbsp;sudo /usr/sbin/sshd -p 2222 -d</span><br /> <span style="font-family: Courier New, Courier, monospace;">debug1: sshd version OpenSSH_6.9, OpenSSL 1.0.2c 12 Jun 2015</span><br /> <div> (...)</div> <div> <div> <span style="font-family: Courier New, Courier, monospace;">debug1: kex: server-&gt;client aes256-ctr hmac-sha2-256 none [preauth]</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">debug1: expecting SSH2_MSG_KEX_DH_GEX_REQUEST [preauth]</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">Hm, kex protocol error: type 30 seq 1 [preauth]</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">Connection closed by 10.120.102.56 [preauth]</span></div> </div> <div> (...)</div> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/NTNWrw0HXc-NamRevGdCR9MTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="60" src="http://lh3.googleusercontent.com/-LvQePf8OIu8/VZtwcPG-dwI/AAAAAAAAFEU/-srAst3BceI/s144/dh-group-exchange-sshd-debug.png" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> It seems that OpenSSH recently had removed an ancient method of key exchange, as is to be read on <a href="https://www.mail-archive.com/misc@openbsd.org/msg137973.html">this thread on the misc@OpenBSD mailing list</a>.<br /> <br /> If you open putty 's session configuration and move the "Diffie-Hellmann group exchange" right to the bottom of the "Algorithm selection policy" (Configuration / Connection / SSH / Kex), everything works again.<br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/3MBnoTPYnaa-uY6YlyiK-9MTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="138" src="http://lh3.googleusercontent.com/-VNkLsqosj9Y/VZtwZctuDQI/AAAAAAAAFEU/mA72h_bTJd4/s144/dh-group-exchange.png" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> <br /> <br />http://vogelchr.blogspot.com/2015/07/public-service-announcement-putty.htmlnoreply@blogger.com (Christian Vogel)3tag:blogger.com,1999:blog-7098474.post-5833253584160533231Sun, 29 Mar 2015 17:00:00 +00002015-03-29T17:00:29.127+00:00SDM220 Power Meter, MODBUS, Python, RS485The <a href="http://www.eastron.com.cn/">Eastron</a> <a href="http://www.eastron.com.cn/product/60079689090-218697749/SDM220_Standard_MID_Single_Phase_DIN_Rail_Energy_Meter_2P_kWh_meter_DIN_Rail_Modbus_Energy_Meters_MID_Pending.html">SDM220</a> is a very inexpensive one-phase power/energy meter, which can be readout via RS485. I got myself one to play with, and there are a few observations I wanted to write down.<br /> <br /> <table style="width: auto;"> <tr><td><a href="https://picasaweb.google.com/lh/photo/y5aZEEZrBN3nCerUDsEqhtMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="98" src="https://lh4.googleusercontent.com/-whbz35juvr4/VRgr9XsWVAI/AAAAAAAAE1A/uZPTL7CYXcU/s144/eastron_sdm220_labels.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </table> <br /> <br /> <table style="width: auto;"> <tr><td><a href="https://picasaweb.google.com/lh/photo/iSGLwDRg3aVDDvzC_OdL1NMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="144" src="https://lh4.googleusercontent.com/-B5nVBoK7M-o/VRgr9eL65GI/AAAAAAAAE1A/zPxlsJnaffY/s144/eastron_sdm220_device.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </table> <br /> <br /> <table style="width: auto;"> <tr><td><a href="https://picasaweb.google.com/lh/photo/GUNs_4c5XBgBdhlp4Uam2NMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="144" src="https://lh5.googleusercontent.com/-FAgkU4C4l-8/VRgr9cpLwiI/AAAAAAAAE1A/GiDMyxerC5A/s144/eastron_sdm220_connected.jpg" width="108" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </table> <br /> <br /> It's actually a pretty nifty meter, measuring power and energy in both directions, voltage and line frequency. Furthermore it outputs power-factor (cosϕ) and reactive or apparent power (which is basically the same thing, just represented differently).<br /> <br /> One thing that cost me some time to resolve, especially as I used a selfmade RS485 adapter in the first place about the correctnes of which I was unsure are: The RS485 terminals are wired incorrectly, B and A are swapped, this has been verified with an industrial/commercial interface. Connectors 7, 8 and 9 are GND, A and B. In that order. If the link is idle, B will be positive with respect to A.<br /> <br /> There's an existing <a href="https://github.com/bashwork/pymodbus">modbus library for Python (pymodbus)</a> which works perfect, so far. The serial modbus link is instantiated like this (if the modbus runs with parity = None).<br /> <br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; cl = pymodbus.client.sync.ModbusSerialClient('rtu',</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; port='/dev/ttyUSB1', baudrate=9600,</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; parity='N',stopbits=2,</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; timeout=0.125)</span><br /> <div> <br /></div> The values stored in the device are actually IEEE754 floating point values, which can be converted to python floats very conveniently, they are fetched as two consecutive 16bit register, concatenated to a 32bit field, and then reinterpreted as the 32bit float:<br /> <br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; resp = client.read_input_registers(basereg,2, unit=1)</span><br /> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; return struct.unpack('&gt;f',struct.pack('&gt;HH',*resp.registers))</span></div> <div> <br /></div> The documentation for the SDM220 is actually quite comprehensive, but it took me quite a while until I really figured out what they meant... So here are the register numbers I sucessfully used to get date off the device:<br /> <br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; # Symbol &nbsp; &nbsp;Reg# &nbsp;Format</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; ( 'V', &nbsp; &nbsp; &nbsp;0x00, '%6.2f' ), # Voltage [V]</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; ( 'Curr', &nbsp; 0x06, '%6.2f' ), # Current [A]</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; ( 'P[act]', 0x0c, '%6.0f' ), # Active Power ("Wirkleistung") [W]</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; ( 'P[app]', 0x12, '%6.0f' ), # Apparent Power ("Scheinl.") [W]</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; ( 'P[rea]', 0x18, '%6.0f' ), # Reactive Power ("Blindl.") [W]</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; ( 'PF', &nbsp; &nbsp; 0x1e, '%6.3f' ), # Power Factor &nbsp; [1]</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; ( 'Phi', &nbsp; &nbsp;0x24, '%6.1f' ), # cos(Phi)? &nbsp; &nbsp; &nbsp;[1]</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; &nbsp; &nbsp; ( 'Freq', &nbsp; 0x46, '%6.2f' ) &nbsp;# Line Frequency [Hz]</span><br /> <div> <br /></div> <br />http://vogelchr.blogspot.com/2015/03/sdm220-power-meter-modbus-python-rs485.htmlnoreply@blogger.com (Christian Vogel)3tag:blogger.com,1999:blog-7098474.post-3041179815075442680Tue, 02 Dec 2014 20:04:00 +00002014-12-02T20:42:08.460+00:00esp8266 firmware upgrade, odd baudrate in bootloader?So, I also got one of those ESP8266 wifi/serial modules, which are pretty neat. Unfortunately mine seemed to come with an ancient firmware on it, and pretty unconveniently those didn't want to be re-flashed with newer software.<br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/gbnjW4dKN7BIm8MBJgMcJtMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="108" src="https://lh5.googleusercontent.com/-0ypyIggUeFA/VH4iYMieKyI/AAAAAAAAEog/JatbbbfihkI/s144/IC800011.JPG" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> The bootloader seems to initialize the modules' serial port to the pretty insane value of 76923 bps, so that in "programming" mode, the stupid windows-utility (or, for that matter, any program expecting standard-baudrates) will fail to communicate with the module.<br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/3nhiZ1mOsnPQyIPOpxluNtMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="72" src="https://lh4.googleusercontent.com/-UYGey2JClto/VH4WFRts6LI/AAAAAAAAEoE/3IJ1RKvBv3I/s144/scrn-logic.png" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> If you have a suitable serial cable (a FTDIchip FT2232 is what I used), you can calculate "custom dividers" for most uncommon baudrates, and use those instead of 38,4kBps (the "magic" baudrate indicating that the custom one should be used).<br /> <br /> Base-frequency for the ft2232 is 60 Mhz, so we'll use a custom divisor of 780 (60Mhz/76923).<br /> <br /> <span style="font-family: Courier New, Courier, monospace;">$ <a href="http://linux.die.net/man/8/setserial">setserial</a> /dev/ttyUSB0 spd_cust divisor 780 &nbsp; &nbsp;&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace;">$ cu -l ttyUSB0 -s 38400</span><br /> <span style="font-family: Courier New, Courier, monospace;">Connected.</span><br /> <span style="font-family: Courier New, Courier, monospace;"><br /> </span> <span style="font-family: Courier New, Courier, monospace;">&nbsp;ets Jan &nbsp;8 2013,rst cause:1, boot mode:(7,7)</span><br /> <span style="font-family: Courier New, Courier, monospace;"><br /> </span> <span style="font-family: Courier New, Courier, monospace;">waiting for host</span><br /> <span style="font-family: Courier New, Courier, monospace;"><br /> </span> <span style="font-family: Courier New, Courier, monospace;">&nbsp;ets Jan &nbsp;8 2013,rst cause:1, boot mode:(7,7)</span><br /> <span style="font-family: Courier New, Courier, monospace;"><br /> </span> <span style="font-family: Courier New, Courier, monospace;">waiting for host</span><br /> <span style="font-family: Courier New, Courier, monospace;"><br /> </span> <span style="font-family: Courier New, Courier, monospace;">&nbsp;ets Jan &nbsp;8 2013,rst cause:1, boot mode:(3,7)</span><br /> <span style="font-family: Courier New, Courier, monospace;"><br /> </span> <span style="font-family: Courier New, Courier, monospace;">load 0x40100000, len 24444, room 16&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace;">tail 12</span><br /> <span style="font-family: Courier New, Courier, monospace;">chksum 0xe0</span><br /> <span style="font-family: Courier New, Courier, monospace;">ho 0 tail 12 room 4</span><br /> <span style="font-family: Courier New, Courier, monospace;">load 0x3ffe8000, len 3168, room 12&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace;">tail 4</span><br /> <span style="font-family: Courier New, Courier, monospace;">chksum 0x93</span><br /> <span style="font-family: Courier New, Courier, monospace;">load 0x3ffe8c60, len 4956, room 4&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace;">tail 8</span><br /> <span style="font-family: Courier New, Courier, monospace;">chksum 0xbd</span><br /> <span style="font-family: Courier New, Courier, monospace;">csum 0xbd</span><br /> <div> <br /></div> <div> Interestingly, that seems to be only the bootloader of the module, after this, the device switches to the more common 115200kbps and responds to AT-commands, given that GPIO15=GND, GPIO2=Vcc, GPIO0=Vcc and CH_PD=Vcc. (pullups to Vcc via ~5kΩ resistor)</div> <div> <br /></div> <div> So, to get the windows-only updater to run successfully, we...</div> <div> <ul> <li><b>connect GPIOs and CH_PD as listed above</b> (AT-Mode)</li> <li><b>power up module</b></li> <li><i>module will start bootloader with 77kbps, then change into AT-command mode, at 115200 bps</i></li> <li><b>connect GPIO0 to GND</b>&nbsp;(firmware download mode)</li> <li><b>pulse CH_PD to LOW</b> to restart module</li> <li>firmware will restart, but bootloader does NOT go back to 77kbps</li> <li><b>run firmware-upgrade in windows</b></li> </ul> </div> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/E2RDN-5Le7_gAON73HHZxdMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="79" src="https://lh5.googleusercontent.com/-zTg28BXII9E/VH4WV2a7cpI/AAAAAAAAEoA/n8uj6zrflSE/s144/esp8266_flasher.png" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> Now I'm upgraded to version 170901 (whatever that means).<br /> <br /> <span style="font-family: Courier New, Courier, monospace;">AT+GMR</span><br /> <span style="font-family: Courier New, Courier, monospace;">00170901</span><br /> <div> <br /></div> <div> <br /></div> http://vogelchr.blogspot.com/2014/12/esp8266-firmware-upgrade-odd-baudrate.htmlnoreply@blogger.com (Christian Vogel)1tag:blogger.com,1999:blog-7098474.post-4559159895264512941Tue, 26 Aug 2014 19:56:00 +00002014-08-26T19:56:41.735+00:00Building pyqwt 5.2.0 by manually installing the pyqtconfig.py module.For playing with&nbsp;<a href="http://gnuradio/" target="_blank">GNU radio</a>&nbsp;I had to install quite a lot of dependencies to get all the modules to build, unfortunately there's currently a build issue with <a href="http://pyqwt.sourceforge.net/">PyQwt</a>, which are the Python bindings for <a href="http://qwt.sourceforge.net/" target="_blank">Qwt, the Qt Widgets for Technical Applications</a>.<br /> <br /> Installation of&nbsp;<a href="http://pyqwt.sourceforge.net/">PyQwt-5.2.0</a> fails with an error message of...<br /> <blockquote class="tr_bq"> Requires at least <a href="http://www.riverbankcomputing.co.uk/software/pyqt/intro">PyQt-4.2</a> and its development tools.<br />==&gt; ERROR: A failure occurred in build().<br />&nbsp; &nbsp; Aborting...</blockquote> <div> ...and this is because of the configuration script of PyQwt that tries to import PyQT's pqtconfig.py, that no longer is installed by PyQt 4.11.1!</div> <div> <br /></div> <div> There are a few bugreports to be found on the web, e.g.</div> <div> <ul> <li><a href="https://github.com/Homebrew/homebrew/issues/21984">https://github.com/Homebrew/homebrew/issues/21984</a></li> <li><a href="http://sourceforge.net/p/pyqwt/bugs/12/">http://sourceforge.net/p/pyqwt/bugs/12/</a></li> </ul> </div> <br /> To fix this, get yourself the <a href="http://www.riverbankcomputing.co.uk/software/pyqt/download">pyqt-x11 source</a>, then run the configure script as appropriate for your particular Linux installation...<br /> <blockquote class="tr_bq"> [optiplex …/chris/AUR/python2-pyqt4/src/Py2Qt-x11-gpl-4.11.1]<br />$&nbsp;<b>python2 configure.py -v /usr/share/sip --qsci-api -q /usr/bin/qmake-qt4&nbsp;</b>Determining the layout of your Qt installation...<br />This is the GPL version of PyQt 4.11.1 (licensed under the GNU General Public<br />License) for Python 2.7.8 on linux2.<br />Type '2' to view the GPL v2 license.<br />Type '3' to view the GPL v3 license.<br />Type 'yes' to accept the terms of the license.<br />Type 'no' to decline the terms of the license.<br />Do you accept the terms of the license? yes<br />Found the license file pyqt-gpl.sip.<br />Checking to see if the QtGui module should be built...<br />Checking to see if the QtHelp module should be built...<br />Checking to see if the QtMultimedia module should be built...<br />Checking to see if the QtNetwork module should be built...</blockquote> <br /> (...)<br /> <div> <blockquote class="tr_bq"> Creating pyrcc4 Makefile...<br />Creating Qt Designer plugin Makefile...<br />Creating pyqtconfig.py...</blockquote> At this point, the proper pyqtconfig.py script has been created, install to the python site-package directory.<br /> <blockquote class="tr_bq"> [optiplex …/chris/AUR/python2-pyqt4/src/Py2Qt-x11-gpl-4.11.1]<br />$ <b>sudo install -m644 pyqtconfig.py /usr/lib/python2.7/site-packages/PyQt4/pyqtconfig.py</b>&nbsp;</blockquote> </div> <div> Now, the pyqwt bindings can be built, e.g. by using <a href="https://www.archlinux.org/">ArchLinux's</a>&nbsp;<a href="https://wiki.archlinux.org/index.php/makepkg">makepkg</a> utility, using the <a href="https://aur.archlinux.org/packages/pyqwt/">AUR package</a>.</div> <div> <blockquote class="tr_bq"> [optiplex /home/chris/AUR/pyqwt]<br />$ makepkg<br />==&gt; Making package: pyqwt 5.2.0-10 (Tue Aug 26 21:37:07 CEST 2014)<br />==&gt; Checking runtime dependencies...<br />==&gt; Checking buildtime dependencies...</blockquote> </div> <div> (...)</div> <div> <blockquote class="tr_bq"> ==&gt; Starting build()...<br />patching file qt4lib/PyQt4/Qwt5/qplt.py<br />patching file configure/configure.py<br />patching file configure/configure.py<br />Command line options:<br />{'debug': False,<br />&nbsp;'disable_numarray': False,</blockquote> </div> <div> (...)</div> <div> <blockquote class="tr_bq"> cp -f ../../qt4lib/PyQt4/uic/widget-plugins/qwt.py /home/chris/AUR/pyqwt/pkg/pyqwt/usr/lib/python2.7/site-packages/PyQt4/uic/widget-plugins/qwt.py<br />make[1]: Leaving directory '/home/chris/AUR/pyqwt/src/PyQwt-5.2.0/configure/qwt5qt4'<br />==&gt; Tidying install...<br />&nbsp; -&gt; Purging unwanted files...<br />&nbsp; -&gt; Removing libtool files...<br />&nbsp; -&gt; Removing static library files...<br />&nbsp; -&gt; Compressing man and info pages...<br />&nbsp; -&gt; Stripping unneeded symbols from binaries and libraries...<br />==&gt; Creating package "pyqwt"...<br />&nbsp; -&gt; Generating .PKGINFO file...<br />&nbsp; -&gt; Generating .MTREE file...<br />&nbsp; -&gt; Compressing package...<br />==&gt; Leaving fakeroot environment.<br />==&gt; Finished making: pyqwt 5.2.0-10 (Tue Aug 26 21:40:25 CEST 2014)</blockquote> </div> <div> <br /></div> <div class="separator" style="clear: both; text-align: center;"> <a href="http://4.bp.blogspot.com/-ut9EP3nQt7s/U_zlYTtCJ4I/AAAAAAAAEdM/7SG6KOQTS8o/s1600/Screenshot%2B-%2B08262014%2B-%2B09%3A50%3A45%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-ut9EP3nQt7s/U_zlYTtCJ4I/AAAAAAAAEdM/7SG6KOQTS8o/s1600/Screenshot%2B-%2B08262014%2B-%2B09%3A50%3A45%2BPM.png" height="316" width="320" /></a></div> <div> <br /></div> <div class="separator" style="clear: both; text-align: center;"> <a href="http://1.bp.blogspot.com/-TsItyBRfTTY/U_zmA3XBwhI/AAAAAAAAEdU/KNz-izpE5P4/s1600/Screenshot%2B-%2B08262014%2B-%2B09%3A54%3A05%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-TsItyBRfTTY/U_zmA3XBwhI/AAAAAAAAEdU/KNz-izpE5P4/s1600/Screenshot%2B-%2B08262014%2B-%2B09%3A54%3A05%2BPM.png" height="198" width="320" /></a></div> <div> <br /></div> <div> <br /></div> <div> <br /></div> http://vogelchr.blogspot.com/2014/08/building-pyqwt-520-by-manually.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-6997605901578149914Tue, 12 Aug 2014 13:26:00 +00002014-08-13T09:58:04.372+00:00Controlling USB device access on Linux (e.g. BADusb defense)So, there was a lot of fuzz about a recent talk by <a href="https://srlabs.de/blog/wp-content/uploads/2014/07/SRLabs-BadUSB-BlackHat-v1.pdf" target="_blank">Karsten Nohl et al. at BlackHat</a> about the the unsecurity of current USB implementations (on the computer side) which happily load drivers for all kinds of devices as soon as a (potentially malicious) USB stick is connected.<br /> <br /> I <i>completely agree</i> that, as shipped, most computer systems will be susceptible to this attack, and assume that all of their attacks will work as advertised. What I <i>don't agree with at all</i> is their conclusion, which boils down that no effective defenses exist.<br /> <br /> While I haven't made my homework to develop a defense, I want to at least show the mechanism in current Linux kernels to limit binding of potentially dangerous <i>drivers</i>&nbsp;to specific devices, so that e.g. a inserted USB-stick would only be mounted as a block device, and its malicious keyboard interface be ignored.<br /> <br /> <u><span style="font-size: large;">Binding of Drivers</span></u><br /> <br /> A linux-module can claim ownership of certain usb vendor/device ids or device classes. Those are visible when looking at the <i>modinfo</i> of a kernel module, to facilitate autoloading of modules, but are also registered in internal kernel structures, so that drivers compiled in statically directly can be mated with the proper devices:<br /> <br /> <blockquote class="tr_bq"> $ modinfo snd-usb-audio<br /> filename: &nbsp; &nbsp; &nbsp; /lib/modules/3.15.8-1-ARCH/kernel/sound/usb/snd-usb-audio.ko.gz<br /> license: &nbsp; &nbsp; &nbsp; &nbsp;GPL<br /> description: &nbsp; &nbsp;USB Audio<br /> author: &nbsp; &nbsp; &nbsp; &nbsp; Takashi Iwai <tiwai suse.de=""><br />alias: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<b>usb:v*p*d*dc*dsc*dp*ic01isc01ip*in*</b><br />alias: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;usb:v0D8Cp0103d*dc*dsc*dp*ic*isc*ip*in*<br />alias: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;usb:v*p*d*dc*dsc*dp*ic01isc03ip*in*<br />alias: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;usb:v200Cp100Bd*dc*dsc*dp*ic*isc*ip*in*<br /><i>(...)</i></tiwai></blockquote> <div> This information currently comes from the MODULE_DEVICE_TABLE of sound/usb/card.c, stored in an array called <a href="http://lxr.free-electrons.com/ident?i=usb_audio_ids" target="_blank">usb_audio_ids</a>. The bold one is the "default class", the others all are included in the "quirks table", which includes all exceptions from the default class.</div> <div> <blockquote class="tr_bq"> static struct usb_device_id usb_audio_ids [] = {<br /> #include "quirks-table.h"<br /> &nbsp; &nbsp; &nbsp;{ .match_flags = (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS),<br /> &nbsp; &nbsp; &nbsp; &nbsp;.bInterfaceClass = <b>USB_CLASS_AUDIO</b>,<br /> &nbsp; &nbsp; &nbsp; &nbsp;.bInterfaceSubClass = <b>USB_SUBCLASS_AUDIOCONTROL</b> },<br /> &nbsp; &nbsp; &nbsp;{ } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* Terminating entry */<br /> &nbsp;};<br /> MODULE_DEVICE_TABLE(usb, usb_audio_ids);</blockquote> </div> <div> On connection of a USB device, the kernel will look through all its currently registered modules that claim to support USB devices (by registering those tables with the kernel) and bind devices to drivers (and if it doesn't succeed, it will call udev/hotplug to load a module that does).&nbsp;</div> <div> <br /></div> <div> <span style="font-size: large;"><u>The Vulnerability</u></span></div> <div> <br /></div> <div> So, if you connect a particular USB headset, the electronics of which I have laying around... you get a new sound device in ALSA...</div> <div> <blockquote class="tr_bq"> [root@optiplex devices]# aplay -l</blockquote> </div> <div> <blockquote class="tr_bq"> **** List of PLAYBACK Hardware Devices ****<br /> (...)<br /> card 1: Headset [Logitech USB Headset], device 0: USB Audio [USB Audio]<br /> &nbsp; Subdevices: 1/1<br /> &nbsp; Subdevice #0: subdevice #0</blockquote> </div> <div> <b>But also a new keyboard!</b> (the mute/volume buttons on the headset, but those could be arbitrary buttons entering text, too).</div> <div> <div> <blockquote class="tr_bq"> [root@optiplex devices]# xinput<br /> ⎡ Virtual core pointer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;"> </span>id=2<span class="Apple-tab-span" style="white-space: pre;"> </span>[master pointer &nbsp;(3)]<br /> ⎜ &nbsp; ↳ Virtual core XTEST pointer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;"> </span>id=4<span class="Apple-tab-span" style="white-space: pre;"> </span>[slave &nbsp;pointer &nbsp;(2)]<br /> ⎜ &nbsp; ↳ Logitech USB-PS/2 Optical Mouse &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space: pre;"> </span>id=8<span class="Apple-tab-span" style="white-space: pre;"> </span>[slave &nbsp;pointer &nbsp;(2)]<br /> ⎣ Virtual core keyboard &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space: pre;"> </span>id=3<span class="Apple-tab-span" style="white-space: pre;"> </span>[master keyboard (2)]<br /> &nbsp; &nbsp; ↳ Virtual core XTEST keyboard &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space: pre;"> </span>id=5<span class="Apple-tab-span" style="white-space: pre;"> </span>[slave &nbsp;keyboard (3)]<br /> &nbsp; &nbsp; ↳ Power Button &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;"> </span>id=6<span class="Apple-tab-span" style="white-space: pre;"> </span>[slave &nbsp;keyboard (3)]<br /> &nbsp; &nbsp; ↳ Power Button &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;"> </span>id=7<span class="Apple-tab-span" style="white-space: pre;"> </span>[slave &nbsp;keyboard (3)]<br /> &nbsp; &nbsp; ↳ Das Keyboard &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;"> </span>id=9<span class="Apple-tab-span" style="white-space: pre;"> </span>[slave &nbsp;keyboard (3)]<br /> &nbsp; &nbsp; ↳ <b>Logitech Logitech USB Headset &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space: pre;"> </span>id=10<span class="Apple-tab-span" style="white-space: pre;"> </span>[slave &nbsp;keyboard (3)]</b></blockquote> </div> </div> <div> If you look in the sysfs filesystem, you can see, that the USB headset (usb device <b>5-1</b>) has 4 distinct functions (<b>.0</b> -- <b>.3</b>) on configuration <b>:1</b>.<br /> <blockquote class="tr_bq"> [root@optiplex /sys/bus/usb/devices/5-1]# ls<br /> <b>5-1:1.0</b><span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp; bcdDevice<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp;maxchild<br /> <b>5-1:1.1</b><span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp; bmAttributes &nbsp; port<br /> <b>5-1:1.2</b><span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp; busnum<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp;power<br /> <b>5-1:1.3</b><span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp; configuration &nbsp;product<br /> authorized<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp; descriptors &nbsp; &nbsp;quirks<br /> avoid_reset_quirk &nbsp; &nbsp;dev<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp;removable<br /> bConfigurationValue &nbsp;devnum<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp;remove<br /> bDeviceClass<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp; devpath<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp;speed<br /> bDeviceProtocol &nbsp; &nbsp; &nbsp;driver<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp;subsystem<br /> bDeviceSubClass &nbsp; &nbsp; &nbsp;ep_00<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp;uevent<br /> bMaxPacketSize0 &nbsp; &nbsp; &nbsp;idProduct<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp;urbnum<br /> bMaxPower<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp; idVendor<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp;version<br /> bNumConfigurations &nbsp; ltm_capable<br /> bNumInterfaces<span class="Apple-tab-span" style="white-space: pre;"> </span> &nbsp; &nbsp; manufacturer</blockquote> <div> And those are described by the (very lengthy) lsusb -v output, which I'll not reproduce completely here, just try it for yourself on any USB device.<br /> <br /> <div> Bus 005 Device 006: ID 046d:0a0b Logitech, Inc. ClearChat Pro USB</div> <div> Device Descriptor:</div> <div> &nbsp;(...)</div> <div> &nbsp; bNumConfigurations &nbsp; &nbsp; &nbsp;1</div> <div> <b>&nbsp; Configuration Descriptor: (configuration #1 starts here)</b></div> <div> &nbsp; &nbsp; bLength &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 9</div> <div> (...)</div> <div> <b>&nbsp; &nbsp; Interface Descriptor: (interface 1:0)</b></div> <div> (...)</div> <div> <div> &nbsp; &nbsp; &nbsp; &nbsp;bDescriptorType &nbsp; &nbsp; &nbsp; &nbsp; 4</div> <div> &nbsp; &nbsp; &nbsp; &nbsp;bInterfaceNumber &nbsp; &nbsp; &nbsp; &nbsp;<b>0</b></div> </div> <div> (...)</div> <div> <b></b><br /> <div> <b>&nbsp; &nbsp; bInterfaceClass &nbsp; &nbsp; &nbsp; &nbsp; 1 Audio</b></div> <b> <div> &nbsp; &nbsp; &nbsp; bInterfaceSubClass &nbsp; &nbsp; &nbsp;1 Control Device</div> </b></div> <div> (...)</div> <div> <b>&nbsp; &nbsp; &nbsp; AudioControl Interface Descriptor: (detailed info about audio capabilities)</b></div> <div> &nbsp; &nbsp; &nbsp; &nbsp; bLength &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10</div> </div> <div> (...)</div> <div> <div> <b>&nbsp; &nbsp; Interface Descriptor: (interface 1:3)</b></div> <div> <b>&nbsp; &nbsp; &nbsp; bInterfaceNumber &nbsp; &nbsp; &nbsp; &nbsp;3</b></div> <div> (...)</div> <div> <b>&nbsp; &nbsp; &nbsp; bInterfaceClass &nbsp; &nbsp; &nbsp; &nbsp; 3 Human Interface Device</b></div> <div> &nbsp; &nbsp; &nbsp; bInterfaceSubClass &nbsp; &nbsp; &nbsp;0 No Subclass</div> <div> &nbsp; &nbsp; &nbsp; bInterfaceProtocol &nbsp; &nbsp; &nbsp;0 None</div> <div> &nbsp; &nbsp; &nbsp; iInterface &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0&nbsp;</div> </div> <div> <br /></div> <div> So, here you have it, one device that (legitimately) is both a soundcard and a keyboard/mouse (e.g. an human interface device). Given enough motiuvation, code could be written for the controller inside the soundcard that enters arbitary text to my computer. And that's basically the vulnerability presented in the Black Hat Presentation by Nohl et al.</div> </div> <div> <br /> <u><span style="font-size: large;">Defense</span></u><br /> <br /></div> <div> But, you can easily turn off this automatic binding, at least on Linux, with one single command:</div> <div> <blockquote class="tr_bq"> [root@optiplex ~]# echo 0 &gt;/sys/bus/usb/drivers_autoprobe&nbsp;</blockquote> </div> <div> Now, whenever you connect a USB device to your computer, it will not automatically connect the usb-soundcard to the ALSA subsystem and the volume buttons to the hidraw/keyboard driver. If I now connect the aforementioned soundcard, I'll not get a new keyboard in xinput, nor a soundcard in ALSA (and also not a network- or block-device for a network card or USB disk).<br /> <br /> The only thing I'll get in my dmesg is the message, that an USB device has been connected:<br /> <blockquote class="tr_bq"> [13399.092113] usb 5-1: USB disconnect, device number 6<br /> [13405.245389] usb 5-1: new full-speed USB device number 7 using uhci_hcd</blockquote> <div> And to manually bind this device, you first have to choose the appropriate USB configuration...</div> <div> <blockquote class="tr_bq"> # echo 1 &gt;/sys/bus/usb/devices/5-1/bConfigurationValue&nbsp;</blockquote> </div> <div> ...and tell the usb audio driver to bind to that device.</div> <div> <blockquote class="tr_bq"> # echo 5-1:1.0 &gt;/sys/bus/usb/drivers/snd-usb-audio/bind</blockquote> </div> <div> Now you have the USB audio interface, but not the keyboard, yet... If you wanted, you'd just bind usb-hid to interface 3.</div> <blockquote class="tr_bq"> # echo 5-1:1.3 &gt;/sys/bus/usb/drivers/usbhid/bind&nbsp;</blockquote> </div> <div> To verify that your keyboard presses aren't registed from the connected device before, and are registered after binding, you can run "xev" and press the volume buttons (note: those, in principle, could enter arbitrary text to your computer, depending on the programming of the controller in the device).</div> <div> <blockquote class="tr_bq"> KeyRelease event, serial 38, synthetic NO, window 0x3800001,<br /> &nbsp; &nbsp; root 0x1dc, subw 0x3800002, time 13880057, (41,58), root:(2384,618),<br /> &nbsp; &nbsp; state 0x10, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,<br /> &nbsp; &nbsp; XLookupString gives 0 bytes:<br /> &nbsp; &nbsp; XFilterEvent returns: False</blockquote> The most often quoted use-case if obviously connection of a usb-storage device, e.g. an external harddrive or flash-stick.<br /> <br /> <blockquote class="tr_bq"> [14567.888596] usb 6-1: new high-speed USB device number 4 using ehci-pci</blockquote> <blockquote class="tr_bq"> # echo 1 &gt;/sys/bus/usb/devices/6-1/bConfigurationValue<br /> # echo 6-1:1.0 &gt;/sys/bus/usb/drivers/usb-storage/bind</blockquote> <div> <blockquote class="tr_bq"> [14667.692717] usb-storage 6-1:1.0: USB Mass Storage device detected<br /> [14667.692936] scsi7 : usb-storage 6-1:1.0<br /> [14668.696482] scsi 7:0:0:0: Direct-Access &nbsp; &nbsp; TOSHIBA &nbsp;MK4309MAT &nbsp; &nbsp; &nbsp; &nbsp;G5.0 PQ: 0 ANSI: 0 CCS<br /> [14668.698461] sd 7:0:0:0: [sdd] 8452080 512-byte logical blocks: (4.32 GB/4.02 GiB)</blockquote> </div> <div> (yes, it's a very, very crappy and old USB harddisk)</div> <br /> <u><span style="font-size: large;">Proper user-interface, current lack thereof.</span></u><br /> <br /> To convert all this sysfs poking into a proper user-friendly software, one will have to...<br /> <br /> <ul> <li>On computer startup, disable &nbsp;autoprobe (probably there's a kernel command line for that).</li> <li>Statically configure the minimal interfaces used (e.g. the main usb keyboard, trackpad/mouse, ...).</li> <li>During normal operation, watch hotplug-events or poll the sysfs filesystem for newly inserted usb devices.</li> <li>Verify presented configurations of USB devices and their interfaces with a policy (e.g. enable only usb-storage devices, e.g. "thumbdrivers"</li> <li>Ask the user, if he's happy with this device.</li> <li>On successful verification, only bind the single necessary driver (e.g. usb-storage) to the proper interface of the device.</li> </ul> <br /> Of course, for certain devices more sophisticated verification schemes could be envisioned, checking certificates, downloading firmware for verification (which, again, might be forged, ...).<br /> <br /></div> <div> <u><span style="font-size: large;">The "Authorized" Mechanism</span></u></div> <div> <br /></div> <div> There's a second mechanism to disable/enable communication with USB device using the "authorized" property of USB controllers. It's described in the <a href="https://www.kernel.org/doc/Documentation/usb/authorization.txt" target="_blank">kernel documentation</a>.<br /> <br /> <u><span style="font-size: large;">Windows...</span></u><br /> <br /> There seems to be a <a href="http://technet.microsoft.com/de-de/library/cc731225(v=ws.10).aspx" target="_blank">group policy for that</a>...&nbsp;<strong style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;">Local Computer Policy</strong><span style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;">,&nbsp;</span><strong style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;">Computer Configuration</strong><span style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;">,</span><strong style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;">Administrative Templates</strong><span style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;">,&nbsp;</span><strong style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;">System</strong><span style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;">,&nbsp;</span><strong style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;">Device Installation</strong><span style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;">, and&nbsp;</span><strong style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;">Device Installation Restrictions</strong><br /> <br /></div> http://vogelchr.blogspot.com/2014/08/controlling-usb-device-access-on-linux.htmlnoreply@blogger.com (Christian Vogel)3tag:blogger.com,1999:blog-7098474.post-530602916199275276Mon, 24 Mar 2014 10:39:00 +00002014-03-24T10:39:03.007+00:00Stairville DJ-X 16, voided my warrantyThe <a href="http://www.thomann.de/de/stairville_djx_16_dmx_controller.htm" target="_blank">DJ-X 16</a> is a very basic DMX controller, which I used to test out DMX controlled (d'uh...) LED lights. I cannot recommend it, it lacks a lot of features, and the buttons/faders have a very flimsy feeling. Nevertheless: Because I was pondering if it was worthwhile to modify its firmware, I decided to void the warranty (yeah!) and here are few pictures documenting the insides of this device.<br /> <br /> What I found pretty interesting is the fact that, even though I bought it new only a few months ago, and it's still being manufactured exactly like that, it uses pretty antique components, and is an all-through-hole PCB, not a single SMD to be found.<br /> <br /> The main controller is a Atmel <a href="http://www.atmel.com/devices/at89c55wd.aspx" target="_blank">AT89C55WD</a>, a <a href="http://en.wikipedia.org/wiki/Intel_MCS-51" target="_blank">8051</a> compatible 8-bit microcontroller. It's meagre 256 bytes of internal RAM is extended by <a href="http://www.google.com/search?q=Goldstar+GM76C88" target="_blank">8k of High-Speed (120ns...)</a> SRAM. A 29EE010 EEPROM takes care of the 8051's lack of long-term memory. Everything else is 80s-style design, with a lot of 47hc's.<br /> <br /> There's a second, smaller, PCB which is home of the SN57176 RS485 driver/receiver, an optocoupler (MIDI out/through), connectors and a 7805 voltage regulator. The flat-ribbon cable connecting this connection-PCB to the main board is nicely labeled on the silkscreen, very convenient.<br /> <br /> <span style="font-family: 'Courier New', Courier, monospace;">K1 &nbsp; &nbsp;1 &nbsp; 2 &nbsp;COM</span><br /> <span style="font-family: Courier New, Courier, monospace;">K2 &nbsp; &nbsp;3 &nbsp; 4 &nbsp;Audio2</span><br /> <span style="font-family: Courier New, Courier, monospace;">K3 &nbsp; &nbsp;5 &nbsp; 6 &nbsp;Audio1</span><br /> <span style="font-family: Courier New, Courier, monospace;">k5 &nbsp; &nbsp;7 &nbsp; 8 &nbsp;MIDI in</span><br /> <span style="font-family: Courier New, Courier, monospace;">+5V &nbsp; 9 &nbsp;10 &nbsp;+5V</span><br /> <span style="font-family: Courier New, Courier, monospace;">NC &nbsp; &nbsp;11 12 &nbsp;MIDI through</span><br /> <span style="font-family: Courier New, Courier, monospace;">GND &nbsp; 13 14 &nbsp;GND</span><br /> <span style="font-family: Courier New, Courier, monospace;">+5V &nbsp; 15 16 &nbsp;+5V</span><br /> <span style="font-family: Courier New, Courier, monospace;">NC &nbsp; &nbsp;17 18 &nbsp;DMX out</span><br /> <span style="font-family: Courier New, Courier, monospace;">+12V &nbsp;19 20 &nbsp;+12V</span><br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/RjpZXhsw8yEoiLO7azB2BdMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="83" src="https://lh5.googleusercontent.com/-D9EnHbW9vqs/UzAE6mP6nwI/AAAAAAAAEEg/eL80wLScjaQ/s144/2014-03-24-stairville-dj-x-16-frontpanel.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/gRDnxs3831dTbwNGBkNYXNMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="62" src="https://lh3.googleusercontent.com/-VGiUNakT4dk/UzAE7oKYdgI/AAAAAAAAEEo/R0qfMtwcmOM/s144/2014-03-24-stairville-dj-x-16-pcb-component-side-with-labels.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/y6jX1OGvMCTqvDarpDLOtNMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="67" src="https://lh5.googleusercontent.com/-DDg8-WcD49w/UzAE7_UNjtI/AAAAAAAAEEw/ptmREeXFh_c/s144/2014-03-24-stairville-dj-x-16-pcb-solder-side.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> http://vogelchr.blogspot.com/2014/03/stairville-dj-x-16-voided-my-warranty.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-264277650742251782Sun, 09 Mar 2014 19:34:00 +00002014-03-09T19:34:25.051+00:00Playing with a AM2302 Temperature/Humidity Sensor & LUFAI played around with a <a href="https://www.google.de/search?q=Adsong+AM2302" target="_blank">Adsong AM2302</a> Temperature/Humidity sensor today which has a pretty neat serial interface.<br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/Pdz8XV93-rj2oJFjBCbxqtMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="34" src="https://lh5.googleusercontent.com/-rkrd5RHiWS4/UxzAUXszFdI/AAAAAAAAECI/R__VsMYFnEQ/s144/am2302_reading_saleae_logic.png" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> I <a href="https://github.com/vogelchr/vserial-am2302" target="_blank">wrote some code</a> to read in the data using the input-capture mode of the Timer/Counter1 in a AVR ATmega32u4 (way overpowered, but it's handy on a <a href="https://www.olimex.com/Products/Duino/AVR/OLIMEXINO-32U4/open-source-hardware" target="_blank">Olimexino 32U4</a> board) to learn about using the LUFA USB library a little, maybe someone can put it to actual use?<br /> <br /> <span style="font-family: Courier New, Courier, monospace;">$ cu -l ttyACM0</span><br /> <span style="font-family: Courier New, Courier, monospace;">Connected.</span><br /> <span style="font-family: Courier New, Courier, monospace;">Triggering conversion.<br />AS2302 raw bytes: recv cnt=0 01 76 00 fa 71</span><br /> <span style="font-family: Courier New, Courier, monospace;">status: 0, temp=250 (*0.1 dC), rh=374 (*0.1%)</span><br /> <div> <br /></div> http://vogelchr.blogspot.com/2014/03/playing-with-am2302-temperaturehumidity.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-7966517595046640208Thu, 06 Mar 2014 16:54:00 +00002014-03-06T17:08:41.939+00:00Get /dev/spidev on an Raspberrypi running under Archlinux ARM working again.Currently, when running a raspberry-pi with the l<a href="https://github.com/archlinuxarm/PKGBUILDs/tree/master/core/linux-raspberrypi-latest" target="_blank">atest kernel available for Archlinux</a>, access to the SPI bus via <a href="https://www.kernel.org/doc/Documentation/spi/spidev" target="_blank">/dev/spidev</a> no longer works. <a href="http://www.google.com/search?q=raspberrypi+archlinux+spidev" target="_blank">Bugs have been filed</a>, but apparently the late-binding logic available via <a href="https://github.com/raspberrypi/linux/blob/rpi-3.10.y/arch/arm/mach-bcm2708/bcm2708.c#L842" target="_blank">spi_register_board_info</a> just seems to be broken right now.<br /> <br /> I've written a small kernel module that doesn't fix the initial bug, but just does the binding of spidev to the first two chipselects of the first spi master. It's <a href="https://github.com/vogelchr/rpi_add_spidev_module" target="_blank">available on github.</a><br /> <br /> <br /> <span style="font-family: Courier New, Courier, monospace;"><b>$ ls -la /dev/spidev*</b></span><br /> <span style="font-family: Courier New, Courier, monospace;">zsh: no matches found: /dev/spidev*</span><br /> <span style="font-family: Courier New, Courier, monospace;"><br /></span> <span style="font-family: Courier New, Courier, monospace;"><b>$ sudo insmod rpi_add_spidev_module/rpi_add_spidev_module.ko&nbsp;</b></span><br /> <div> <b style="font-family: 'Courier New', Courier, monospace;"><br /></b></div> <div> <b style="font-family: 'Courier New', Courier, monospace;">$ dmesg</b></div> <span style="font-family: inherit;"><i>(...)</i></span><br /> <span style="font-family: Courier New, Courier, monospace;">[ &nbsp;245.299487] spi_master spi0: ...is the master for device #0.</span><br /> <span style="font-family: Courier New, Courier, monospace;">[ &nbsp;245.299709] spi spi0.0: ...is the device #0.</span><br /> <span style="font-family: Courier New, Courier, monospace;">[ &nbsp;245.299734] spi_master spi0: ...is the master for device #1.</span><br /> <span style="font-family: Courier New, Courier, monospace;">[ &nbsp;245.304763] spi spi0.1: ...is the device #1.</span><br /> <div> <br /></div> <div> <div> <span style="font-family: Courier New, Courier, monospace;"><b>$ ls -la /dev/spidev0.*</b></span></div> <div> <span style="font-family: Courier New, Courier, monospace;">crw------- 1 root root 153, 0 Mar &nbsp;6 16:47 /dev/spidev0.0</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">crw------- 1 root root 153, 1 Mar &nbsp;6 16:47 /dev/spidev0.1</span></div> </div> <div> <br /></div> <div> <span style="font-family: Courier New, Courier, monospace;"><b># cd /sys/bus/spi/drivers/spidev</b></span><br /> <span style="font-family: Courier New, Courier, monospace;"><b># ls -l</b></span><br /> <span style="font-family: Courier New, Courier, monospace;">total 0</span><br /> <span style="font-family: Courier New, Courier, monospace;">--w------- 1 root root 4096 Jan &nbsp;1 00:03 bind</span><br /> <span style="font-family: Courier New, Courier, monospace;">lrwxrwxrwx 1 root root &nbsp; &nbsp;0 Jan &nbsp;1 00:02 module -&gt; ../../../../module/spidev</span><br /> <span style="font-family: Courier New, Courier, monospace;">lrwxrwxrwx 1 root root &nbsp; &nbsp;0 Jan &nbsp;1 00:03 spi0.0 -&gt; ../../../../devices/platform/bcm2708_spi.0/spi_master/spi0/spi0.0</span><br /> <span style="font-family: Courier New, Courier, monospace;">lrwxrwxrwx 1 root root &nbsp; &nbsp;0 Jan &nbsp;1 00:02 spi0.1 -&gt; ../../../../devices/platform/bcm2708_spi.0/spi_master/spi0/spi0.1</span><br /> <span style="font-family: Courier New, Courier, monospace;">--w------- 1 root root 4096 Jan &nbsp;1 00:00 uevent</span><br /> <span style="font-family: Courier New, Courier, monospace;">--w------- 1 root root 4096 Jan &nbsp;1 00:02 unbind</span><br /> <div> <br /></div> Using software to talk to a proprietary SPI gyro/accelerometer module works again.</div> <div> <br /></div> <div> <div> <span style="font-family: Courier New, Courier, monospace;"><b>$ sudo ./rpi_gyro /dev/null</b> &nbsp;</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">Opened gpio25 direction as fd 5.</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">Opened gpio25 value as fd 6.</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">Opened /dev/spidev0.0 as fd 7 (0x03, 8, 0).</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">Opened /dev/spidev0.1 as fd 8 (0x03, 8, 0).</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">lsm330dlc_dump_regs: dumping accelerometer registers.</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">$00: $00 $00 $00 $00 &nbsp; $00 $00 $00 $ff</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">$08: $00 $00 $00 $00 &nbsp; $00 $00 $00 $33</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">$10: $86 $16 $a6 $26 &nbsp; $48 $25 $21 $1e</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">$18: $1b $a3 $50 $65 &nbsp; $c0 $00 $50 $00</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">$20: $27 $00 $00 $80 &nbsp; $40 $00 $00 $ff</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">$28: $00 $2d $c0 $01 &nbsp; $40 $27 $80 $9e</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">$30: $00 $00 $00 $00 &nbsp; $00 $00 $00 $00</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">$38: $00 $00 $00 $00 &nbsp; $00 $00 $00 $00</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">lsm330dlc_dump_regs: dumping gyro registers.</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">$00: $d3 $66 $a8 $cc &nbsp; $4d $d0 $11 $f1</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">$08: $20 $06 $ff $18 &nbsp; $02 $83 $00 $d3</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">$10: $90 $2b $19 $44 &nbsp; $0c $e0 $61 $60</span></div> </div> <div> <i>(...)</i></div> <div> <br /></div> http://vogelchr.blogspot.com/2014/03/get-devspidev-on-raspberrypi-running.htmlnoreply@blogger.com (Christian Vogel)2tag:blogger.com,1999:blog-7098474.post-4785717391894817761Sun, 09 Feb 2014 12:39:00 +00002014-02-09T12:39:13.066+00:00Riso Kagaku Corp Webmail Notifier Redux: Kernel Module CleanupTrying to clean up this code, so that it's usable without too much friction...<br /><br />I put up my slightly modified version of the usbled.c kernel module on github. It includes support for one of the cheapest incarnation of USB-led devices, the&nbsp;Riso Kagaku Corp. Webmail Notifier. It can now be built out-of-tree easily (trying to forward to the kernel guys to merge it eventually) and includes udev rules and a script to automate the re-binding of device from usbhid to the usbled driver).<br /> <div> <br /> Earlier posts:<br /> <ul> <li><a href="http://vogelchr.blogspot.de/2013/03/webmail-notifier-linux-hidraw.html" target="_blank">Webmail Notifier - Linux Hidraw</a></li> <li><a href="http://vogelchr.blogspot.de/2013/09/webmail-notifer-linux-kernel-module.html" target="_blank">Webmail Notifer, Linux Kernel Module</a></li> </ul> <br /></div> <div> <a href="https://github.com/vogelchr/led-notify-module" target="_blank">Github: Extending Linux' usbled.c to support the "Webmail Notifier" by Riso Kagaku Corp.</a></div> <div> <br /></div> <div> Movie hosted by instagram:</div> <div> <br /> <iframe allowtransparency="true" frameborder="0" height="710" scrolling="no" src="//instagram.com/p/dxZNl_nEe5/embed/" width="612"></iframe><br /> <br /></div> http://vogelchr.blogspot.com/2014/02/riso-kagaku-corp-webmail-notifier-redux.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-5334978379613904466Fri, 25 Oct 2013 18:28:00 +00002013-10-25T18:32:03.322+00:00DeLock 61114 uses a NEC Corporation uPD72873 (µPD72873) Chipset (Cardbus Firewire Interface)I got myself a <a href="http://en.wikipedia.org/wiki/CardBus" target="_blank">Cardbus</a> <a href="http://en.wikipedia.org/wiki/FireWire" target="_blank">FireWire</a> card, namely a <a href="https://www.google.de/search?q=DeLock+61114" target="_blank">DeLock 61114</a>. As it's always very hard to find the Chipset used for a particular card, I'd want to post it here, so that it may be found by neighbors also interested in this information.<br /> <br /> <b>→ DeLock 61114 uses a&nbsp;NEC Corporation (<a href="http://www.renesas.com/" target="_blank">Renesas</a>) uPD72873 (µPD72873) with vid 0x1033&nbsp;and pid 0x00e7 [1033:00e7].</b><br /> <br /> If you want to use the card for Audio applications I can attest that it <b>does not work at all</b>&nbsp;with either an <a href="http://echoaudio.com/" target="_blank">Echo AudioFire 4</a> and a <a href="http://focusrite.de/" target="_blank">Focusrite Saffire Pro 26 I/O</a>&nbsp;with ffado/jackd under Linux, which is not surprising as the NEC chipset if often classified as "problematic". I bought it for a different purpose and did not know the chipset in advanced, let's hope it will turn out to be usable.<br /> <h2> lspci -tv</h2> <span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">-[0000:00]-+-00.0 &nbsp;Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller</span><br /> <span style="font-size: x-small;"><span style="font-family: inherit;">(...)</span></span><br /> <div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+-1e.0-[02-06]--+-[0000:03]---00.0 &nbsp;NEC Corporation uPD72873 [Firewarden] IEEE1394a OHCI 1.1 Link/2-port PHY Controller</span></div> </div> <div> <br /> <h2> lspci -v</h2> $ sudo lspci -s 03:00.0 -v -v -nn<br /> 03:00.0 FireWire (IEEE 1394) [0c00]: NEC Corporation uPD72873 [Firewarden] IEEE1394a OHCI 1.1 Link/2-port PHY Controller [1033:00e7] (rev 01) (prog-if 10 [OHCI])<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Subsystem: NEC Corporation uPD72873 [Firewarden] IEEE1394a OHCI 1.1 Link/2-port PHY Controller [1033:00e7]<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium &gt;TAbort- <tabort- bort-="">SERR- <perr- intx-="" p=""><span class="Apple-tab-span" style="white-space: pre;"> </span>Latency: 64 (5000ns min, 11000ns max), Cache Line Size: 64 bytes<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Interrupt: pin A routed to IRQ 19<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Region 0: Memory at 8c000000 (32-bit, non-prefetchable) [size=4K]<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Region 1: Memory at 8c001000 (32-bit, non-prefetchable) [size=256]<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Region 2: Memory at 8c001100 (32-bit, non-prefetchable) [size=256]<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Capabilities: [60] Power Management version 2<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME+<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Kernel driver in use: firewire_ohci<br /> <span class="Apple-tab-span" style="white-space: pre;"> </span>Kernel modules: firewire_ohci</perr-></tabort-></div> <div> <br /></div> <div> <h2> dmesg on insert</h2> </div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.716245] pcmcia_socket pcmcia_socket0: pccard: CardBus card inserted into slot 0</span></div> <div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.716285] pci 0000:03:00.0: [1033:00e7] type 00 class 0x0c0010</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.716330] pci 0000:03:00.0: reg 0x10: [mem 0x00000000-0x00000fff]</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.716353] pci 0000:03:00.0: reg 0x14: [mem 0x00000000-0x000000ff]</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.716377] pci 0000:03:00.0: reg 0x18: [mem 0x00000000-0x000000ff]</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.716504] pci 0000:03:00.0: supports D1 D2</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.716511] pci 0000:03:00.0: PME# supported from D0 D1 D2 D3hot</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.716732] pci 0000:03:00.0: BAR 0: assigned [mem 0x8c000000-0x8c000fff]</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.716747] pci 0000:03:00.0: BAR 1: assigned [mem 0x8c001000-0x8c0010ff]</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.716760] pci 0000:03:00.0: BAR 2: assigned [mem 0x8c001100-0x8c0011ff]</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.716868] firewire_ohci 0000:03:00.0: enabling device (0000 -&gt; 0002)</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.717115] firewire_ohci 0000:03:00.0: setting latency timer to 64</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4893.776285] firewire_ohci 0000:03:00.0: added OHCI v1.10 device as card 2, 4 IR + 4 IT contexts, quirks 0x1</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[ 4894.276463] firewire_core 0000:03:00.0: created device fw0: GUID 00004c020001af59, S400</span></div> </div> <h2> Platform for Test</h2> Dell Latitude D410, Intel(R) Pentium(R) M processor 1.60GHz, 2 GByte RAM, Kernel&nbsp;3.11.6-1-ARCH, Archlinux x86 (32bit)<br /> <br /> <a href="http://2.bp.blogspot.com/-3FITk49iJrI/Umq1xTSJDgI/AAAAAAAADnE/U5R8KmjwKPI/s1600/IMG_20131025_185504338.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-3FITk49iJrI/Umq1xTSJDgI/AAAAAAAADnE/U5R8KmjwKPI/s320/IMG_20131025_185504338.jpg" width="240" /></a><br /> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="http://4.bp.blogspot.com/-XpIQoDxjSHE/Umq1xW7AkJI/AAAAAAAADnE/RWcGQQT18KA/s1600/IMG_20131025_185425850.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-XpIQoDxjSHE/Umq1xW7AkJI/AAAAAAAADnE/RWcGQQT18KA/s320/IMG_20131025_185425850.jpg" width="320" /></a></div> <div class="separator" style="clear: both; text-align: center;"> <br /></div> <div> <br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">$ ffado-diag&nbsp;</span><br /> <span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">FFADO diagnostic utility 2.1.0-Unversioned directory</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">============================</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(C) 2008 Pieter Palmers</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; 2009-2010 Arnold Krille</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">=== CHECK ===</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;Base system...</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; kernel version............ 3.11.6-1-ARCH</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; Preempt (low latency)... True</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; RT patched.............. False</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; old 1394 stack present.... False</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; old 1394 stack loaded..... False</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; old 1394 stack active..... False</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; new 1394 stack present.... False</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; new 1394 stack loaded..... True</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; new 1394 stack active..... True</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; /dev/raw1394 node present. False</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; /dev/fw* permissions:</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">crw------- 1 root root 248, 0 Oct 25 20:08 /dev/fw0</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; User IDs:</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">uid=1000(chris) gid=100(users) groups=100(users),4(adm),10(wheel),14(uucp),92(audio),190(systemd-journal)</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;Prerequisites (dynamic at run-time)...</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;gcc ............... gcc (GCC) 4.8.2</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;g++ ............... g++ (GCC) 4.8.2</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;PyQt4 (by pyuic4) . Python User Interface Compiler 4.10.3 for Qt version 4.8.5</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;jackd ............. jackd version 0.121.3 tmpdir /dev/shm protocol 24</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;path ............ /usr/bin/jackd</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... -ljack -lpthread -lrt&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;libraw1394 ........ 2.1.0</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... -lraw1394&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;libavc1394 ........ 0.5.4</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... -lavc1394 -lrom1394 -lraw1394&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;libiec61883 ....... 1.2.0</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... -liec61883 -lraw1394&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;libxml++-2.6 ...... 2.36.0</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... -I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include -I/usr/include/libxml2 -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -lxml++-2.6 -lxml2 -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lsigc-2.0&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;dbus-1 ............ 1.6.16</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -ldbus-1&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;Prerequisites (static at compile-time)...</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;gcc ............... gcc (GCC) 4.8.1 20130725 (prerelease)</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;g++ ............... g++ (GCC) 4.8.1 20130725 (prerelease)</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;PyQt4 (by pyuic4) . Python User Interface Compiler 4.10.3 for Qt version 4.8.5</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;jackd ............. sh: jackd: command not found</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;path ............&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... Package jack was not found in the pkg-config search path.</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;libraw1394 ........ 2.1.0</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... -lraw1394&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;libavc1394 ........ 0.5.4</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... -lavc1394 -lrom1394 -lraw1394&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;libiec61883 ....... 1.2.0</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... -liec61883 -lraw1394&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;libxml++-2.6 ...... 2.36.0</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... -I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include -I/usr/include/libxml2 -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -lxml++-2.6 -lxml2 -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lsigc-2.0&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;dbus-1 ............ 1.6.14</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp; &nbsp;flags ........... -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -ldbus-1&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;uname -a...</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;Linux latitude-d410 3.11.6-1-ARCH #1 SMP PREEMPT Sat Oct 19 00:29:46 CEST 2013 i686 GNU/Linux</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;Hardware...</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;Host controllers:</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">03:00.0 FireWire (IEEE 1394) [0c00]: NEC Corporation uPD72873 [Firewarden] IEEE1394a OHCI 1.1 Link/2-port PHY Controller [1033:00e7] (rev 01) (prog-if 10 [OHCI])</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Subsystem: NEC Corporation uPD72873 [Firewarden] IEEE1394a OHCI 1.1 Link/2-port PHY Controller [1033:00e7]</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium &gt;TAbort- <tabort- bort-="">SERR- <perr- font="" intx-=""></perr-></tabort-></span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Latency: 64 (5000ns min, 11000ns max), Cache Line Size: 64 bytes</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Interrupt: pin A routed to IRQ 19</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Region 0: Memory at 8c000000 (32-bit, non-prefetchable) [size=4K]</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Region 1: Memory at 8c001000 (32-bit, non-prefetchable) [size=256]</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Region 2: Memory at 8c001100 (32-bit, non-prefetchable) [size=256]</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Capabilities: <access denied=""></access></span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Kernel driver in use: firewire_ohci</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Kernel modules: firewire_ohci</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; &nbsp;CPU info:</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Architecture: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i686</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">CPU op-mode(s): &nbsp; &nbsp; &nbsp; &nbsp;32-bit</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Byte Order: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Little Endian</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">CPU(s): &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">On-line CPU(s) list: &nbsp; 0</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Thread(s) per core: &nbsp; &nbsp;1</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Core(s) per socket: &nbsp; &nbsp;1</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Socket(s): &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Vendor ID: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GenuineIntel</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">CPU family: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;6</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Model: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 13</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Model name: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Intel(R) Pentium(R) M processor 1.60GHz</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Stepping: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;8</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">CPU MHz: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1600.000</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">BogoMIPS: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3193.49</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;Configuration...</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp; IRQ information</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Hardware Interrupts:</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">--------------------</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;IRQ &nbsp; &nbsp;0: PID: &nbsp;None, count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [906109], Sched None (priority None), drivers: ['timer']</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;IRQ &nbsp; &nbsp;1: PID: &nbsp;None, count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[10837], Sched None (priority None), drivers: ['i8042']</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;IRQ &nbsp; &nbsp;8: PID: &nbsp;None, count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[1], Sched None (priority None), drivers: ['rtc0']</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;IRQ &nbsp; &nbsp;9: PID: &nbsp;None, count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[1], Sched None (priority None), drivers: ['acpi']</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;IRQ &nbsp; 12: PID: &nbsp;None, count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[755], Sched None (priority None), drivers: ['i8042']</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;IRQ &nbsp; 14: PID: &nbsp;None, count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [112126], Sched None (priority None), drivers: ['ata_piix']</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;IRQ &nbsp; 15: PID: &nbsp;None, count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[0], Sched None (priority None), drivers: ['ata_piix']</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;IRQ &nbsp; 16: PID: &nbsp;None, count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [6925], Sched None (priority None), drivers: ['uhci_hcd:usb1', 'ehci_hcd:usb5', 'i915', 'snd_intel8x0']</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;IRQ &nbsp; 17: PID: &nbsp;None, count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [608140], Sched None (priority None), drivers: ['uhci_hcd:usb2', 'b43']</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;IRQ &nbsp; 18: PID: &nbsp;None, count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[0], Sched None (priority None), drivers: ['uhci_hcd:usb3']</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">&nbsp;IRQ &nbsp; 19: PID: &nbsp;None, count: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[47980], Sched None (priority None), drivers: ['uhci_hcd:usb4', 'yenta', 'firewire_ohci']</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Software Interrupts:</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">--------------------</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">=== REPORT ===</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">FireWire kernel drivers:</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">The new FireWire kernel stack is loaded.&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">If running a kernel earlier than 2.6.37 and problems are experienced, either&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">try with the old Firewire kernel stack or upgrade to a newer kernel&nbsp;</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(preferrably 2.6.37 or later).</span><br /> <div> <br /></div> <h2> ffado output (on EchoFire 4)</h2> <br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">05803339228: Warning (StreamProcessor.cpp)[1708] updateState: ignoring identity state update from/to ePS_Created</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">05803339616: Warning (StreamProcessor.cpp)[1708] updateState: ignoring identity state update from/to ePS_Created</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">05804389908: Warning (TimestampedBuffer.cpp)[ 251] calculateRate: (0x952cf08) rate ( 425.80881) more that 10% off nominal (rate= 512.00000, diff= &nbsp; &nbsp; &nbsp;3406.470, update_period=8)</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">05804390013: Warning (TimestampedBuffer.cpp)[ 251] calculateRate: (0x952cf08) rate ( 422.66907) more that 10% off nominal (rate= 512.00000, diff= &nbsp; &nbsp; &nbsp;3381.352, update_period=8)</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">05804397825: Warning (TimestampedBuffer.cpp)[ 251] calculateRate: (0x952cf08) rate ( 426.40921) more that 10% off nominal (rate= 512.00000, diff= &nbsp; &nbsp; &nbsp;3411.274, update_period=8)</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">05804397982: Warning (TimestampedBuffer.cpp)[ 251] calculateRate: (0x952cf08) rate ( 422.66876) more that 10% off nominal (rate= 512.00000, diff= &nbsp; &nbsp; &nbsp;3381.350, update_period=8)</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">05804405797: Warning (TimestampedBuffer.cpp)[ 251] calculateRate: (0x952cf08) rate ( 422.66907) more that 10% off nominal (rate= 512.00000, diff= &nbsp; &nbsp; &nbsp;3381.352, update_period=8)</span><br /> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">05804405903: Warning (TimestampedBuffer.cpp)[ 251] calculateRate: (0x952cf08) rate ( 424.58093) more that 10% off nominal (rate= 512.00000, diff= &nbsp; &nbsp; &nbsp;3396.648, update_period=8)</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(...)</span></div> <div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">05805685889: Warning (IsoHandlerManager.cpp)[ 292] Execute: Timeout while waiting for activity</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">05808703126: Fatal (IsoHandlerManager.cpp)[ 348] Execute: (0x95005f0, Transmit) Handler died: now: 1750DB1D, last: 134FD732, diff: 49202155 (max: 49152000)</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">05808703167: Warning (StreamProcessor.cpp)[ 173] handlerDied: Handler died for 0x952d360</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">jackd watchdog: timeout - killing jackd</span></div> <div> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">no message buffer overruns</span></div> </div> <div> <br /></div> http://vogelchr.blogspot.com/2013/10/delock-61114-uses-anec-corporation.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-3321182958920337442Sun, 20 Oct 2013 10:27:00 +00002013-10-20T11:50:12.598+00:00Notes: More Toradex-T20 Stuff...So, I've wasted (again) too much time on the <a href="http://vogelchr.blogspot.de/2012/12/note-archlinux-on-toradex-t20.html" target="_blank">Toradex T20 I've written about earlier</a>. It was collecting dust all of the time, but it's actually quite a nice toy, albeit not receiving nearly as much attention from developers, here are some random notes for myself, blogged so that I don't loose them.<br /> <h2> USB</h2> Switch the micro <a href="http://de.wikipedia.org/wiki/Universal_Serial_Bus#USB_On-the-go" target="_blank">USB-on-the-go</a>-connector (usable as a&nbsp;“normal” port, e.g. for connecting a Wireless LAN card or a USB thumbdrive) to host-mode:<br /> <br /> <span style="font-family: Courier New, Courier, monospace;"><b># echo 1 &gt;/sys/bus/platform/drivers/tegra-otg/tegra-otg/enable_host</b></span><br /> <br /> Devices connected to the micro-usb with a OTG cable will now appear as usual, on the new “<i>usb3</i>” port.<br /> <h2> Flash/Boot</h2> Linux-Images to be run by the stock u-boot should look like this:<br /> <br /> <span style="font-family: Courier New, Courier, monospace;"><b># mkimage -l /mnt/linux.img&nbsp;</b></span><br /> <span style="font-family: Courier New, Courier, monospace;">Image Name: &nbsp; Linux_3_1_10+</span><br /> <span style="font-family: Courier New, Courier, monospace;">Created: &nbsp; &nbsp; &nbsp;Sun Oct 20 03:14:16 2013</span><br /> <span style="font-family: Courier New, Courier, monospace;">Image Type: &nbsp; ARM Linux Kernel Image (uncompressed)</span><br /> <span style="font-family: Courier New, Courier, monospace;">Data Size: &nbsp; &nbsp;6198328 Bytes = 6053.05 kB = 5.91 MB</span><br /> <span style="font-family: Courier New, Courier, monospace;">Load Address: 00008000&nbsp;<!-------><!------->&nbsp;← !</span><br /> <span style="font-family: Courier New, Courier, monospace;">Entry Point: &nbsp;00008000 &nbsp;<!-------><!------->← !</span><br /> <br /> These are “legacy” images. The newer <i>.its</i>-based images work, too, but only with newer kernels (I tried 3.10 and 3.11) and those are broken in different ways, see below.<br /> <br /> Copy the linux-images to the “default location” in internal NAND flash where 0x00800000 is the mtd device size (must be a multiple of the “erase block size” and <span style="color: #4c1130;"><b>6198392</b></span> is your image file size). “/dev/mtd6” is the “LNX” partition when using the stock mtdparts command line option.<br /> <br /> <span style="font-family: Courier New, Courier, monospace;"><b># mtd_debug erase /dev/mtd6 0 0x00800000</b></span><br /> <span style="font-family: Courier New, Courier, monospace;">Erased 8388608 bytes from address 0x00000000 in flash</span><br /> <span style="font-family: Courier New, Courier, monospace;"><b># mtd_debug write /dev/mtd6 0 6198392 /mnt/linux.img</b></span><br /> <span style="font-family: Courier New, Courier, monospace;">Copied <b><span style="color: purple;">6198392</span></b> bytes from /mnt/linux.img to address 0x00000000 in flash</span><br /> <br /> “mtd_debug” is part of the “mtd-utils” package.<br /> <br /> To find the correct flash block, have a look at /proc/mtd:<br /> <br /> <b><span style="font-family: Courier New, Courier, monospace;"># cat /proc/mtd&nbsp;</span></b><br /> <span style="font-family: Courier New, Courier, monospace;">dev: &nbsp; &nbsp;size &nbsp; erasesize &nbsp;name</span><br /> <span style="font-family: Courier New, Courier, monospace;">mtd0: 3de80000 00080000 "USR"</span><br /> <span style="font-family: Courier New, Courier, monospace;">mtd1: 00300000 00080000 "BCT"</span><br /> <span style="font-family: Courier New, Courier, monospace;">mtd2: 00080000 00080000 "PT"</span><br /> <span style="font-family: Courier New, Courier, monospace;">mtd3: 00200000 00080000 "EBT"</span><br /> <span style="font-family: Courier New, Courier, monospace;">mtd4: 00080000 00080000 "BMP"</span><br /> <span style="font-family: Courier New, Courier, monospace;">mtd5: 00200000 00080000 "ENV"</span><br /> <span style="font-family: Courier New, Courier, monospace;"><i>mtd6: 00800000 00080000 "LNX"</i>&nbsp;← !</span><br /> <span style="font-family: Courier New, Courier, monospace;">mtd7: 00080000 00080000 "ARG"</span><br /> <br /> The partitions are shown in proper (NAND-flash) order in u-boot's mtdparts command (even though this also only parses the mtdparts variable):<br /> <br /> <b><span style="font-family: Courier New, Courier, monospace;">T</span></b><span style="font-family: Courier New, Courier, monospace;"><b>egra2 # mtdparts</b> &nbsp;</span><span style="font-family: inherit;">(note: u-boot prompt, not Linux!)</span><br /> <span style="font-family: Courier New, Courier, monospace;">device nand0 <tegra_nand>, # parts = 8</tegra_nand></span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp;#: name<span class="Apple-tab-span" style="white-space: pre;"> </span>size<span class="Apple-tab-span" style="white-space: pre;"> </span>offset<span class="Apple-tab-span" style="white-space: pre;"> </span>mask_flags</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp;0: BCT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00300000<span class="Apple-tab-span" style="white-space: pre;"> </span>0x00000000<span class="Apple-tab-span" style="white-space: pre;"> </span>0</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp;1: PT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0x00080000<span class="Apple-tab-span" style="white-space: pre;"> </span>0x00500000<span class="Apple-tab-span" style="white-space: pre;"> </span>0</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp;2: EBT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00200000<span class="Apple-tab-span" style="white-space: pre;"> </span>0x00780000<span class="Apple-tab-span" style="white-space: pre;"> </span>0</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp;3: BMP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00080000<span class="Apple-tab-span" style="white-space: pre;"> </span>0x00b80000<span class="Apple-tab-span" style="white-space: pre;"> </span>0</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp;4: ENV &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00200000<span class="Apple-tab-span" style="white-space: pre;"> </span>0x00e00000<span class="Apple-tab-span" style="white-space: pre;"> </span>0</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp;5: LNX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00800000<span class="Apple-tab-span" style="white-space: pre;"> </span>0x01200000<span class="Apple-tab-span" style="white-space: pre;"> </span>0</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp;6: ARG &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00080000<span class="Apple-tab-span" style="white-space: pre;"> </span>0x01c80000<span class="Apple-tab-span" style="white-space: pre;"> </span>0</span><br /> <span style="font-family: Courier New, Courier, monospace;">&nbsp;7: USR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x3de80000<span class="Apple-tab-span" style="white-space: pre;"> </span>0x01f80000<span class="Apple-tab-span" style="white-space: pre;"> </span>0</span><br /> <br /> ENV is the u-boot environment, LNX is the default location for the linux kernel, USR the root-filesystem if running from internal flash. For the other partitions, I'm not sure. There's a&nbsp;“lnx_nand.cfg” in Toradex' <a href="http://20_linuximagev2.0/">T20_LinuxImageV2.0</a> which might shed a light on the exact purpose of all the unexplained partitions, unfortunately this seems to be handled by NVidias binary-only nvflash utility.<br /> <br /> Booting with your root-fs on a sd-card (use no cards slower than class 10):<br /> <br /> <span style="font-family: Courier New, Courier, monospace;"><b>(u-boot environment variables)</b></span><br /> <span style="font-family: Courier New, Courier, monospace;">myargs=root=/dev/mmcblk0p1 rootfstype=ext4 rootflags=data=writeback,commit=15 rootdelay=5,noatime,nodiratime</span><br /> <span style="font-family: Courier New, Courier, monospace;">myboot=run setup; setenv bootargs ${defargs} ${myargs} ${mtdparts} ${setupargs} ; run myload ; bootm</span><br /> <span style="font-family: Courier New, Courier, monospace;">myload=nboot ${loadaddr} 0 ${lnxoffset}</span><br /> <div> <br /></div> <div> <i>In principle</i>, the kernel could also be started of a mmc drive:</div> <div> <br /></div> <div> <div> <span style="font-family: Courier New, Courier, monospace;">Tegra2 # fatload mmc 0:1 $loadaddr linux.img</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">reading linux.img</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">mmc_send_cmd: MMC Timeout</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; Interrupt status &nbsp; &nbsp; &nbsp; &nbsp;0x00000001</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; Interrupt status enable 0xfbff003b</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; Interrupt signal enable 0xfbff0002</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp; Present status &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0x01e70206</span></div> <div> <span style="font-family: Courier New, Courier, monospace;"><br /></span></div> <div> <span style="font-family: Courier New, Courier, monospace;">6198392 bytes read</span></div> </div> <div> <br /></div> But I always get this MMC Timeout error, and the loaded data is corrupt.<br /> <br /> If you want to test a new kernel, booting over TFTP/Network (wired ethernet) or from a USB-disk works as expected (example below uses the same sd-card not working above, in a cheap and crappy usb card-reader):.<br /> <br /> <span style="font-family: Courier New, Courier, monospace;">Tegra2 # fatload usb 0:1 $loadaddr linux.img</span><br /> <span style="font-family: Courier New, Courier, monospace;">reading linux.img</span><br /> <span style="font-family: Courier New, Courier, monospace;"><br /></span> <span style="font-family: Courier New, Courier, monospace;">6198392 bytes read</span><br /> <div> <div> <span style="font-family: Courier New, Courier, monospace;">Tegra2 # bootm</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">## Booting kernel from Legacy Image at 00408000 ...</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp;Image Name: &nbsp; Linux_3_1_10+</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp;Created: &nbsp; &nbsp; &nbsp;2013-10-20 &nbsp; 9:14:16 UTC</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp;Image Type: &nbsp; ARM Linux Kernel Image (uncompressed)</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp;Data Size: &nbsp; &nbsp;6198328 Bytes = 5.9 MiB</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp;Load Address: 00008000</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp;Entry Point: &nbsp;00008000</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp;Verifying Checksum ... OK</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">&nbsp; &nbsp;Loading Kernel Image ... OK</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">OK</span></div> <div> <span style="font-family: Courier New, Courier, monospace;"><br /></span></div> <div> <span style="font-family: Courier New, Courier, monospace;">Starting kernel ...</span></div> </div> <div> <br /></div> <h2> Kernel and Distribution</h2> I didn't have much luck with a more-recent stock-kernel, the most serious problem in those kernel being a <a href="http://comments.gmane.org/gmane.linux.ports.tegra/11984" target="_blank">misconfiguration of the voltage regulators</a>. My board became very hot and was pretty unstable. So I'm sticking with the <a href="http://git.toradex.com/gitweb/linux-toradex.git" target="_blank">antiquated vendor supplied kernel (3.1.10) right now</a>&nbsp;with a <a href="https://docs.google.com/file/d/0BxaUhDCUXNJCWm5raWRiZUlZSWs/edit?usp=sharing" target="_blank">config based on the Toradex shipped one</a>.<br /> <br /> I'm running ArchLinux based on the&nbsp;<a href="http://archlinuxarm.org/platforms/armv7/nvidia/trimslice" target="_blank">root-filesystem for the compact TrimSlice</a> computer which also runs on a NVidia Tegra. <br /> <br /> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="http://2.bp.blogspot.com/-jGHWVtmbF2k/UmOv7_489DI/AAAAAAAADlw/Do0ACHmVlgI/s1600/IMG_20131020_114125106.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-jGHWVtmbF2k/UmOv7_489DI/AAAAAAAADlw/Do0ACHmVlgI/s320/IMG_20131020_114125106.jpg" width="320" /></a></div> <br /> <br /> <br /> <br />http://vogelchr.blogspot.com/2013/10/notes-more-toradex-t20-stuff.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-4763090037776975078Sun, 22 Sep 2013 10:38:00 +00002015-02-15T18:27:54.997+00:00DCF77 via GPIO on the Raspberry Pi (patched radioclkd2)<b><u>Update 2015-02-15, see below.</u></b><br /> <br /> After replacing my old linux-PC based router with a Telco-supplied plastic-box, I no longer have a usable <a href="http://www.ntp.org/">NTP</a> server at home. As a first measure, I’ve put a small <a href="https://www.google.de/search?q=dcf77+module&amp;tbm=isch">DCF77 module</a> on a raspberry-pi. It seems that most people add a serial to usb converter for that, but the raspberry has perfectly fine <a href="https://www.kernel.org/doc/Documentation/gpio.txt">GPIOs</a> that are capable of generating an interrupt for low CPU load -- and that’s all one needs. You can find my <a href="https://github.com/vogelchr/radioclkd2">very lightly patched radioclkd2</a> for parsing the pulses on github.<br /> I’ve added an additional filtering capacitor to the back of the module (be careful, inrush current will crash your Pi when connecting the leads!) a long time ago when it was still connected to the old PC, and there’s a pullup from the pulse output (which typically is open-drain/open-collector) to Vcc (3.3V). In my case, on a Rev. A Raspberry, I use GPIO0 (probably a bad choice, because it’s also one of the two accessible i2c pins, but easily changed).<br /> Unfortunately it turned out that at its current location, reception is pretty bad, but easily solved by repositioning the Pi.<br /> <a href="http://lh3.ggpht.com/-eUToTIKSu4c/Uj7IjM9onDI/AAAAAAAADac/BfpAyRqF1Uo/s1600-h/IMG_20130922_121308764%25255B3%25255D.jpg"><img alt="IMG_20130922_121308764" border="0" src="http://lh6.ggpht.com/-0j-xIgPFCbA/Uj7Ijk-xEkI/AAAAAAAADak/6dLOyL63kr0/IMG_20130922_121308764_thumb.jpg?imgmax=800" height="184" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="IMG_20130922_121308764" width="244" /></a><br /> <br /> <b>Update:</b>I got a few emails regarding this project (which I hadn't had running for quite some time) recently, so I'll try to add this information on the old blog-post.<br /> <br /> <u>First,</u> if you get a lot of pulses with bad, and very short, lengths (&lt;10ms)<br /> <ul><li>Reposition the DCF77 receiver with a long cable, away from all your computer stuff and switch-mode power supplies.</li> <li>Wrap a huge ferrite core around this cable, to attenuate wire-conducted noise to the DCF77 receiver.</li> <li>Add additional filtering caps at both sides of the cable (near the Rpi and DCF77 receiver module).</li> </ul><div>That way, I could get reliable reception again.</div><div><br /> </div><div><u>Second,</u> if your ntpd doesn't seem to register any time from radioclkd2, even if it seems to receive properly: If you enable debug mode in radioclkd2, it will *not* update the shared memory. So after you've verified proper operation, put radioclkd2 in the background without -d.</div><div><br /> </div><!--10ms-->http://vogelchr.blogspot.com/2013/09/dcf77-via-gpio-on-raspberry-pi-patched.htmlnoreply@blogger.com (Christian Vogel)4tag:blogger.com,1999:blog-7098474.post-4879891030814097491Mon, 02 Sep 2013 20:59:00 +00002013-09-02T20:59:29.932+00:00Webmail Notifer, Linux Kernel ModuleThis is an <a href="http://vogelchr.blogspot.de/2013/03/webmail-notifier-linux-hidraw.html" target="_blank">update on the Webmail Notifier</a>, a cheap chinese gadget that's nothing more than a RGB LED connected via USB. In this case, it's an especially cheap version that can only display 7 distinct colours, plus black (off).<br /> <br /> Finally I was sufficiently annoyed to put the code into a “proper” kernel module (<a href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/misc/usbled.c" target="_blank">original module on kernel.org</a>). <a href="https://docs.google.com/file/d/0BxaUhDCUXNJCbXNmeTNuUVRwb1E/edit?usp=sharing" target="_blank">Here's my patch</a> that adds this particular LED gadget.<br /> <br /> Here's the thing cycling through random colours:<br /> <br /> <iframe src="//instagram.com/p/dxZNl_nEe5/embed/" width="612" height="710" frameborder="0" scrolling="no" allowtransparency="true"></iframe>http://vogelchr.blogspot.com/2013/09/webmail-notifer-linux-kernel-module.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-4078576474371555980Wed, 03 Jul 2013 19:24:00 +00002013-07-03T19:24:57.199+00:00Repairing an Alesis IO26There's a really common way to kill your <a href="https://en.wikipedia.org/wiki/IEEE_1394" target="_blank">firewire-devices</a>, which is to forcefully plug in the <a href="http://pinouts.ru/Slots/ieee1394_pinout.shtml" target="_blank">6-pin connector</a>, carrying both supply power and data signals, rotated by 180 degrees (which normally should be prevented by the asymmetrical shape of the connector). That way you'll send&nbsp;+12V, the most common supply voltage, into the <a href="http://www.ti.com/product/tsb41ab2" target="_blank">chip that connects to the cable</a>. This kills the chip pretty reliably.<br /> <br /> <a href="http://www.alesis.com/io26">This audio-interface</a>&nbsp;(Alesis IO26) was damaged using this method:<br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/otyjOAzpm0PKWEVOG3JzRdMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="108" src="https://lh5.googleusercontent.com/-Duxmklv2db8/UdRv7i6SXcI/AAAAAAAAC54/48Q2P-MX2eY/s144/IMG_2757.JPG" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> <div> Thankfully the internal layout of the device is pretty clean. There's a stack of two PCBs (only the lower one shown) on the left side inside. The lower one has the DSP, Firewire controller and a ARM based controller. It connects with flat cables to the "analog" boards. On top, it carries a switching power supply generating the internal voltages (+3.3V,&nbsp;+5V, +/-15V and +48V from a single, galvanically isolated 9..30V input)&nbsp;which is missing in the photo.<br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/AEmUsx1aTuN1m2jqdDA2wNMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="108" src="https://lh5.googleusercontent.com/-wej3AKcknwA/UdRxQKLwpuI/AAAAAAAAC7A/QciFTDA3fac/s144/IMG_2803.JPG" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> A good way to diagnose these kind of errors (according to some forums and FAQs) is to look at the idle-voltage on the firewire-bus lines (TPA0+...TPA0-...). They are supposed to be biased to a internally generated 1/2 Vcc (~1.8V) via 56 Ohm resistors from the twisted-pair lines to a bias pin (TBIAS0/1). It's described in the data sheet of the chip, here it's a <a href="http://www.ti.com/product/tsb41ab2" target="_blank">TSB41AB2 from TexasInstruments</a> In my case one bias-voltage-regulator spat out 3.3V, the other 0V (there's one for each of the two firewire ports). One of the ports had one receiver line stuck at 0V (chip-internal short to GND).<br /> <br /> The only way to repair it is to desolder the chip, and replace it with a new one. Then the interface should be functioning again (I did not populate the mechanically damaged connector and associated terminating resistors, one port is enough for me).<br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/b1TxydbFm2YFaENbvDygttMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="144" src="https://lh6.googleusercontent.com/-6cj7jJl3MHA/UdRy8TtUGEI/AAAAAAAAC7A/vH9dYPEiPHM/s144/IMG_2811_resize_crop.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/O5jFeppo7E-QI8Wt4clIfdMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="144" src="https://lh3.googleusercontent.com/--2yEShs1Oc4/UdRyVwJjE7I/AAAAAAAAC7A/ErBSRKyYhOs/s144/IMG_2813_crop.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> The two shorted pins #1 and #2 are both GND, so I did not bother to clean up the blob.<br /> <br /></div> http://vogelchr.blogspot.com/2013/07/repairing-alesis-io26.htmlnoreply@blogger.com (Christian Vogel)8tag:blogger.com,1999:blog-7098474.post-3067987907562223863Sun, 09 Jun 2013 10:05:00 +00002013-06-09T10:05:03.886+00:00Audix APS 910 - Inline Phantom AdapterThis adapter allows you to connect "normal" electret-type microphones to differential, phantom-powered inputs, like the ones to be found on sound mixing desks. I got one of those, but as the pinout was not mentioned anywhere, I made these photographs.<br /> <br /> <a href="http://www.audixusa.com/docs_12/units/APS910.shtml" target="_blank">http://www.audixusa.com/docs_12/units/APS910.shtml</a><br /> <br /> Mini-XLR pinout is supposed to be: 1: GND, 2: Signal, 3: Vbias. Even though the supply pin (3) is quite susceptible to noise coupling into the adapter output, Firther more, the signal pin (2) itself has a 1k or so pullup to Vbias. So to connect to a 2-pin electret microphone, just connect only pin 2. If you need more bias current, also connect pin 3, but then your signal will be slightly attenuated.<br /> <br /> Phantom supply current is preetty high, at around 5mA each on "Hot" and "Cold" pins. (P48 on my mixing desk goes down to 13V when the adapter is connected)<br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/sIVRRP4He4mhgR0kQDg9yNMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="144" src="https://lh6.googleusercontent.com/-6em_6gkci9A/UbRQILpFiPI/AAAAAAAACyM/MtrzekuJ818/s144/audix_aps910_cropped_img_2789.jpg" width="63" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/zF6wuiPKW5UjuPe_Qkn4mdMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="144" src="https://lh3.googleusercontent.com/-qxn0yq7LyDg/UbRQQXOF89I/AAAAAAAACyk/lFpy07CRePY/s144/audix_aps910_pcb_both_sides.jpg" width="93" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/mE6FqaUbyABbOhELbSiOE9MTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="144" src="https://lh5.googleusercontent.com/-PGRBJaA1Dv4/UbRQN7ndp9I/AAAAAAAACyc/k8XhXRMvKQg/s144/audix_aps910_cropped_img_2790.jpg" width="53" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/VXS-HEaZvmRd0mGLhg8OQ9MTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="144" src="https://lh3.googleusercontent.com/-quANM0wsdJg/UbRQNM9OlYI/AAAAAAAACyY/ef_a7uNB4dU/s144/audix_aps910_cropped_img_2791.jpg" width="52" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br />http://vogelchr.blogspot.com/2013/06/audix-aps-910-inline-phantom-adapter.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-8699922769919199660Fri, 31 May 2013 11:39:00 +00002013-05-31T11:39:54.111+00:00Reboot your Arch-linux running computer early, in case some vital component failed to initialize (a.k.a. e1000e_fsckup_initcpio)Ok, so this is embarrassingly primitive, but so that I don't loose it (<i>again</i>), I put this small script on github. Maybe someone else having a problem with things not initializing properly on every boot can find the concept useful: I have a computer based on a “DFI LanParty Mini-ITX P55-T36” motherboard with an integrated Intel Gigabit interface. Which works fine so far, but <em>always</em> fails to initialize networking on the first bootup after power-on. This is obviously inconvenient for unattended operation.<br /> <br /> To fix this once and for all and reboot the computer early, feel free to use the code at&nbsp;<a href="https://github.com/vogelchr/e1000e_fsckup_initcpio">https://github.com/vogelchr/e1000e_fsckup_initcpio</a>.<br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/d0JnQT4ItYQ3R1uOan7Ww9MTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="41" src="https://lh5.googleusercontent.com/-rWNvAD3nCrI/UaiJR4Q1PxI/AAAAAAAACss/izk4mWIEe94/s144/e1000e_broken_bootup_img_2788_crop.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> http://vogelchr.blogspot.com/2013/05/reboot-your-arch-linux-running-computer.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-19792349363450955Thu, 30 May 2013 13:55:00 +00002013-05-30T13:55:50.989+00:00Antlers (May 2013 edition)I was on vacation again, so here's the obligatory antlers picture. I already posted another one elsewhere, but that was taken with the (a little bit) crappy phone camera and doesn't do the wallpaper and the antlers justice.<br /> <br /> <br /> <table style="width:auto;"><tr><td><a href="https://picasaweb.google.com/lh/photo/et2fC0zBIyCP6vKLdAOM0dMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img src="https://lh5.googleusercontent.com/-GCjVNRL6B10/UadYj3Q6dSI/AAAAAAAACqc/iyBfdi_cvrc/s144/20130529_img_2608.jpg" height="108" width="144" /></a></td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&feat=embedwebsite">Chris’ Miscellanea</a></td></tr></table>http://vogelchr.blogspot.com/2013/05/antlers-may-2013-edition.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-9169985680169118031Sun, 19 May 2013 16:49:00 +00002013-05-19T16:49:29.368+00:00Wireless on Raspberry π, Power IssuesI'm playing with a <a href="http://cgi.ebay.de/181066897911" target="_blank">Accellerometer/Gyroscope/Magnetometer board</a>&nbsp;(ebay, link probably stale soon), and to have it somewhat mobile, I've connected it to the ole' trusty <a href="http://www.raspberrypi.org/" target="_blank">Raspberry&nbsp;π</a>.<br /> <br /> Unfortunately I have problems with a lot of WiFi adapters because of the many fuses inside of the&nbsp;π dropping voltages (starting with 4,5V from my Notebook/USB hub, it goes down to 3,8V on the USB connector). But adding a short wire bridging all those fuses helps ;-).<br /> <br /> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="http://1.bp.blogspot.com/-apfSP2G-bFE/UZkBLd5UslI/AAAAAAAACZc/KTVo9yDQt9M/s1600/IMG_20130519_181648.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-apfSP2G-bFE/UZkBLd5UslI/AAAAAAAACZc/KTVo9yDQt9M/s320/IMG_20130519_181648.jpg" width="320" /></a></div> <br />The dongle used is really old, it's a&nbsp;<div> <br /></div> <div> <span style="font-family: Courier New, Courier, monospace;">Bus 001 Device 005: ID 07b8:b21d AboCom Systems Inc RT2573</span><br /> <div> <br /></div> <div> and gets quite warm (correlates well with the high power consumption and hence voltage drop on the fuses), also looses contact with my (just nearby) access point frequently.</div> <div> <br /></div> <div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2140.585617] ieee80211 phy0: wlan0: No probe response from AP 68:7f:74:5e:42:ff after 500ms, disconnecting.</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2140.607093] cfg80211: All devices are disconnected, going to restore regulatory settings</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2140.607132] cfg80211: Restoring regulatory settings</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2140.607420] cfg80211: Calling CRDA to update world regulatory domain</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2141.948125] wlan0: authenticate with 68:7f:74:5e:42:ff</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2141.996396] wlan0: send auth to 68:7f:74:5e:42:ff (try 1/3)</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2141.998072] wlan0: authenticated</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2141.998877] rt73usb 1-1.2:1.0: wlan0: disabling HT due to WEP/TKIP use</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2141.998912] rt73usb 1-1.2:1.0: wlan0: disabling HT as WMM/QoS is not supported</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2142.035630] wlan0: associate with 68:7f:74:5e:42:ff (try 1/3)</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2142.037914] wlan0: RX AssocResp from 68:7f:74:5e:42:ff (capab=0x431 status=0 aid=20)</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2142.037943] wlan0: invalid AID value 0x14; bits 15:14 not set</span></div> <div> <span style="font-family: Courier New, Courier, monospace;">[ 2142.057687] wlan0: associated</span></div> </div> <div> <br /></div> <div> <br /></div> <br /><br /></div> http://vogelchr.blogspot.com/2013/05/wireless-on-raspberry-power-issues.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-2507115030479257441Sun, 31 Mar 2013 12:05:00 +00002013-03-31T12:05:41.075+00:00Happy EasterAnd remember: As long as the eggs aren't completely covered in snow, it's spring enough.<br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/0iTuC2giEAkqjMhOH0j0JdMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="144" src="https://lh4.googleusercontent.com/-O9NNxmiNiCI/UVgl32jEv4I/AAAAAAAACF8/8anSURGDdAg/s144/happy_easter_20130331_img_2305.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/20130331?authuser=0&amp;feat=embedwebsite">2013-03-31</a></td></tr> </tbody></table> http://vogelchr.blogspot.com/2013/03/happy-easter.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-4172874310286898223Fri, 29 Mar 2013 16:08:00 +00002013-03-29T16:08:46.160+00:00Webmail Notifier - Linux HidrawI got myself a plastic toy: A small box with a controlable LED that can be turned on- or off, with the intention of notifying the user of unread emails.<br /> <br /> <a href="https://www.google.de/search?q=webmail+notifier&amp;tbm=isch">https://www.google.de/search?q=webmail+notifier&amp;tbm=isch</a><br /> <br /> My incarnation of this relatively simple concept identifies itself with a USB VID/PID of <kbd>0x1294:0x1320</kbd>:<br /> <br /> <code><br /> # lsusb -s 1:14<br /> Bus 001 Device 014: ID 1294:1320 RISO KAGAKU CORP.<br /> </code><br /> <br /> And it shows itself in the kernel log as follows:<br /> <br /> <code><br /> [10772.855386] usb 1-1.6: new low-speed USB device number 15 using ehci-pci<br /> [10772.949641] hid-generic 0003:1294:1320.000D: hiddev0,hidraw2: USB HID v1.10 Device [MAIL MAIL ] on usb-0000:00:1a.0-1.6/input0<br /> </code><br /> <br /> As it registers itself with the HID subsystem, we can use the resulting hidraw device to talk to it without using any script or tool, just make a convenience symlink with useable permissions using a small udev rule:<br /> <br /> <code><br /> $ cat /etc/udev/rules.d/99_webmail_notifier.rules <br /> # USB Webmail Notifier (RGB LED)<br /> SUBSYSTEM=="hidraw" SUBSYSTEMS=="usb", ATTRS{idVendor}=="1294", ATTRS{idProduct}=="1320", GROUP="users", MODE="0660", SYMLINK="webmailnotify"<br /> </code><br /> <br /> Then you can make it change its colour with a simple echo-command in any script:<br /> <br /> <code><br /> $ echo -en '\001\0\0\0\0' >/dev/webmailnotify <br /> </code><br /> <br /> The only ugly thing about it: It seems to send back some HID report which confuses and angers the kernel routines, but this shall be dealt with at some later point.<br /> <br /> <code><br /> [11170.163495] hid-generic 0003:1294:1320.000D: extract() called with n (56) > 32! (swapper/0)<br /> </code><br /> <br /> http://vogelchr.blogspot.com/2013/03/webmail-notifier-linux-hidraw.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-8741985623127556949Sat, 09 Feb 2013 12:41:00 +00002013-02-09T12:41:15.732+00:00AES/EBU to ‘SPDIF’  - ghetto style<br /> For interfacing <a href="http://en.wikipedia.org/wiki/AES3">AES/EBU</a> to <a href="http://en.wikipedia.org/wiki/S/PDIF">S/PDIF</a>, I've built a simple transformer out of a small ferrite core, I was planning to convert the 110Ω symmetric AES/EBU signal coming out of a surplus ADC/DAC (I love you, eBay ;-) ...) to the S/PDIF of my computer interfaces (and vice-versa).<br /> <br /> There's a <a href="http://rane.com/note149.html" target="_blank">nice text about all this</a> over at RANE, but normal people just shell out the 100€ for two of <a href="http://www.thomann.de/de/neutrik_naditbncmx.htm" target="_blank">Neutrik's transformers in a box</a>.<br /> <br /> The screenshots below show the output of the transformer, terminated by 75 Ohm (or by the audio-interface S/PDIF input, looks identical) when driven by the AES output. I wanted to hide everything in the XLR connector shell, and hence the ferrite beads are pretty small. Therefore they saturate visibly at 32kHz <i>f</i><sub>s</sub>, but it works fine for this signal direction. At 96kHz everything looks perfect.<br /> <br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/xgnpJqEJWFexCPTQL6OuOtMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="83" src="https://lh4.googleusercontent.com/-qRfwhmwl83I/URY3ScvQ2II/AAAAAAAACAA/eOHmTDNyh08/s144/compare_ferrite_32khz.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/KE00IxqQFXQ0FPbzowpIidMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="81" src="https://lh6.googleusercontent.com/-adlLLMgxB8g/URY3RHQ3NsI/AAAAAAAACAA/tvI53_kOLN8/s144/ferrite_96khz.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/tD_7nJoTpDmIdjJT_t3tStMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="108" src="https://lh3.googleusercontent.com/-JkxcnEj3Gdk/URY3mGOoZcI/AAAAAAAACAA/lXXUz9u9YrE/s144/AES_EBU_to_SPDIF_transformer.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/ChrisMiscellanea?authuser=0&amp;feat=embedwebsite">Chris’ Miscellanea</a></td></tr> </tbody></table> <br /><div> The other direction works not as nicely: All of my audio-gear has a pretty high output impedance on the S/PDIF outputs! With a open output, I get something like 3-5V<sub>PP</sub>&nbsp;of signal swing, but terminated it goes down to 500mV (just as the spec says). With the saturating ferrite beads, the high-impedance outputs cannot provide the additional current, and the ideally square-shaped output degenerates to tiny spikes of both polarities and is completely unusable. The not-very-pretty-but-working-solution: Just connect the SPDIF to AES 1:1, but keep cable lengths short. (no scope, screenshots, sorry).</div> http://vogelchr.blogspot.com/2013/02/aesebu-to-spdif-ghetto-style.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-7769386640924102560Mon, 14 Jan 2013 19:42:00 +00002013-01-14T20:14:01.191+00:00M-Audio Fast-Track Pro PCB PicturesI'm a little annoyed by the limitations of the M-Audio Fast-Track Pro, so I'm thinking about how to mod it. My main grief is the abysmally bad windows drivers that bluescreen constantly under Win7. Then there is the limitation of USB1.1, which does not have enough bandwidth for anything more than 2x24/96 streams. My plan is to make a <i>normal</i> standalone&nbsp;<a href="http://en.wikipedia.org/wiki/S/PDIF" target="_blank">S/PDIF</a> ADC/DAC (2in, 2out, 24/96) out of it.<br /> <br /> First, I took a few pictures of the two PCBs inside the unit, and traced a few signals. You can see immediately that the electronic layout of the unit is <i>very</i>&nbsp;tidy!<br /> <br /> Main integrated components:<br /> <ul> <li><a href="http://www.ti.com/product/tusb3200" target="_blank">Texas Instruments TUSB 3200</a> USB Streaming Controller</li> <li><a href="http://www.asahi-kasei.co.jp/akm/en/product/ak4114/ak4114.html" target="_blank">Asahi Kasei AK4114</a> S/PDIF Transceiver</li> <li><a href="http://www.asahi-kasei.co.jp/akm/en/product/ak5381/ak5381.html" target="_blank">Asahi Kasei AK5381</a> 24bit 96kHz ADC</li> <li>Asahi Kasei AK4381 24bit 192kHz DAC (<a href="http://www.asahi-kasei.co.jp/akm/en/product/ak4385/ak4385.html" target="_blank">compatible successor AK4385</a>)</li> </ul> <div> Misc. Digital</div> <div> <div> <ul> <li><a href="http://www.nxp.com/products/logic/digital_multiplexers/series/74LVC157A.html" target="_blank">74LVC157A</a>, Quad 2-Input Multiplexer</li> <li><a href="http://www.atmel.com/devices/at24c64.aspx" target="_blank">AT24C64</a> Atmel 64kBit <a href="http://en.wikipedia.org/wiki/I%C2%B2C" target="_blank">I2C</a> EEPROM</li> </ul> </div> </div> <div> The <a href="http://en.wikipedia.org/wiki/Phantom_power" target="_blank">phantom</a> voltage <a href="http://en.wikipedia.org/wiki/Cockcroft%E2%80%93Walton_generator" target="_blank">generator</a>&nbsp;has a venerable <a href="http://en.wikipedia.org/wiki/555_timer_IC" target="_blank"><b>NE555</b></a>!<br /> <br /> OP-Amps</div> <div> <ul> <li><a href="http://semicon.njr.co.jp/eng/product/opamp/NJM2115.html" target="_blank">NJM2115</a>&nbsp;NRC Dual Operational Amplifier</li> <li><a href="http://semicon.njr.co.jp/eng/product/opamp/NJM3414A.html" target="_blank">NJM3414&nbsp;</a>NRC Single Supply Dual High Current Operational Amplifier (Headphone Out)</li> </ul> </div> <br /> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/CnVjsCwO_5n0agOKr6Bgw9MTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="108" src="https://lh6.googleusercontent.com/-6Sl_6Ofk9nw/UPRRihRDmyI/AAAAAAAAB5s/FKxArQivZ3c/s144/ftpro_bot_assy_component_side_img_2130.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/MAudioFastTrackPro?authuser=0&amp;feat=embedwebsite">M-Audio Fast Track Pro</a></td></tr> </tbody></table> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/qizmPBzEREzIiGmBtHImddMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="144" src="https://lh3.googleusercontent.com/-WYE1QQ1tVB0/UPRRXRP1JBI/AAAAAAAAB6s/jEtHmi0NlQk/s144/ftpro_bot_assy_solder_side_img_2131.jpg" width="108" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/MAudioFastTrackPro?authuser=0&amp;feat=embedwebsite">M-Audio Fast Track Pro</a></td></tr> </tbody></table> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/VJlqVyyOGjUFFxpa2Mbw4NMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="108" src="https://lh6.googleusercontent.com/-aEyWpU3TarA/UPRRllRjTZI/AAAAAAAAB50/hZoHfI3d0Z0/s144/ftpro_top_assy_component_side_img_2133.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/MAudioFastTrackPro?authuser=0&amp;feat=embedwebsite">M-Audio Fast Track Pro</a></td></tr> </tbody></table> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/xytNwiU40ZR_JKhcXECtptMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="108" src="https://lh3.googleusercontent.com/-zo5wcjJwU3s/UPRR6RLtIRI/AAAAAAAAB6I/3pzECENzPx0/s144/ftpro_top_assy_solder_side_img_2134.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/MAudioFastTrackPro?authuser=0&amp;feat=embedwebsite">M-Audio Fast Track Pro</a></td></tr> </tbody></table> <br /> <table style="width: auto;"><tbody> <tr><td><a href="https://picasaweb.google.com/lh/photo/LQanzOA7IBpWsR77-JMUHtMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img height="75" src="https://lh3.googleusercontent.com/-oTlF02ru5RA/UPRQKf2t4fI/AAAAAAAAB5Q/FXvpgVVwlGE/s144/bot_pcb_components_img_2130_v1_crop.jpg" width="144" /></a></td></tr> <tr><td style="font-family: arial,sans-serif; font-size: 11px; text-align: right;">From <a href="https://picasaweb.google.com/102970072923818524447/MAudioFastTrackPro?authuser=0&amp;feat=embedwebsite">M-Audio Fast Track Pro</a></td></tr> </tbody></table> http://vogelchr.blogspot.com/2013/01/m-audio-fast-track-pro-pcb-pictures.htmlnoreply@blogger.com (Christian Vogel)5tag:blogger.com,1999:blog-7098474.post-505058985737831968Thu, 10 Jan 2013 15:45:00 +00002013-01-10T15:45:12.583+00:00Note: Archlinux and Xorg Keyboard Layout<a href="https://www.archlinux.org/" target="_blank">Archlinux</a> for me seems to miss any <a href="http://catb.org/jargon/html/M/magic.html" target="_blank">magic</a>&nbsp;that takes care of automatically providing the correct keymap to <a href="http://www.x.org/archive/X11R7.5/doc/man/man4/evdev.4.html" target="_blank">xorg's input driver</a>. To make udev provide the correct settings to xorg, this small udev-rule works.<br /> <br /> <pre>[root@fbsd ~]# cat /etc/udev/rules.d/99_keyboard_keymap.rules SUBSYSTEM=="input", ENV{ID_INPUT_KEYBOARD}=="1", ENV{XKBMODEL}="pc105", ENV{XKBLAYOUT}="de", ENV{XKBVARIANT}="nodeadkeys" </pre> <br /> So far it's understood by xorg just fine.<br /> <br /> <pre>[ 2888.705] (II) XINPUT: Adding extended input device "Das Keyboard" (type: KEYBOARD, id 8) [ 2888.705] (**) Option "xkb_rules" "evdev" [ 2888.705] (**) Option "xkb_model" "pc105" [ 2888.705] (**) Option "xkb_layout" "de" [ 2888.705] (**) Option "xkb_variant" "nodeadkeys" </pre> <br />http://vogelchr.blogspot.com/2013/01/note-archlinux-and-xorg-keyboard-layout.htmlnoreply@blogger.com (Christian Vogel)0tag:blogger.com,1999:blog-7098474.post-9032390040032396575Fri, 28 Dec 2012 18:42:00 +00002012-12-28T18:42:44.348+00:00☠⚠⚡☔☣☢☹⛈ Windows 8...Got myself Win8 for €30 (upgrade from a old Student-for-Free Vista license I never used, instead of €150 it looked like a bargain). My normal computer went bad, and I'm playing with a replacement device while waiting for replacement parts to arrive.<br /> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="http://www.heise.de/ct/schlagseite/2013/1/" target="_blank">http://www.heise.de/ct/schlagseite/2013/1/</a></div> <div class="separator" style="clear: both; text-align: center;"> <img border="0" src="http://www.heise.de/ct/schlagseite/2013/1/klein.jpg" /></div> This Metro-bathroom-tiles stuff is so incredibly distracting when you want to do real work. Click on a mp3 file, ... *BAM!* fullsceen mp3 player (how could I ever live without such a thing. I mean, music players are meant to get your full attention while reproducing the music). Add a printer? *BAM!* Fullscreen "Add a device" app.<br /> <div style="font-style: normal; font-weight: normal; margin: 0; text-decoration: none;"> <br /></div> <div style="font-style: normal; font-weight: normal; margin: 0; text-decoration: none;"> The builtin graphics drivers of the rather old Nvidia Quadro always crash when trying to accellerate video decode. There's a<a href="http://de.dvbviewer.tv/wiki/DXVAChecker"> <em>third party tool to turn</em></a><em> it off,</em> recommended frequently because it seems to be pretty normal that video accelleration crashes, with a lot of different graphics cards. One of my soundcards is no longer supported, the other one (M-Audio Delta 44) has the usual fucked-up drivers all "Pro Audio" gear has, because all these companies universally employ morons to do the programming who eventually <a href="http://forums.m-audio.com/archive/index.php/t-29933.html">just pick lame excuses out of their ... </a>Oh my, I'm angry..</div> <div style="font-style: normal; font-weight: normal; margin: 0; text-decoration: none;"> <br /></div> <div class="separator" style="clear: both; text-align: center;"> <a href="http://2.bp.blogspot.com/-2JxK_BMDrPc/UN3kQRn5cAI/AAAAAAAAB0I/k-qxZ73HaJ4/s1600/windows_crash_nvidia_maudio.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-2JxK_BMDrPc/UN3kQRn5cAI/AAAAAAAAB0I/k-qxZ73HaJ4/s320/windows_crash_nvidia_maudio.png" width="320" /></a></div> <div style="font-style: normal; font-weight: normal; margin: 0; text-decoration: none;"> <br />Apparently <a href="http://www.google.de/search?q=skype+windows+8+rubbish">"Skype" is now built in</a>. But: It refuses to let you use it without converting your "old" skype account into a "Windows live ID". And I learned that the new bathroom-tile-version doesn't do file-transfer. WTF?!<br /><br />Sorry, Microsoft, I really wanted to try out this new thing and tried to be open about it, but you made usability for non "<em>grandma got a tablet PC for Christmas</em>" users really abysmally bad, I'm quite frustrated after only a few hours of light use.<br /><br />And I cannot understand how this usage paradigm of full-screen apps should map to people doing actual work, instead of browsing the web and playing with facebook. And I cannot understand why it cannot be disabled completely (with tile-apps running in a window, for example).</div> <br /><br /> When the parts for my other PC (the motherboard apparently went bad the last few weeks, with LAN and SATA controller deteriorating) arrive tomorrow or on monday, I'm pretty sure what OS I'll NOT install.http://vogelchr.blogspot.com/2012/12/windows-8.htmlnoreply@blogger.com (Christian Vogel)0