ozon
September 14, 2017, 2:38am
#1
This package intigrates ttyd in LUCI.
The project is still alpha and needs some optimization and improvements. This is my first development for OpenWRT / LEDE. Module development with Lua for/with LuCI are the naked horror ;).
The source: https://github.com/ozon/luci-app-ttyd
7 Likes
That would be very helpful ! Nice!
hnyman
September 14, 2017, 9:36am
#3
Interesting.
But I get lost with the Create/uci-defaults function. Why is it included? (does it actually do anything?)
The uci-defaults script should be there as a normal included file, like I think you already have.
ozon
September 14, 2017, 7:58pm
#4
For now I have removed the uci-defaults stuff.
A ready to use ipk packet can be found on https://github.com/ozon/luci-app-ttyd/releases .
It is dependent on the ttyd package.
stangri
September 15, 2017, 4:36am
#5
I downloaded the ipk from github (luci-app-ttyd_0.0.1-1_all.ipk) but I end up with the blank black screen when I go to System->Terminal.
If it helps, that's how the installation went:
EA8500 in /tmp # opkg install ./luci-app-ttyd_0.0.1-1_all.ipk
Installing luci-app-ttyd (0.0.1-1) to root...
Configuring luci-app-ttyd.
once 1
I do have ttyd
installed as well.
ozon
September 21, 2017, 1:10pm
#6
Hi stangri,
please try this:
Start the ttyd service with /etc/init.d/ttyd start
and check the log with logread -e ttyd
Check System->Terminal again if the last line look like
Thu Sep 21 14:56:31 2017 daemon.err ttyd[771]: [2017/09/21 14:56:31:4242] NOTICE: started process, pid: 8190
You can also check if ttyd generally works with killall ttyd; ttyd /bin/sh
Try <your_router_ip>:7681
In case of further problems feel free to send me your complete log via pm.
prosit
December 7, 2018, 9:11am
#7
I get ERROR on binding fd 6 to port 7681
.
What can I do now?
root@LEDE:~# /etc/init.d/ttyd start
once 1
shell /bin/ash
port 7681
root@LEDE:~# logread -e ttyd
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1634] NOTICE: Initial logging level 7
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1780] NOTICE: Libwebsockets version: 2.0.3 buildbot@builds-02.infra.lede-project.org-
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1789] NOTICE: IPV6 compiled in and enabled
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1797] NOTICE: libev support not compiled in
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1805] NOTICE: libuv support not compiled in
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1817] NOTICE: Threads: 1 each 1024 fds
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1827] NOTICE: mem: platform fd map: 4096 bytes
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1836] NOTICE: Compiled with OpenSSL support
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1844] NOTICE: SSL disabled: no LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1852] NOTICE: Creating Vhost 'default' port 7681, 2 protocols
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1861] ERR: ERROR on binding fd 6 to port 7681 (-1 125)
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1869] ERR: Failed to create default vhost
Fri Dec 7 10:08:28 2018 daemon.err ttyd[20671]: [2018/12/07 10:08:28:1878] ERR: libwebsockets init failed
Hey i have this exact same problem, have you solved it?
2 Likes
Nice job!
If someone is looking for a smaller solution then have a look https://github.com/meefik/websocket.sh
But you'll have to use buildroot to enable telnetd in busybox. Also please note that it doesn't support TLS so don't use it over internet