2007-01-21
Posted in PlanetDebian, electronics at 22:57 CET (+0100) by sven
Well, today I worked on a new little hardware project. It’s supposed to become open source (both schematics/PCB layout and software), but I want to work on it together with a close friend more or less exclusively for now. Anyway what it is going to become is a small controller board with a 2×16 character LCD module (DOG-M162 from lcd-module.de, an Atmel ATmega16, a small serial EEPROM, an IR transceiver, a USB port (featured by an FTDI USB2serial chip) and two relais outputs. The software will use the board as an external controller for Canon EOS* cameras (one output controlling the autofocus trigger, one the shutter trigger) with several “programs” which take a photo every X seconds or opens the shutter for a given amount of time (up to several minutes for night time photos).
Anyway, today we worked on the first prototype board and tried to get the LCD to work. First we tried a 3.3V setup for the board – our initial goal – and several software versions later, we used an oscilator and found rather disgusting signal edges, so we switched to 5V (all components used were 5V and 3.3V capable, except that the display needed a slightly different circuit with a capacitor replaced by bare wire and another removed). Now the signal edges looked fine and we tripple checked that all connections were as expected. But even after trying two different initialization routines from the web and writing an own one from the controller specs, we were not successfull. This is quite frustrating, so if anyone would be able to help here, please leave a comment or contact me by email.
See also Re: Wacky ideas #9: rerun maintainer scripts for changes in related packages
See also CPU feature flags and their meanings
See also CDBS and kittens
Permalink
2007-01-16
Posted in Computers, PlanetDebian at 17:12 CET (+0100) by sven
In his post “Ok, now we are getting somewhere! (Re: XML-based configurations)”, Gunnar Wolf writes that he doesn’t regard XML as a suitable standard for configuration files which need some sort of nesting (like, e.g. the apache configuration needs nesting while a config for a simple /usr/bin/sendmail replacement like nullmailer or msmtp won’t need nesting). He seems to like YAML, as you can see in his first post on the subject: Configuration files for humans and for computers. I looked into YAML a bit and to me, it doesn’t seem like a good replacement for XML in config files. Sure, the files look simpler, but I would have a heck of a problem to memorize the syntax. Sure, a colon (:) is intuitive for a direct mapping, but remembering that a pipe (”|”) marks a literal which preserves newline while the default is a scalar which maps newlines to spaces is harder. Folded style (”>”) is even harder to remember. It folds multiple lines with the same indentation into a single line unless there is a differently indented or empty line in between.
More important is that I honestly hate syntaxes which rely on indentation. Indentation is dead useful when a nested config or source is read by a human, but it often causes problems when edited by a human, especially when tabs are used. A program could (and most often would) see a difference between “test” and “<8*space>test”, while a human would most probably not see a difference with default tabs.
To sum it up: I see the problems with XML, most notably bad program outputs which don’t use indentation (some even put everything on a single line) and the sometimes overwhelming amount of whatever constructs, but YAML doesn’t seem to be the right solution to me neither, especially due to the indentation-used-as-syntax-element problem.
What I really would like to see is a syntax that doesn’t use indentation as a syntax element and doesn’t need the name of the opening tag when closing it, but still allows to use it. In other words both of the following constructs (or an equivalent which looks less like XML) should be legal:
<x>
whatever
</>
<x>
whatever
</x>
While the following should raise an error:
<x>
whatever
</y>
See also Another link collection 2009-06-22
Permalink
2007-01-10
Posted in Computers, PlanetDebian at 20:20 CET (+0100) by sven
Russel Coker wrote in etbe: some random Linux tips:
Prefixing a bash command with ‘ ‘ will prevent a ! operator from running it. For example if you had just entered the command ” ls -al /” then “!l” would not repeat it but would instead match the preceeding command that started with a ‘l’. On SLES-10 a preceeding space also makes the command not appear in the history while on Debian/etch it does (both run Bash 3.1).
It’s pretty easy to get the Bash shell to ignore lines starting with a space in its history: Just add
export HISTCONTROL=ignorespace
to your ~/.bashrc. Alternatively, ignoredups ignores duplicates and ignoreboth ignores both.
It’s also possible to tell Bash to ignore lines which match a specific pattern. For example,
export HISTIGNORE=" *:~/*"
will ignore any command starting with a space (emulation the ignorespace option to HISTCONTROL) or starting with ~/ (any program/script in or below your directory).
Personally, I just use “HISTCONTROL=ignoreboth“.
See also IP addresses
See also Dual boot and full encryption
See also Re: Silly translations
Permalink
2007-01-08
Posted in Personal at 05:46 CET (+0100) by sven
Odd test result. Though I think I can easily think with the viewpoint of the opposite sex.
 |
You scored as Either. You brain is neither specifically male, nor female in the way you perceive your surroundings. As bad as this may sound to some, it can easily mean that you are capable of combining both gender aspects to your advantage. Rather than being genderless you are possibly able think freely. This does not mean that you are bisexual or androgynous or indecisive, but it might. |
| Either |
|
68% |
| Female |
|
54% |
| Male |
|
50% |
| Neither |
|
29% |
Should you be MALE or FEMALE?*
created with QuizFarm.com
See also Unifying config file syntaxes with nesting
See also Brane Dump — The Thoughts of Matt Palmer
See also Dual boot and full encryption – Part 2
Permalink
2007-01-04
Posted in Computers, PlanetDebian at 12:28 CET (+0100) by sven
Hi.
I’m currently working on a system image which is (among other things) supposed to automatically mount CDs as they are inserted. The big problem with this is that I finally had to recognize the fact that with all those hotplug events issued, a media change in an existing device is recognized by the kernel (at least it seems so when looking at drivers/ide/ide-cd), but this is not passed to userland, i.e. the hotplug handler (/sbin/hotplug or whatever you wrote to /proc/sys/kernel/hotplug) doesn’t get an event for this. The only way to recognize a media change that I found is to poll the CD-drive(s) for their media status and handle any changes there appropriately.
Given that the kernel already seems to have a mechanism to recognize media changes, it would really be cool if it could issue hotplug events for them.
See also another vote
See also RHEL/CentOS bi-arch problems
Permalink
2007-01-03
Posted in Computers, IT-Security, Personal, PlanetDebian at 19:49 CET (+0100) by sven
Note: This post grew larger than originally intended. It drifted away from Vista to general rants about Microsoft and the content industry towards the end of the post, so just skip the rest if this is not of interest to you.
The latest thing I heard about Vista is that Microsoft bribes bloggers with Vista notebooks. As the article points out, this is plain wrong. Apart from crossing the line by not only giving away their own product to reviewers for free, but by actually providing an additional benefit (in the form of the notebook), they also did it wrong because – as the article on tech.blorge.com linked above points out – they don’t understand the way blogging “works”. Too many will be more or less angry because they didn’t get a free notebook (if anything at all).
In my opinion though, this is by far the least important mistake they made with Vista. All their content protection stuff is far worse. It basically does what current copy protection mechanisms already do, but to a much larger extend: Bother the legitimate users while users of pirated copies are uneffected. I don’t think they can avoid pirated copies for a minute. A friend already has a nice HD video player (HDDVD IIRC) and a nice HDCP capable TFT-display, both bought in december. Problem is that the HDCP protected connection resets every few minutes, causing a dropout in both video and sound for a few seconds each time. Seems HDCP compatible player and HDCP compatible display doesn’t necessarily mean that the two work together. Fortunately, in this case, there is some “secret” code you can enter on the players remote to disable HDCP completely. Of course, technically, this is not legal use, but if he didn’t use that hack, he wouldn’t be able to watch his legitimately bought video with his legitimate player and display. Given this problem, I can only shudder when thinking what will happen on Windows Vista with all those encrypted and signed communication channels (drive->memory->videocard->display, just to name the most obvious ones). And there is also the degradation of totally unrelated audio and video stuff while some “premium content” is played. Assume that I play some premium audio stuff. According to the hardware and driver specs for Vista, the availability of any premium content means that any non-encrypted channels need to be turned off or artificially degraded (like downsampling video from 1080p to VGA and upsampling it again since the display might be limited to only display 1080p). This is oh-so-stupid.
And there is also their EULA, as reviewed by Ed Foster. I won’t go into details here, but let’s just say that the EULA is the final nail in Vista’s coffin for me. I’ve been a Windows user since Windows for Workgroups came out (though I’ve used Linux on my machines since 1993 – and almost exclusively since 1998), but I won’t buy Vista, not even when it would be included with a new PC.
By the way: This also most likely means that I won’t buy any HD video stuff at all, since the Vista content protection stuff was mostly dictated by the big Hollywood studios.
Seems like I will be saving quite some money over the next years. (Which I actually need to do anyway.)
Other interesting links regarding Vista:
I said they did it all wrong because they forgot that they are selling Windows not to the content industry but to the consumers. Sure, the consumers want to see what Microsoft calls premium content, but I’m also sure that they don’t want all that content protection nonsense Microsoft built into Vista for the sake of the content providers. They lost the balance between avoiding pirated copies (which I think the content protection stuff will have no big effect on) and bothering users of legitimate copies.
Heck, I already use “pirate” copies of most of the (Windows-based) games I play because I don’t want to be bothered by their original-CD-checks, even though I own at least one legal copy of all the games I play. Would I need to download pirate copies of the HD movies I want to watch because I don’t want to be bothered by whatever side-effects VCP will have, even if I own legal copies of the same movies?
Dear Microsoft, dear Content-Industry (TimeWarner, Disney, whoever), please re-think who you want to sell your content to. I already avoid DVDs which carry additional copy protection (apart from CSS), and if they were available at all, I would prefer to buy DVDs without even CSS. The same is true for CDs (except that they obviously don’t have CSS). Consequently, I’m likely to avoid buying HD videos which impose unpleasant restrictions on me, including those that disable the S/PDIF output of my player (no matter wether PC or standalone) since I paid a lot of money for decent HIFI equipment two years ago and I sure as hell won’t want to by new equipment within the next few years. Luckily, I didn’t yet buy any HD video gear, though my notebook, when equipped with a HDDVD or Blueray drive should be capable of playing HD video – if MS and the content industry wouldn’t impose stupid restrictions.
See also Dual boot and full encryption
See also live-cd-on-removable-disk
See also Why is VoIP/SIP so hard?
Permalink