Corrected an bug in the id generation

Corrected a bug in the id generation causing a NullPointerException if
the device’s first network interface has no MAC-Address. Optimized the
MAC-Adress sum generation, now using unsigned values instead of signed
ones to reach a bigger range.