Add ability to detect device code (along with firmware version).
Merge commit '3771ec374f68d456a002acd48f62b1e8ab915476' into development