Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Improve Pi detection #226

Closed
a-martynovich opened this issue Sep 26, 2019 · 1 comment · Fixed by #227
Closed

Improve Pi detection #226

a-martynovich opened this issue Sep 26, 2019 · 1 comment · Fixed by #227

Comments

@a-martynovich
Copy link
Contributor

/proc/cpuinfo in Ubuntu Core and Server does not contain "Hardware" and "Serial" fields. Instead some other files should be queried.

To get device model we can read /proc/device-tree/model. It contains data like Raspberry Pi 3 Model B Plus Rev 1.3\0 (notice the null byte at the end). Serial number is at /proc/device-tree/serial-number. Also /proc/device-tree/compatible contains info in such format: raspberrypi,3-model-b-plus brcm,bcm2837.

@a-martynovich
Copy link
Contributor Author

a-martynovich commented Sep 27, 2019

This also works the same way on Raspbian.

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

Successfully merging a pull request may close this issue.

1 participant