Check bootloader mode before hardware ID

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Restore hardware ID check (fixes #27)

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>