{"action":"created","issue":{"url":"https://api.github.com/repos/ev3dev/ev3dev/issues/412","labels_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/412/labels{/name}","comments_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/412/comments","events_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/412/events","html_url":"https://github.com/ev3dev/ev3dev/issues/412","id":112239859,"number":412,"title":"Need a way to detect BrickPi and PiStorms on Raspberry Pi","user":{"login":"dlech","id":963645,"avatar_url":"https://avatars.githubusercontent.com/u/963645?v=3","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ev3dev/ev3dev/labels/brickpi","name":"brickpi","color":"207de5"},{"url":"https://api.github.com/repos/ev3dev/ev3dev/labels/fix%20committed","name":"fix committed","color":"eb6420"},{"url":"https://api.github.com/repos/ev3dev/ev3dev/labels/kernel","name":"kernel","color":"009800"},{"url":"https://api.github.com/repos/ev3dev/ev3dev/labels/planning","name":"planning","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ev3dev/ev3dev/milestones/2","html_url":"https://github.com/ev3dev/ev3dev/milestones/ev3dev-jessie%202015-Q4","labels_url":"https://api.github.com/repos/ev3dev/ev3dev/milestones/2/labels","id":1385736,"number":2,"title":"ev3dev-jessie 2015-Q4","description":"For tracking everything that needs to be included in the upcoming release.","creator":{"login":"dlech","id":963645,"avatar_url":"https://avatars.githubusercontent.com/u/963645?v=3","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":1,"state":"open","created_at":"2015-10-30T16:27:49Z","updated_at":"2015-11-06T16:37:04Z","due_on":null,"closed_at":null},"comments":24,"created_at":"2015-10-19T21:46:59Z","updated_at":"2015-11-06T19:01:45Z","closed_at":null,"body":"This came up in a conversation with @ddemidov in <https://github.com/ev3dev/ev3dev-lang/commit/ac9a629ab3cd8f3681e790313571f655316921ad#commitcomment-13858910>. We want to be able to use the same image file for both BrickPi and PiStorms. Users will have to select which one is attached by changing a setting in [config.txt](https://github.com/ev3dev/brickstrap/blob/master/rpi-ev3dev-jessie/root/boot/flash/config.txt). PiStorms will be easy to detect since is uses a I2C/NXT connection. Basically, it will be automatically detected and everything should \"just work\". The BrickPi on the other hand uses a tty line discipline. This is attached by a systemd service. So, we need something that can trigger the systemd service rather than the user having to manually enable or disable it. Right now, the presence of the brickpi LED devices is the only thing we have to go off of. It seems like there should be a better way to do this, but I haven't come up with anything yet. Just throwing this out there in case there are any device tree experts listening that may have a better idea."},"comment":{"url":"https://api.github.com/repos/ev3dev/ev3dev/issues/comments/154502059","html_url":"https://github.com/ev3dev/ev3dev/issues/412#issuecomment-154502059","issue_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/412","id":154502059,"user":{"login":"dlech","id":963645,"avatar_url":"https://avatars.githubusercontent.com/u/963645?v=3","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T19:01:45Z","updated_at":"2015-11-06T19:01:45Z","body":"> Is there a way to know actual buttons supported on the system\r\n\r\nYes, `/sys/class/input/input0/capabilities/key` returns a bitmask of the keys that are present. the `EVIOCGBIT(ev,len)` ioctl does the same thing.\r\n\r\n> or should we keep a database of platform keys?\r\n\r\nIf you want the keys available via introspection while developing on a host computer, then probably yes.\r\n\r\n\r\n> Is lego-port class supported on all platforms, or just ev3?\r\n\r\nThe lego-port class is on on all platforms. Additionally, if you have any kind of sensor multiplexer, you will have additional ports, like `in1:i2c8:mux2`, etc. On BrickPi (for now) the port names are the same (`in1', `outA`), but on PiStorms, they are `pistorms:BAS1`, `pistorms:BAM1`."}}