Hi i have windows 7 as host and a virtualbox guest os running debian linux vm.
I have accessed the webserver of my debian vm from my host system by doing a portforward in virtualbox eg. host port: 8888 guest: 80 so when im going to access the webserver of my debian vm I'll just open my host browser and type in localhost:8888..
Now what i want to do is control arduino via webserver of debian vm using php.. i can do this with no problem in my host system.. but when im using the webserver of debian vm i can't seem to make it work.. i even mapped my serial port COM1 to /dev/ttyS0 in virtualbox so now i can echo in the terminal of my debian to control my arduino which works well..
eg.
echo "a" > /dev/ttyS0 - turn the led on in arduino // works well
echo "b" > /dev/ttyS0 - turn the led off // works well
now how can i use the webserver of debian linux vm to control my arduino..
here's how i control it in my host system without a problem..
PHP - works well in my host system..
$fp =fopen("com7", "w");
fwrite($fp, chr(97));
fclose($fp);
I did the same thing in the webserver of my debian linux vm..
i created test.php: nano /var/www/test.php
PHP- webserver in debian vm which i open in my host system by localhost:8888/test.php
$fp =fopen("/dev/ttyS0", "w");
fwrite($fp, chr(97));
fclose($fp);
it does not work..
How can i control my arduino via the webserver of virtualbox running debian linux?
Thanks in advance..