Yenya's World

Thu, 19 Dec 2013

Arduino SCX Digital to USB interface

I have a SCX Digital slot cars set, and some years ago I bought an interface box for connecting it to the PC using a RS-232 serial port. PC then can be used as a timer, lap counter, and race management. Now I wanted to make some modifications to the firmware (it uses AVR Tiny 2313 chip). I have discovered that the author does not sell this version anymore, it has been replaced by a newer version with USB. So I kindly asked the author whether he can provide me the source code for the firmware for the old version. I have got the following reply:

Hi Jan
Sorry, I do not share any of my software.

Well, whatever. It is of course his choice to keep the firmware of the abandoned version for himself. But in the meantime, I've got some experience with electronics and microcontrollers (see my other projects).

Introducing SCXreader, my own SCX-to-PC/USB interface, built with Arduino Nano. It is fully open, including the source code of the firmware. It costs about US$ 6.50, way less than the current SCX-to-USB SEB interface.

Section: /computers (RSS feed) | Permanent link | 8 writebacks

Wed, 27 Nov 2013

Proprietary Applications

Welcome to the Rant of the month series, today about the proprietary web applications: The Web is more and more becoming a set of isolated proprietary islands, instead of being the deeply interconnected, how to say it, web. Lots of information, and even my friends, are disappearing behind the proprietary systems.

For example, I would like to get news from @whatifnumbers, preferably via RSS, but apparently it is not possible. Twitter used to have a RSS export, but it has been recently disabled. I, of course, have no intention to use a Twitter account (I think I created one long time ago, but I never used it).

Another examples are Google+ and Facebook: how do you stay in touch with your friends who have an account on only one of these systems? (Or none of them, like myself?) I have managed to create a RSS feed of one of my friends' G+ account, but the feed of course contains only the public posts.

We are moving from the world where people develop applications which everybody can install and run themselves (blogging systems, mail servers, web galleries, etc.) to the world where there is only a single instance of an important application, with no possibility to run my own copy.

Section: /computers (RSS feed) | Permanent link | 2 writebacks

Mon, 16 Sep 2013

3D Printer

Apparently 3D printers can nowadays be built for a moderate price, and their quality is improving. Also, there is a project called RepRap for developing open-source 3D printer (including design of components, Arduino as a controller board, firmware, CAD, and host software).

There are too many variants to choose from, so I was glad to discover RepRap Workshop, where it is possible to build and configure the 3D printer Průša i3 from the RepRap project under the supervision of somebody who has already built several 3D printers and has lots experience with them. All the parts and electronics were included in the price of the workshop.

My printer prints correctly, but still needs configuration tweaking. In the last image there are parts of this object from the open source repository of 3D objects called Thingiverse. I have printed it scaled by 0.7, but the other two parts were too brittle and their pins snapped off. I am looking forward to print more objects, for example LED lens holders for my Bike Lights project.

Section: /computers (RSS feed) | Permanent link | 2 writebacks

Mon, 01 Jul 2013

Transparent Internet

The times when the Internet was considered a transparent network, which relayed any kind of Layer 4 frames, as long as they were properly encapsulated in Layer 3 - the Internet Protocol version 4 (and version 6, recently) - are apparently gone forever.

The Network is not even supposed to look inside the Layer 3 payload, yet some core switches apparently handle a particular L7 protocol in a special way. I wonder whether we are now in state of TCP, UDP, and ICMP being cast in stone, and no way of deploying a whole new L4 protocol, or a substantial modification of current L4 protocols (do you remember TCP ECN fiasco, anyone?).

With NATs and firewalls being the integral part of the Internet, the situation is probably even worse. Not only L3 and L4 are cast in stone, but application protocols as well. These times, everybody seems to tunnel their data over HTTP, as this is the only protocol, which can be expected to pass over this mess of NATs and prohibitedly configured firewalls.

So let's hold a minute of silence for the end-to-end transparent Internet, which is apparently gone forever.

Section: /computers (RSS feed) | Permanent link | 0 writebacks

Thu, 30 May 2013

GPS Tracking Systems

I use my smartphone in addition to the cyclocomputer in order to be able to record my speed, and later compare the speeds at the same place amongst various conditions. The problem is what to use for tracking and what for reviewing and comparing the recorded tracks?

So far I record the tracks using Move! Bike Computer on my Android phone. It is far from ideal, but at least it stores tracks as a GPX files which are accessible directly from the flash. It uses 1-second intervals, and as a bonus, it can display the track using Google maps. The drawback is that it sometimes does not switch the GPS on, so it needs to be switched on manually from the Android top bar menu. The other drawback is that while it can send the GPX files by e-mail to the desktop computer, it does not remember the prefered export format (GPX instead of KML for me) and the prefered export method (e-mail using K-9 mail to a predefined address). So sending tracks from my phone for further archivation is not so easy. But at least it can be done. Another problem is the start and end of the track: I usually start this app before leaving home, and stop it some minutes or hours after reaching the destination. The recorded tracks then cannot be easily compared, because their durations vary in the order of tens of percent, even though the real time of activity is roughly the same. The auto start/stop feature of the cyclo computer is much more precise - the GPS always report at least some movement because of its imprecision and noise.

As for the viewer, the situation is even worse. So far the best I have found is Endomondo, (and "the best" here does not imply "good" at all). Endomondo can import the tracks in the GPX format, and display them on top of Google map, can generate the speed and height profile, etc. On the other hand, it is way too skewed to training and fitness (computing calories, etc.), and has way too much useless social features. It also has its own proprietary Android App, which makes sending data to Endomondo easier, but with this app it is impossible to get your own data back in an open format. Moreover, when importing GPX data with 1 second granularity, Endomondo rescales it to something more coarse (tens of seconds to even minutes), so it makes comparing the speed at a given place pretty meaningless.

What do you use for your sports tracking, and how does it meet your data accessibility and openness requirements?

Section: /computers (RSS feed) | Permanent link | 0 writebacks

Fri, 24 May 2013

File Manager

The last file manager I have used was Norton Commander back in the DOS era. Many years after that, during the flame wars between proponents of spatial and single-windowed Nautilus, I have only laughed at them, thinking that the command line was much better. Why would anybody need a GUI file manager? I feel slightly ashamed now, but I have to admit that for the last two weeks, I have also been using a GUI file manager.

I work on various things with respect to cabling, electricity, a new datacenter, and so on in the new building of Faculty of Informatics. The problem with the building specifications, projects, and so on is, that they are stored in the deep structure of directories, with names containing whitespace and even non-ASCII characters (in different character sets), and each directory contains many files or subdirectories with common prefixes shared by a set of files. So the usual tab-completion does not help - it is necessary to actually look at the completion prefix in order to know what character to add next. Here is an example of such a file name, starting from my automount point:

stavba_cerit_dok/01_ZADAVACI_DOK/02_zadavaci_projektova_dokumentace/\
FIMU_GD_SOD_příloha č. 1/!!!_02_FIMU_GD_SoD_Priloha_1_II.A_PD_DVD_PROJEKTOVA_DOK_1.etapa!!!/\
FI_F.3_03_PS 03 SUPERPOCITAC, DATOVE CENTRUM_DVD/\
F.3_03_5 SLABOPROUDE ROZVODY_DVD/F.3_03_5.2.01_PUDORYS 5NP - SLABOPROUD.pdf

In order to be able to quickly navigate inside such directory tree, I have started to use a GUI file manager. So far I use Thunar, the default file manager in XFCE. It can easily switch to any directory along the current path, and it has bookmarks for fast access to frequently-used directories. I use this feature a lot, because of the main drawback of GUI file managers: It is not possible to descend into a directory, which is an automount point (and which, from the VFS point of view, does not exist yet).

Do you use a GUI file manager?

Section: /computers/desktops (RSS feed) | Permanent link | 4 writebacks

Fri, 03 May 2013

Laptop Upgrade?

I've got my laptop, ASUS F3E, in September 2008. So maybe it's time for a new laptop. Last year I have briefly considered buying a new one, but I have found that after upgrading F3E to 4 GB of RAM, 9-cell battery, and a fast solid-state disk (OCZ Vertex 2), then-current models provided no significant improvement compared to my F3E. Is this year's offer better?

There are several problems with my F3E:

What parameters should my hypothetical new laptop have? Of course, it would need to be better than my upgraded F3E in every aspect, and meet the following criteria:

Does such a laptop exist, my dear lazyweb? Or shall I stay with my upgraded ASUS F3E for another year?

