Device connected and pinger script does not work

Try this native Java script instead of using command line: