Adding TM support to get current device number