Section: /computers (RSS feed) | Permanent link | 10 writebacks

Mon, 11 Mar 2013

Are the Directories Evil?

Jimmac has an interesting blog post about how GNOME users are not satisfied with the current look of GNOME folder icon, explaining the reasons behind its current state. The blog post contains an interesting reasoning, but I wonder whether the fact that an explanation was actually necessary does not invalidate it. For me, however, the most enlightening part of his blog post is this:

Exposing the directory structure is the pre-GNOME 3 world. What we focus on now are the applications.

This is exactly the kind of mentality which leads us to the world of systems with severe usability problems like Android, GNOME 3, or most current MP3 players. Maybe this is a news for some of you, but the concept of directories actually is useful!

I hate it when the audio player Android app cannot present the albums that I have on my SD card neatly sorted into directories (also) as those directories. I hate it when my car stereo cannot use subdirectories with depth greater than 1, and does not have a "shuffle subtree" function, making the whole "shuffle" thing unusable: I have songs, tales for kids, audiobooks, and language courses stored there, and I obviously don't want to shuffle through all of these, intermixing random language lessons with songs and audiobook chapters.

Why do I have to use a domain-specific "directory sorter" (e.g. MP3 or photo tagging application), when the system already has a general purpose means of grouping various files together: the directory tree?

Section: /computers (RSS feed) | Permanent link | 5 writebacks

Thu, 17 Jan 2013

Fedora 18

Fedora 18 has finally been released after being delayed several times. So far my experience is not so bad - upgraded systems mostly work. What are the biggest problems?

Most of them of course are in the rewritten Anaconda/FedUp combo. In my opinion, developers should be explicitly told to not rewrite things from scratch, if there is at least a small possibility of getting to the similar set of features with incremental modifications. The problem is that the previous codebase mostly works, and have lots of working features even for many corner cases. This resembles the infamous gdm-2.20 rewrite. Here is the list of problems I have ran into so far, using F18 on my laptop, on my workstation at work, and on a testing virtual machine:

To sum it up, we are slowly heading to the distribution where find(1) and grep(1) are no longer the sysadmin's friends, and the sysadmin will need to use the specific D-Bus interfaces to talk to the most parts of the system. It is kind of sad.

Section: /computers (RSS feed) | Permanent link | 3 writebacks

Thu, 29 Nov 2012

Secure Login at Alza.CZ

Here is how the "secure" login works at alza.cz, one of the biggest e-shops in the Czech Republic:

Alza SSL login

In the login form, user can click to the link named "SSL", which leads to the SSL-encrypted page with an alternative login form. The problem is, that this page apparently sends the login form data unencrypted, so the usage of SSL to display the login form is completely pointless.

Section: /computers (RSS feed) | Permanent link | 3 writebacks

Wed, 28 Nov 2012

SOAP::Lite

Today's daily WTF goes to the SOAP::Lite CPAN package and its non-configurability and mis-design.

For example, look at this:

HTTP Basic authentication is accomplished by overriding the get_basic_credentials suboutine in LWP::UserAgent (which SOAP::Transport::HTTP::Client is a subclass):
  BEGIN {
    sub SOAP::Transport::HTTP::Client::get_basic_credentials {
      return 'username' => 'password';
    }
  }

So apparently the only way how to use Basic authentication is to override a global function in some foreign namespace. And what to do when I want to use two SOAP servers with two sets of credentials inside a single application? There are more similar "features" in SOAP::Lite. For example, tracing can only be set up globally in compile-time, or by manually calling ->import().

My dear lazyweb, is there a SOAP module with cleaner design?

Update - Wed, 28 Nov 2012: Tracing

FWIW, it is probably easier and cleaner to do both basic authentication and tracing at the transport level - the transport module here is LWP::UserAgent (thanks Adelton for the hint!), so for example handlers described in the LWP::UserAgent manpage work:

$soap->transport->add_handler(
	request_prepare => sub {
		shift->authorization_basic($login, $pass);
	},
);

$soap->transport->add_handler(
	request_send => sub { print STDERR shift->content; },
);
$soap->transport->add_handler(
	response_done => sub { print STDERR shift->content; },
);

I wonder why the SOAP::Lite manpages suggest such dirty ways of handling this (and I have not even started mentioning things like $SOAP::Transport::HTTP::Client::USERAGENT_CLASS global variable; ugh)

