yunbridge: add linux side python code

to make the bridge work we need to run an askfirst instance on the ttyS.
additionally add the lua scripts needed to make REST work. this is really ugly
code but it works. i already cleaned up to the original code, but there are still
issues such as a new luci session being created for each request.

Signed-off-by: John Crispin <blogic@openwrt.org>
This commit is contained in:
John Crispin
2015-08-02 08:27:09 +02:00
parent d313c7b182
commit d88a1494fd
8 changed files with 788 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
--- a/bridge/packet.py
+++ b/bridge/packet.py
@@ -93,12 +93,12 @@
def run(self, data):
if data[0] != 'X':
- call(['/usr/bin/blink-start', '100'])
+ #call(['/usr/bin/blink-start', '100'])
return chr(1)
if data[1:4] != '100':
- call(['/usr/bin/blink-start', '100'])
+ #call(['/usr/bin/blink-start', '100'])
return chr(2)
- call(['/usr/bin/blink-stop'])
+ #call(['/usr/bin/blink-stop'])
return chr(0) + '160' # send the actual bridge version
class PacketReader: