implement device-detection by IP

Signed-off-by: nuss <st9fan@gmail.com>