Issue #014 [Fixed/closed] - Improvement proposal to determine raspi board revision remotely

Posted by andreas.riegg

It is obvious that we can determine the Raspi board revision remotely by looking at the number at position 3 in Mapping[1] or Mapping[2] when requesting this by /webiopi/map. However, the map answer is a longer string requiring some pattern-matching so determine stable and robust if the number at position 3 is a 0 or a 2.

It would be much more simple by adding this code to the doGet() method in

# revision
elif relativePath == "revision":
    self.send\_header("Content-type", "text/plain")
    revision = "%s" % GPIO.BOARD\_REVISION

The HTTP answer would just be a plain "1" or "2" (assuming that cpuinfo.c does its job correct) which is much more straight to use.

Comment 1

Posted by trouch

I will add it to the next revision, thanks

Comment 2

Posted by trouch

added in svn trunk revision 614