Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement proposal to determine raspi board revision remotely #14

Closed
GoogleCodeExporter opened this issue Apr 12, 2015 · 2 comments
Closed

Comments

@GoogleCodeExporter
Copy link

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 
webiopi.py:

    # revision
    elif relativePath == "revision":
        self.send_response(200)
        self.send_header("Content-type", "text/plain")
        self.end_headers()
        revision = "%s" % GPIO.BOARD_REVISION
        self.wfile.write(revision.encode())

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.

Original issue reported on code.google.com by andreas....@googlemail.com on 20 Dec 2012 at 8:28

@GoogleCodeExporter
Copy link
Author

I will add it to the next revision, thanks

Original comment by tro...@trouch.com on 20 Dec 2012 at 10:38

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

added in svn trunk revision 614

Original comment by tro...@trouch.com on 22 Dec 2012 at 7:17

  • Changed state: Fixed
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant