Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $filename = "/dev/ttyUSB1";
- if (!$handle = fopen($filename, 'r+'))
- {
- echo "The device isn't detected";
- exit;
- }
- else
- {
- if (fwrite($handle, "AT") === FALSE)
- {
- echo "Command is sent";
- $reply = fread ($filename);
- echo $reply;
- exit;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement