Werner Almesberger | 9 Nov 00:46 2015

Anelok: scripted simulations

The simulator has learned some new tricks: now simulations can be
scripted, e.g., to implement unit or regression tests.

It all started with a bug that's been around for a while and that
I finally wanted gone. That bug was that Anelok would not drop
the authentication even if idle for a very long time. The fix is


Now, how do you test this ? Having to wait more than five minutes
for each test is a bit annoying. And so would be having to change
the timeouts to a shorter value and then changing them back.

The solution is of course to use the simulator and make it run in
accelerated virtual time, not real time. Tweaking time is easy, as
countless Hollywood-made documentaries on time travel illustrate.

Since I also wanted to have better access to the display content,
I first upgraded from SDL 1.2 to SDL 2.0. That turned out to be
more tricky than expected since

- in SDL 1.2, everything you can draw on is a "surface", while
  SDL 2.0 introduces also "renderer" and "texture",

- I used the drawing functions from SDL_gfx, which work on surfaces
  in 1.2 but on the renderer in 2.0,

- the renderer is basically write-only, i.e., one can't show some
  content, then modify it and show the modification. Instead, one
(Continue reading)

Werner Almesberger | 3 Nov 22:37 2015

Re: Anelok: OTF proposal

I wrote:
> During the last days, Dave and I
> have prepared a proposal and I've submitted it just now.

OTF have reviewed our proposal. Unfortunately, they rejected it.

I'm asking for permission to post the review here. Also, Dave and
I are preparing a response to the review results.

To be continued ...

- Werner

Werner Almesberger | 24 Oct 15:46 2015

Anelok: evolution update

I've slightly updated the hardware evolution diagram:


Previous versions:




Changes since May:

- added "Buttons" as user input method, praising their reliability,
  and admit that the slider performs poorly in practice.

- also extol the brutal efficiency of killing RF by grounding VDD

Regarding the slider, there's still a chance for saving it: Dave
has two 2014 (CR2032) boards, courtesy of Canaan, to give to
anyone who'd want to try his or her luck with making the slider
work acceptably. The firmware still supports buttons and slider,
with a simple switch in DEVCFG.

So, if you like sliders, have an idea for how to harness that
messy analog data, and want to get your hands on one of the rare
2014 boards, now is the time to step forward.
(Continue reading)

Werner Almesberger | 23 Oct 18:38 2015

old toner transfer paper trivia

I couldn't find my bag with the toner transfer paper I had used in
recent years (some random brand ink photo paper), so I used the one
I could find - a sheet of the venerable HP C6039A.

I had this for about ten years (luckily inside a plastic bag, so
the thick layer of oily black dust that had accumulated over the
years wasn't on the paper itself) and time has done interesting
things to it.

The first indication was when, after printing, a corner of the
paper delaminated:


I knew the coating had a key role in making toner transfer work,
but I never pictured it as a separate film.

After passing the laminator ("ironing"), the film detached
completely, yielding this:


Except for the weird splotch under the "A" of "ANELOK", the
transfer was flawless.

- Werner

Werner Almesberger | 23 Oct 10:44 2015

Anelok: tactile switches (2/2)

To accommodate the switches, I had to change the top half of the case
and add buttons. To keep things simple, I just changed the design to
make the top layer of plastic thicker by 1 mm and cut a hole into it.

Well, at least that was the plan. Then my FreeCAD-based slicer acted
up and refused to produce usable paths. After spending a good while
examining the mesh, and paths generated from it, etc., and not
finding anything the slicer shouldn't be able to handle (e.g., some
invalid mesh geometry), I finally gave up and wrote a new slicer that
operates directly on the mesh:


I also designed the button to have a retainer plate that would keep
it from falling out of the case, but that plan was defeated by my
mill not begin able to work with enough absolute accuracy in the Z
direction, resulting in the case being too fragile.

Well, perfection can wait, and until then we have scotch tape. So
here it is in all its taped-up glory:


It's about as mechanically unsound as can be (e.g., the buttons push
against the battery that in turn pushes against the case bottom that
is only held by friction), but scotch tape comes to the rescue there,

For all its sloppiness, this works remarkably well, and Anelok has
never been easier to operate.
(Continue reading)

Werner Almesberger | 23 Oct 10:36 2015

Anelok: tactile switches (1/2)

Since everybody agrees that the slider was the wrong approach, I
now made a first try with good old mechanical switches. For this,
I replaced the sub-PCB of one of my 2014 devices with one that
has three switches instead of the capacitive slider.

Now, there is one little problem: I only have two signals (CAP_A
and CAP_B) but three buttons. This is how I solved it:


On the left, we have the usual configuration with a pull-up
pulling the line up and the switches closing to ground. Current
flows with the respective switch closed are shown in pink.

To read the middle switch, I change the GPIO configuration such
that one channel becomes ground as well. The other then reads the
middle switch.

This is nice and simple. However, it has two limitations:

- if more than one switch is closed, CAP_A and CAP_B will read
  low, so we cannot distinguish, say, Top + Bottom from
  Top + Middle.

- in either configuration, one switch will not produce a change
  when operated. This means that the MCU has to periodically poll
  the switches, changing between configurations.

Since Anelok is only interested in the middle switch for waking up
from standby, we can still avoid polling in standby, making this
(Continue reading)

Werner Almesberger | 3 Sep 20:31 2015

FCC and EU declare war

Heise published the following article today (in German), describing
that the EU is basically implementing a ban of non-closed software
on any device that uses the wireless spectrum:


This follows precedent by the FCC, affecting the 5 GHz band
(interestingly, Google and FCC themselves currently find the
document at apps.fcc.gov, but all the links lead to what's
basically an error page, announcing a maintenance downtime
on September 8):


This article explains the background ...


... yet, "the easiest thing for us to do is lock down all the
middleware" could be pretty much described as the sum of our fears.

This seems to be a major land grab, basically evicting open soft-
and hardware from the radio spectrum.

How do we fight back ?

- Werner

Werner Almesberger | 1 Sep 23:53 2015

Anelok: OTF proposal

Paul Boddie wrote:
> [...] the Open Technology Fund [2].
> [2] https://www.opentechfund.org/

This looks interesting indeed. During the last days, Dave and I
have prepared a proposal and I've submitted it just now.

I hope the submission went through - the deadline said tonight
just before midnight, but the status changed to "Closed" before
that. The system accepted the submission anyway, so there's
hope that I made it in time.

Below is the submitted material.

Thanks a lot !

- Werner

---------------------------------- Cut here -----------------------------------

Project name: Anelok
Duration: 7 months
Contact name: Werner Almesberger
Contact email: werner <at> almesberger.net [1]

    Status: It Exists! (Alpha/Beta)
    Focus: Awareness of privacy and security threats, Security from danger or
threat online
(Continue reading)

Rafael Ignacio Zurita | 31 Aug 13:58 2015

soldering mk20 mk22 - power test problem

I have soldered pin 6 (VREGIN) and 23 (VSS) :

(red line is pin 6, black is 23)

I put 5v from USB pc port in pin 6 (VREGIN) and GND from USB pc port on pin 23.
Then, I tested pin 5 (VOUT33, white line in picture), guessing that I
would get 3.3v from internal regulator.
But no :(  on pin 6 and GND I get 5.02V, and testing pin 5 and GND I
get 4.96V, but no 3.3V as expected.

Should I put capacitors first before test? Is it needed all the VSS
soldered before this kind of test?
Could somebody with knowledge on this kind of MCUs tell me if this is
the proper effect with this minimal test?

Thanks in advance and reading to realize if this is correct.


Rafael Ignacio Zurita | 28 Aug 19:43 2015

Re: diy pcb making problem

On Fri, Aug 28, 2015 at 9:09 AM, Christoph Pulster
<openmoko@...> wrote:
>> Maybe add a bit of 30% peroxide until the color gets more blueish.
> Similar advice on my side: use more peroxide, test with your
> girlsfriends hair until color gets more blond.
> And dont forget to share some pics :)

Hehe.. No sure if gf would like to let me to try that ;-))
I am sharing, how does it look so far?


Rafael Ignacio Zurita | 27 Aug 16:08 2015

diy pcb making problem (acid + oxygenated water)

Hi, I have been trying to make a diy pcb.
Before I have had success, but I do not know really now (in my new diy
lab) what is the problem.

I am using toner transfer and acid to make the board. My problem is
the acid part.
What I am seeing is that the toner is removed when I am trying to
remove the copper with acid. Then, the board left ruin :(

 I show two pictures :

first, the toner transfer looks okey for me :

Then, when I put the board for a few minutes in the acid 50% +
oxygenated water 50% I get this board with destroyed tracks :(

If somebody has some ideas about this kind of making the board and
this problem I would appreciate some help.

Thanks in advance,
P.S. The board is for using a mk20dx256 from freescale