-1


I have wifi module as client that connected to my router (linux based firmware, Openwrt). And sometime, i need to retrieve GPIO state from wifi module. It can be done simply by connect in to usb serial and type
print (gpio.read(1))
It will return value 1 or 0. Active or not.

The thing is, can i save the value of gpio to my openwrt through telnet?
Using ash or bash maybe?
I've succesfully connected to wifi module using telnet and execute command via telnet.

Many thanks :)
Note :
-my module wifi is esp8266-07,
-Router HW Echolife HG553 (openwrt,Debian based linux)

mpromonet
  • 8,785
  • 40
  • 48
  • 80
  • Try to take a look to http://stackoverflow.com/questions/7013137/automating-telnet-session-using-bash-scripts – gaetanoM Jun 21 '16 at 18:53

1 Answers1

1

Linux doesn't provide us with any "standardtized" solution.

You would need to implement some kind of interface, e.g. service that will read data and make nicely structured JSON file, which is shared over HTTP, so you can read and parse it.

Oleksandr Kravchuk
  • 5,268
  • 1
  • 18
  • 28