Tested version that now works with uuid, hex8 and hex12 modes