<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>tg</title><link href="http://tg.gstaedtner.net/" rel="alternate"></link><link href="http://tg.gstaedtner.net/feeds/category-tricks.atom.xml" rel="self"></link><id>http://tg.gstaedtner.net/</id><updated>2015-01-04T04:02:38+01:00</updated><entry><title>Finding serial interfaces for beginners</title><link href="http://tg.gstaedtner.net/2015/01/04/finding-serial-interfaces-for-beginners/" rel="alternate"></link><updated>2015-01-04T04:02:38+01:00</updated><author><name>Thomas Gstaedtner</name></author><id>tag:tg.gstaedtner.net,2015-01-04:2015/01/04/finding-serial-interfaces-for-beginners/</id><summary type="html">&lt;p&gt;What I'm describing here probably isn't news for a lot of people, but I think some might find it useful anyway.
If you're tinkering with any embedded device and don't really know how to get started, it always makes sense to look for a UART interface where you might be able to get a console interface to the device.&lt;/p&gt;
&lt;p&gt;But how to find it?
Turns out this is usually really easy!&lt;/p&gt;
&lt;h1&gt;Needed:&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Device&lt;/li&gt;
&lt;li&gt;Multimeter with 2 probes&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;How?&lt;/h1&gt;
&lt;p&gt;Usually the UART interfaces are extremely simple and operate at 3.3 V.
Basically you need only 3 contact points on the board for a full console.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;TxD: This is where the board sends data&lt;/li&gt;
&lt;li&gt;RxD: This is where it receives&lt;/li&gt;
&lt;li&gt;GND: Just a grounded connection  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Usually the boards have a connector or some pads with 4-8 connections, best look for a connector with 4 Pins first. Additionally this will include a &lt;em&gt;VCC&lt;/em&gt; connection, this is a connection directly to the boards power. Usually this will be 3.3 V and you should find this pin, but not touch it (as we don't need it).  &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Set your multimeter to continuity testing (or if not available to low Ohm measurement)&lt;/li&gt;
&lt;li&gt;Find the GND pin. To do so, just touch your probe to a known grounding point, which might be a pad on the board labeled GND, or if there is no marked one, use a metal shielding of some component or the metallic border of a drill hole.&lt;/li&gt;
&lt;li&gt;Turn on your device.&lt;/li&gt;
&lt;li&gt;Set your multimeter to single digit voltage scale (x.yz V).&lt;/li&gt;
&lt;li&gt;Find the VCC pin. This one will have consistent 3.3 Volts - measure against GND.&lt;/li&gt;
&lt;li&gt;Find the TxD pin. Here you will see changing voltage. It will change between 1.5 V and 3.3 V.&lt;/li&gt;
&lt;li&gt;Find the RxD pin. It is probably next to the TxD pin and will show no voltage.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If the steps are successfull you very likely have found your UART interface!&lt;/p&gt;
&lt;h1&gt;Moving on&lt;/h1&gt;
&lt;p&gt;Now to find out if it really is an UART and to access the interface, you'll to connect via a serial console program. It's however not as easy as just attaching your RS232 adapter, because it operates at 5 Volts.&lt;br /&gt;
Instead you'll either need a level shifter, or easier, a integrated device that does this for you.
I'm using a &lt;a href="http://dangerousprototypes.com/docs/Bus_Pirate"&gt;bus pirate&lt;/a&gt;, a inexpensive and really nifty device that is useful in a lot of other situations.  &lt;/p&gt;
&lt;p&gt;Just connect the TxD, RxD and GND pins to the devices appropriate connectors. Again, you won't need VCC, so don't connect it.
To find out the baud rate, its easiest just to guess try. Fast devices will often use 115200 bauds, other than that 9600 and 38400 bauds are very common.&lt;/p&gt;
&lt;p&gt;I've made a little sketch that shows you what this will look like on many devices.
The black dot would be a GND point, below the 2 drill holes.
&lt;img src="//gstaedtner.net/images/sonstiges/uart.jpg" alt="UART" width="100%"/&gt;&lt;/p&gt;</summary><category term="other"></category></entry><entry><title>Using a google account as OpenID</title><link href="http://tg.gstaedtner.net/2012/05/25/using-a-google-account-as-openid/" rel="alternate"></link><updated>2012-05-25T18:40:00+02:00</updated><author><name>Thomas Gstaedtner</name></author><id>tag:tg.gstaedtner.net,2012-05-25:2012/05/25/using-a-google-account-as-openid/</id><summary type="html">&lt;p&gt;You might have a Google account, and encountered various websites and
services who allow you to log in with for example a Facebook account,
a Google account or an OpenID account.&lt;/p&gt;
&lt;p&gt;As usual, Facebook wants (or rather forces) you to use their services exclusively,
so if a Facebook login is the only possibility, you're screwed.&lt;/p&gt;
&lt;p&gt;Google however tends to use open systems, and they do this for logins, too.
Even if a website requires you to log in using your Google account,
it is using Googles OpenID services.
Unfortunately you're still screwed: if the site supports the Google account excuisively,
it will have the Google OpenID URI hardcoded.&lt;/p&gt;
&lt;p&gt;Now for the good news: if a site offers OpenID login directly,
you cannot only use any OpenID provider you'd like, you can also use your Google account.
Unfortunately, it is (imho) less than obvious - Google doesn't provide a short, practical URI for this purpose.
The Google OpenID URI is &lt;a href="https://www.google.com/accounts/o8/id"&gt;https://www.google.com/accounts/o8/id&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Not terrible, yet inconvenient, because you'll have to type it in if there is no huge "Google Login" button.&lt;/p&gt;
&lt;p&gt;To make it easier, I first tried various link-shorteners, but this usually doesn't work,
because redirections are usually not possible at OpenID logins.
Also, while Google allows you to use your "Google Profile" for HTML redirections,
this requires you to have a Google+ account, which you might not want to have.&lt;/p&gt;
&lt;p&gt;However, there is a solid possibility, using your own domain: Just do a hard rewrite.&lt;/p&gt;
&lt;p&gt;In &lt;a href="http://www.nginx.org"&gt;nginx&lt;/a&gt; this could be done like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;server {
    listen [::]:80;
    server_name id.example.tld;
    rewrite ^ https://www.google.com/accounts/o8/id permanent;
}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now just type id.example.tld in your OpenID login field, an Google will log you in.
For other webservers it should work in a similar fashion.&lt;/p&gt;</summary><category term="other"></category></entry><entry><title>Flashrom support for AMD SP5100?</title><link href="http://tg.gstaedtner.net/2011/09/13/flashrom-support-for-amd-sp5100/" rel="alternate"></link><updated>2011-09-13T23:30:00+02:00</updated><author><name>Thomas Gstaedtner</name></author><id>tag:tg.gstaedtner.net,2011-09-13:2011/09/13/flashrom-support-for-amd-sp5100/</id><summary type="html">&lt;p&gt;I recently bought a very neat little Supermicro mainboard, with AMD's Socket C32 and a SP5100 chipset.&lt;/p&gt;
&lt;p&gt;I did so because it is neat hardware, I needed to replace my home-server - and mainly because it is supported by &lt;a href="http://www.coreboot.org/"&gt;Coreboot&lt;/a&gt;.
Unfortunately, it turns out that there is no version with a socketed BIOS chip out there (and resoldering a SOIC16 socket isn't easy) despite some pictures showing it.
Even more unfortunate was that it turned out that &lt;a href="http://www.flashrom.org"&gt;flashrom&lt;/a&gt; didn't support flashing the board either.&lt;/p&gt;
&lt;p&gt;The reason for this is, that AMD's Soutbridge 700 series makes noise on the SPI bus with its IMC (Integrated Microcontroller), so you can't safely flash because data gets corrupted.&lt;/p&gt;
&lt;p&gt;Luckily AMD has recently released a new version of the SB700/SP5100 &lt;a href="http://support.amd.com/us/Embedded_TechDocs/44413.pdf"&gt;register datasheet&lt;/a&gt; that documents how to turn the IMC off, and Frederic Temporelli has already added support which is waiting for inclusion in flashroms inbox: &lt;a href="http://patchwork.coreboot.org/patch/3326/" title="AMD - SP5100 - take SPI ownership (1/2)"&gt;1/2&lt;/a&gt; and &lt;a href="http://patchwork.coreboot.org/patch/3323/" title="AMD - SP5100 - take SPI ownership (2/2)"&gt;2/2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I haven't tried it out yet, but I'll do so in the next couple of days.&lt;/p&gt;</summary><category term="other"></category></entry><entry><title>Bluez and the Keyboard</title><link href="http://tg.gstaedtner.net/2010/11/01/bluez-and-the-keyboard/" rel="alternate"></link><updated>2010-11-01T06:28:00+01:00</updated><author><name>Thomas Gstaedtner</name></author><id>tag:tg.gstaedtner.net,2010-11-01:2010/11/01/bluez-and-the-keyboard/</id><summary type="html">&lt;p&gt;I recently bought a nice little &lt;a href="http://usb.brando.com/mini-plam-size-bluetooth-multimedia-keyboard_p01652c034d015.html"&gt;bluetooth keyboard&lt;/a&gt;.
Being bluetooth based and supporting the standard hid protocol, I didn't expect any trouble at all.&lt;/p&gt;
&lt;p&gt;But I was wrong.&lt;/p&gt;
&lt;p&gt;After charging the keyboard and putting it in pairing mode, I tried &lt;em&gt;hidtool scan&lt;/em&gt; - but it didn't find it.
I checked my other bluetooth devices, and they were found - but they also found the keyboard.&lt;/p&gt;
&lt;p&gt;Long story short: Turns out it was a &lt;a href="https://bugs.gentoo.org/show_bug.cgi?id=343367"&gt;bluez bug&lt;/a&gt; - thanks to Pacho Ramos for the hint.&lt;/p&gt;
&lt;p&gt;As all howtos and so on only cover some GUI frontends for Gnome and KDE, as well as the old (and deprecated) hidd, it wasn't that trivial to get the keyboard to work even after it was finally discovered by hcitool.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;jhe&lt;/em&gt; in #bluez-users on freenode gave me a brief description on how to do pairing without all the stuff mentioned above:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Install bluez with USE="test-programs" set &lt;/li&gt;
&lt;li&gt;Set the device to pairing mode&lt;/li&gt;
&lt;li&gt;Use &lt;em&gt;hcitool scan&lt;/em&gt; to get the device address&lt;/li&gt;
&lt;li&gt;Run &lt;em&gt;simple-agent hci0 $(hid device address)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Enter PIN on both sides, PC first, Keyboard second&lt;/li&gt;
&lt;li&gt;Run &lt;em&gt;bluez-test-input connect $(hid device address)&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;After that it works fine.&lt;/p&gt;
&lt;p&gt;Using a frontend might be more viable though, seems the bluez distribution is not supposed to include the necessary tools, the test-programs are only optional.&lt;/p&gt;</summary><category term="gentoo"></category></entry></feed>