Read the statement by Michael Teeuw here.
How to detect SBC model?
-
@Sean where do you want to detect the device, on a webserver etc.?
-
@strawberry-3.141 In module itself.
-
@Sean can you give a little more details, what are your plans?
-
@strawberry-3.141 There is some difference between RPI and ATB. By example, the thermal zone virtual file, default sound configuration, I want to make a module to work conditionally by device. But I don’t know how to detect it programmatically. If my module is running on ATB, do something A, and if running on RPI do something B… etc.
-
@strawberry-3.141 Maybe I could check thermal zone file for that purpose. That is only I know. But I believe there is something better… like
/proc/hardware/board
… -
@Sean why not make a config option, that would be probably the easiest
-
@strawberry-3.141 Maybe. I know that is the easiest way. If I could not find any proper solution, I’ll do it.
But Just want to know. -
@Sean If for some reason, after an update, the thermal zone file gets changed and then your detection will fail, but your module isn’t related to the thermal zone fail you want to have a running module. So therefore I would prefer a config option as it doesn’t depend on something else.
-
@strawberry-3.141 Okay. thanks for your suggestion.
-
@Sean keep me posted with your work in progress or github