Where Physics meets life

27.12.2009 20:18

Last Monday dr. Aneta Stefanovska of Lancaster University Nonlinear Biomedical Physics group gave a talk at the Faculty of Mathematics and Physics in Ljubljana about their ground breaking work in modeling and interpreting signals present in humans and other living organisms. I did some research in signal analysis with her during my undergraduate study and visited the group in Lancaster almost four years ago.

I would like to share two points from the talk that I found fascinating.

They are modeling the electrical signals produced by the lower functions of the brain, heart and lungs as coupled oscillators. The idea is that each organ consists of a self-sustaining oscillator with its own resonant frequency that is to some degree affected by oscillations in other organs. This is similar to coupled oscillators in electronics (or Huygens' clocks in mechanics). The interesting point is that through signal analysis you can detect the noise entering this system of oscillators and that this noise is connected to the conscious thought processes of a person. So for example if a subject is unconscious under anesthesia the noise is gone and the oscillations are be better synchronized.

This research was mostly done for medical purposes, to develop a way of assessing the level of unconsciousness. So a part of the talk was also about how anesthetic drugs work. The leading theory is that the drugs modify the neuron's chemistry in a way that prevents rapid firing (i.e. they lengthen the time it takes to recover from an impulse). Processes required for conscious thought seem to need a higher frequency for neural connections than simple oscillators for basic life support like breathing and keeping the heart beating. So those continue to work while anything required to process data from the outside world is basically switched off.

What I understood as the message of the talk was that while we're still far away from completely understanding the human body, some things are starting to map surprisingly well to what you would expect from a mechanical or electrical machine. Imagine measuring the noise on a power rail caused by switching gates in an otherwise inaccessible VLSI CPU and trying to deduce the inner structure from it. Or for example increasing the dampening so that the gigahertz circuitry in the CPU stops working while PWM for fans and the switching power supply keeps running.

Posted by Tomaž | Categories: Life | Comments »

Normality restored

25.12.2009 18:04

The day before yesterday the ADSL modem connecting my server to the internet went belly up. I called the national ISP's technical support and was actually quite surprised when they quickly established that their modem is to blame (my previous experience was that they aggressively stick to the "reboot windows, check control panel settings" routine for all problems).

So yesterday a technician came and replaced the modem. tablix.org is back on-line and I can read my mail again. However instead of the old vanilla modem he installed some fancy new thing that among other things can also work as an ADSL modem.

Sinope 568+

The new device is a Sinope 568+ from Iskratel. It literally includes everything plus a kitchen sink - a PPPoE client, DHCP, DNS servers, HTTP proxy with a built-in censorware (a.k.a. parental control), VOIP, ... and 802.11abg hardware. In other words, everything I don't need. And what's worse, it appears all these capabilities are potentially under the direct control of the benevolent (?) ISP. At least judging by the instruction manual that says that if you can't set something up you just call support and they set it up for you remotely.

Somehow I'm not exactly content with the idea that there's a wireless transceiver in the house that's not under my control. Now I'm playing with the idea to replace the antenna with a nice little 50Ω terminator.

The particular device I got was obviously second hand, because it was already set up with a wireless SSID "Kresho" and a password I didn't know. After some experimenting I found that factory settings can be restored by holding the reset button while power-cycling the modem.

UPS load after replacing old ADSL modem with Sinope 568+

All these useless features also come with a power price. My UPS load went up 15% after Sinope was installed. I guess that is considered progress these days.

Posted by Tomaž | Categories: Digital | Comments »


13.12.2009 22:44

Went to see 2012 yesterday. Not as bad as I expected. As far as omg, we're all going to die movies go, I would put it somewhere after The Core and before Sunshine. At least with Core I felt that the authors tried to be a bit humorous about the obvious scientific weak points in the plot (calling the material "unobtainium" for instance). 2012 doesn't have anything like that to cover for their abuse of neutrinos and alignment of the galactic core with our unfashionable little solar system.

There's full of breath-taking CG graphics, of course. For some reason the city scenes kept reminding me of an old Californication music video. Most of them are quite good actually, but there are some weird spots. Like the shockwave from the explosion in Yellowstone that bends large trees in the fashion of old atomic bomb test videos but leaves people standing. Also, I don't think that whoever devised the scene where the dome of St. Peter's in Rome rolls around had the basic understanding of how domes work and what holds them together.

I'm most impressed by the mobile telephony operators of 2012 - cell phones of the future appear to work anywhere and anytime. Even in a metal hull of an airplane or in a remote location that is in the process of being blown to pieces by a volcano. But few movies get this right (don't they use cellphones in Hollywood?)

Ships. I was kind of disappointed they weren't of the spacefaring kind. I guess space travel isn't fashionable these days. Or perhaps that would mean too much deviation from a biblical flood theme. The boy's name was Noah - can they be any more obvious?

It's funny that ships appeared to be diesel powered (there was that characteristic puff of black smoke when they started their engines). Not really something you would expect from a vessel that is designed to operate for more than a year without a port to refuel. I guess nuclear technology isn't fashionable either (especially if it's built by the Chinese) and you probably don't care about global warming at that point.

Last but not least, this is the kind of movie that does the "oh, the religion/ancient cultures/astrologists/etc. knew it all the time and we scientists didn't have a slightest idea" trick, which by itself excludes a movie from my favorites list.

Posted by Tomaž | Categories: Life | Comments »

Thinkpad T61 woes

12.12.2009 22:36

I'm using a Thinkpad T61 laptop as my main computer at work. Thinkpads appear to have a reputation of being reliable, well-built laptops that are relatively pain-free when running Linux. Unfortunately my experience in the previous two years has been a bit different than that.

The last one in the row of problems appeared on Friday, when the laptop started randomly crashing. The screen would freeze and the capslock light would start flashing a couple of minutes after each reboot, signaling a kernel panic.

Since nothing like that has happened since I started using this computer two years ago, I first suspected a hardware failure. I ran memtest86+ and it did found a fault in one of the 2 GB SODIMMs installed. I replaced the bad board and memtest86+ ran for 12 hours without detecting any more faults. I also ran the official Lenovo diagnostics and it found nothing wrong with the rest of the hardware (by the way, the part that tests NVIDIA GPU could have easily gotten a place in a modern arts gallery).

However, the crashes kept occurring. Then I did some more through Googling and found Debian bug #512696 "Kernel panic when using iwl4965". That got my attention because I recently experimented with 2.6.30 kernel from Debian Squeeze (otherwise I use the stable Lenny). I found that firmware-iwlwifi package did in fact get upgraded to 0.18 and when I went back to kernel from Lenny it didn't downgrade as well.

So I forced a downgrade back to version 0.14+lenny2 from Lenny and the crashes now seem to be gone for good.

The only thing still bothering me about this is that it appears I was using faulty RAM without noticing for who knows how long. I wonder how many files got silently corrupted because of that? How many unexplainable crashes in the software I'm working on at work were caused by it?

Update: Ok, I'm not sure what was wrong here, but firmware-iwlwifi 0.14+lenny2 was also causing kernel panics. Now I'm using firmware-iwlwifi 0.18 and linux-image-2.6.30-2-686-bigmem 2.6.30-8 and so far I've been lucky.

Posted by Tomaž | Categories: Code | Comments »

Walls around walled gardens

09.12.2009 21:21

On computers that I trust with private personal information (like credit card numbers, personal e-mail, etc.) I strictly use only open-source software. Although I know this doesn't give perfect security, I still believe the chances of someone shipping malware in such applications for any significant amount of time are pretty low.

However, sometimes the real world interferes with this policy and I'm forced to use some binary blob. For example, we use Skype extensively in Zemanta for communicating between our offices around the world. Another more recent example is Google Chrome browser, which I had to install to test the new extension.

Google ships the latest beta of Chrome as a Debian package. This normally requires root privileges to install, which also means that you're giving root access to the system to any post- or pre-install scripts Google might include in the package. Yeah, right.

However, even if you skip the normal installation process, running untrusted code in your normal user account is asking for trouble. Everything I care on my computer is accessible from my normal user account. Plus it's trivial to do nasty stuff behind a user's back even if you only have access to his account and in a way that is only detectable when logged in from another account (not something I do often).

So, how did I run Google Chrome in a safe way on my computer?

First I created a normal, unprivileged account.

# adduser chrome

I used pwgen to generate a long, random password for the account.

Then I downloaded and unpacked the Google's official Debian package into the home directory of the user I just created.

# cd /home/chrome
# dpkg -x google-chrome-beta_current_i386.deb .

Now, the only step left is to run opt/google/chrome/google-chrome with the chrome UID.

Chrome needs to access your X server in order to display things on the screen and arranging that is not very straight-forward. However, Gnome comes with this helpful little utility called gksu that takes care of all book keeping for you and also allows you to save the chrome user's password so you don't need to enter it each time you start Chrome.

$ gksu -u chrome /home/chrome/opt/google/chrome/google-chrome

And this is it. Chrome should start up and it will only be able to access and modify things in its home directory. Depending on your own home directory permissions it might not even be able read your documents. It's possible to make sharing files between your and Chrome's account pretty painless, but that is left as an exercise for the reader. The command line above can also be converted to a Gnome Panel launcher for one-click start-up.

To eradicate all traces of Chrome, you only have to delete chrome user account and all files owned by it.

This same method works for Skype and probably other proprietary software. The only thing to keep in mind is not to run anything that came from an untrusted source under any other than its very own, special, limited account. Also note that as long as an untrusted application is displaying things on your X server, it can record and intrude on anything you do on that X server, even in other windows. However, once it's stopped (and you can easily check that by looking for processes running under its user account), things should be secure again.

Posted by Tomaž | Categories: Code | Comments »

901's belly button

04.12.2009 15:00

When I was replacing the left mouse button on my EeePC 901 the other day, I turned the motherboard around for the first time. Interestingly, there's a button there that doesn't seem to serve any purpose. It faces a solid plastic wall, so there's no way to get to it while the computer is in operation.

Button on the bottom side of the EeePC 901's motherboard

I wonder what's it for. Some kind of an alarm if the laptop's case was opened? But as far as I can see it doesn't get pressed when the case is assembled. Is it a vestigial reset button? Maybe the pinhole under it was scrapped as a cost-cutting measure.

It would be nice if Asus would include it as a spare mouse button, but unfortunately it has a completely different shape and size.

Posted by Tomaž | Categories: Digital | Comments »

Replacing mouse button on an EeePC

02.12.2009 18:56

A couple of weeks ago the left button on the touch pad of my EeePC 901 stopped working. At first it only skipped a click now and then, but it soon became completely unusable. It appears that I'm not alone with this problem.

I took the laptop apart and it was immediately obvious that the SMD tactile switch wasn't making a contact when it should be.

SMD tactile switch on EeePC 901 (left mouse button)

The switch itself is pretty special, so it wasn't easy to find a replacement. It has a standard 6x6 mm footprint with gull-wing SMD connections, but a very low profile (the top of the button is only 3.1 mm above the circuit board). Plus, it has a fifth connection for grounding its metal case.

After some time consuming searching (where's that semantic web when you need one?), I found a perfect match: APEM DTSGZM-62N. However, it turned out to be impossible for me to get it in any reasonably low quantity.

The Diptronics DTSMW-66N, as pointed out by Carl on his blog, proved to be a satisfactory replacement and was available from the local electronics shop. This switch has the same outside dimensions as the original, except the button is concealed inside a raised edge. The 901 has an extra millimeter of space under the touch pad (unlike 701) and the button is pressed by a needle that fits inside the circumference, so the raised edge isn't a problem and no other modifications were necessary. This Diptronics switch doesn't have a grounding connection, but as far as I can see, this doesn't affect its operation or the operation of the capacitive touch pad above it.

DTSMW-66N as left mouse button on EeePC 901

When I replaced the switch, the left click still wasn't working. After some more extensive searching for further faults I found that I must have had accidentally broken a minute PCB trace running from the button's contact to a tiny SMD capacitor nearby. I did a quick fix by bridging the gap with a blob of solder (you can see it at the button's top right pad on the photo above).

Now the left click is finally working again. Although the replacement switch has the same rated operation force (1.6 N) as the original, the button now feels slightly softer.

I must say that by now I'm severely disappointed with the quality of buttons and switches I'm seeing lately. I had to fix 901's hot keys when the computer was brand new and I'll only mention my terrible experience with the Happy Hacking Keyboard.

Posted by Tomaž | Categories: Digital | Comments »