Section: /computers (RSS feed) | Permanent link | 3 writebacks

Tue, 27 Nov 2012

Cookies Auth and 403 Forbidden

In IS MU we have recently abandoned the HTTP basic authentication and replaced it with cookie-based authentication. The main reason was that there is no portable way of logging out of the basic authentication. So I have based our new solution on Apache2::AuthCookie. The problem is, that it does not work correctly with some clients because of the way how the login form is handled.

When the yet-unauthenticated user accesses an URL for authenticated users only, Apache2::AuthCookie returns the HTTP response with "403 Forbidden" status code, and with text/html body containing the login form. That way, the client cannot be possibly lead into the false assumption that the page it just received is in fact the content it wanted to receive. So the user fills the login form, submits it, and the server returns the real page for that URL, this time with "200 OK" status code. This approach seems to be correct (even after reading the RFC 2616 :-). However, we observe problems with the following two use cases:

What to do now? The problem is clearly in the HTTP status code 403, and in its mis-interpretation by some clients. I don't want to return the login form in a 200 OK response, because I need e.g. the web crawlers to know that this is not actually the page they tried to access. As for Symbian, they can be clearly identified by their User-Agent string, so I can return 200 OK only for them. But as for MS Word, I have no clue: what I see is the request made by MSIE (and again, I probably don't want to return 200 OK to every unauthenticated MSIE request). Any other suggestions, my dear lazyweb?

Section: /computers (RSS feed) | Permanent link | 2 writebacks

Mon, 12 Nov 2012

Desktop Environment-Specific Apps

I have recently came across this two years old bug report, filled to the bug tracker of Transmission (a Bittorrent client) where a GNOME developer suggests removal of the notification area icon from the application on the basis that GNOME 3 does not support notification area at all.

So if I understand it correctly, we are now living in a world where all the GUI applications have to be dependent on the particular desktop environment, and it should be no longer supported to run - say - Transmission under XFCE, or GIMP under KDE, at least according to GNOME developers. "We GNOMErs do not support notification area icons, so this application should not use it" (even though the application is not used exclusively under GNOME)? Where are the freedesktop.org cross-DE interoperability recommendations?

That said, notification area as such sucks - what I liked most was the original approach of X11: using on-desktop icons for minimized applications (instead of applications and documents shortcuts), and applications displaying their own status in their icon (handled by every window manager using the same ICCCM specification).

Section: /computers/desktops (RSS feed) | Permanent link | 3 writebacks

Fri, 12 Oct 2012

Failed SSD

Yesterday I went to a meeting and brought my laptop with me. I made notes to a text file, and after the meeting closed the lid (my laptop is configured to suspend then) and went away. After returning to my office I have opened my laptop and seen only error messages from the sda drive.

The drive was totally dead, and did not work even in another computer. After plugging it in the SATA controller only printed something like "resetting SATA channel", so it did notice something has been plugged in, but nothing more. I had to teach my UNIX course in two hours, so I had to quickly find a replacement, install a new system, and configure it for presentation. Fortunately, I had a "spare" 2.5" drive prepared as a replacement of the root FS of my workstation. So I deleted the already configured system for my workstation, and used that.

Have you anybody seen a similar problem? The drive was "iops-optimized" OCZ Vertex II, about a year old. Fortunately, I use LUKS, so I can send it back to the vendor without worrying about my data.

Section: /computers (RSS feed) | Permanent link | 2 writebacks

Mon, 06 Aug 2012

Enterprise Bug Fixes

Today, an unimportant but interesting bug #313291 has been fixed in RHEL 5. Here is the timeline:

I am grateful that the bug has been fixed after all this time, but I don't use RHEL 5 anymore, and mutt in RHEL 6 got the fix from the upstream.

I wonder why they even bothered to fix the bug after so much time, and even release the new mutt package fixing this single bug. This is not a complaint, this is hopefully an interesting insight to the release process of RHEL packages. Maybe some high-profile customer wanted this bug fixed. Who knows?

Section: /computers (RSS feed) | Permanent link | 2 writebacks

About:

Yenya's World: Linux and beyond - Yenya's blog.

Links:

RSS feed

Jan "Yenya" Kasprzak

The main page of this blog

Categories:

Archive:

Blog roll:

alphabetically :-)