merge nsayer alternate method for DETECT_DEVICE