I am novice in openwrt and lua but I have strange problem.
Have this file located in w ww/cgi-bin/signal.lua
-- it sends sends signal to serial port with arduino attached
#!/usr/bin/env lua
port= "/dev/ttyUSB0"
serialout= io.open(port,"w") --open serial port and prepare to write data
str= "1"
serialout:write(str)
when i run it from console i have no problem, but when I try to reach it with browser I got:
Bad Gateway
The process did not produce any response
anyway, it still sends the signal to my arduino
What could be the problem