to replace 0xff with DIK_NULL
to add get device state