Ansuel / tch-nginx-gui

Modified file to apply to a stock technicolor GUI
GNU General Public License v3.0
344 stars 52 forks source link

Connect TG799 to iPhone Hotspot as upstream AP #777

Closed Napoleon-BlownApart closed 5 years ago

Napoleon-BlownApart commented 5 years ago

I have a Linksys WRT54G on which I've installed DD-WRT, allowing me to connect the router to my iPhone's hotspot, giving me a LAN with Internet Access. Everything is working fine, except that because the router is old, its speeds are rather slow.

I happen to have a TG799vac laying around, which I discovered today can be rooted and reconfigured. So I've rooted it following the Hacking Technicolor Gateways guide, using firmware version 17.2.0261-7021006-20180717060049-7a6942c1e53cde22b128223f19f177ff91381c7d, did most of the steps in the Unlock Functionality section (I left out VOIP) and then installed tch-nginx-gui. Everything seems ok so far and I can reboot the modem as needed.

So, the final step I need to accomplish is to connect the TG799 to my iPhone's hotspot. Is this possible or am I wasting my time? I hope it is possible as all the WiFi modem drivers are present and I would think this just requires configuration. (I don't mind if this needs to be done on the commandline.)

(If this is not the right place to post my question, please let me know where is the right forum. I have no idea as I've never interacted with this community before.)

Below is the resulting console output after running tch-nginx-gui install script. There are some warnings and errors but I don't know if they're significant as the GUI seems to be working and I've never used this before:

root@mygateway:/etc# /etc/init.d/rootdevice force
Root Script: Installing in progress...
uci: Invalid argument
uci: Invalid argument
uci: Entry not found
Cannot find device "lan"
Cannot find device "lan"
Warning: Option @zone[0].wan is unknown
Warning: Option @zone[1].wan is unknown
Warning: Option @zone[2].wan is unknown
Warning: Option @zone[3].wan is unknown
Warning: Section @zone[3] (wan) cannot resolve device of network 'wan'
Warning: Section @zone[3] (wan) cannot resolve device of network 'wwan'
Warning: Section @zone[3] (wan) cannot resolve device of network 'wan6'
Warning: Section @zone[3] (wan) cannot resolve device of network 'wwan_4'
Warning: Section @zone[3] (wan) cannot resolve device of network 'wwan_6'
Warning: Section @zone[3] (wan) has no device, network, subnet or extra options
 * Clearing IPv4 filter table
 * Clearing IPv4 nat table
 * Clearing IPv4 mangle table
 * Clearing IPv4 raw table
 * Populating IPv4 filter table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
   * Rule 'drop_lan_2_Guest1'
   * Rule 'drop_Guest1_2_lan'
   * Rule 'drop_lan_2_Guest1_5GHz'
   * Rule 'drop_Guest1_5GHz_2_lan'
   * Rule 'drop-lan_2_Guest1_GW'
   * Rule 'drop-lan_2_Guest1_5GHz_GW'
   * Rule 'drop-lan_2_hotspot'
   * Rule 'drop-Guest_2_hotspot'
   * Rule 'drop-Guest5G_2_hotspot'
   * Rule 'Allow-Guest1_ICMP'
   * Rule 'Allow-Guest1_DHCP'
   * Rule 'Allow-Guest1_DNS'
   * Rule 'Allow-Guest1_5GHz_ICMP'
   * Rule 'Allow-Guest1_5GHz_DHCP'
   * Rule 'Allow-Guest1_5GHz_DNS'
   * Rule 'Allow-DHCP-Renew'
   * Rule 'Deny-CUPS-lan'
   * Rule 'Deny-CUPS-wan'
   * Rule 'Default action for outgoing NAT'
   * Forward 'lan' -> 'wan'
   * Forward 'Guest1' -> 'wan'
   * Forward 'Guest1_5GHz' -> 'wan'
 * Populating IPv4 nat table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
 * Populating IPv4 mangle table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
 * Populating IPv4 raw table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
 * Clearing IPv6 filter table
 * Clearing IPv6 mangle table
 * Clearing IPv6 raw table
 * Populating IPv6 filter table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
   * Rule 'drop_lan_2_Guest1'
   * Rule 'drop_Guest1_2_lan'
   * Rule 'drop_lan_2_Guest1_5GHz'
   * Rule 'drop_Guest1_5GHz_2_lan'
   * Rule 'Allow-Guest1_ICMPv6'
   * Rule 'Allow-Guest1_5GHz_ICMPv6'
   * Rule 'Allow-Ping6'
   * Rule 'Allow-DHCPv6'
   * Rule 'Allow-ICMPv6-Input'
   * Rule 'Allow-ICMPv6-Forward'
   * Rule 'Deny-CUPS-lan-v6'
   * Rule 'Deny-CUPS-wan-v6'
   * Rule 'Default action for outgoing NAT'
   * Forward 'lan' -> 'wan'
   * Forward 'Guest1' -> 'wan'
   * Forward 'Guest1_5GHz' -> 'wan'
 * Populating IPv6 mangle table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
 * Populating IPv6 raw table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
 * Set tcp_ecn to off
 * Set tcp_syncookies to on
 * Set tcp_window_scaling to on
 * Running script '/lib/functions/firewall-ext-tch.sh'
 * Running script '/lib/functions/tod.sh'
iptables: Chain already exists.
ip6tables: Chain already exists.
 * Running script '/lib/functions/firewall-wol.sh'
   ! Skipping due to path error: No such file or directory
 * Running script '/usr/share/miniupnpd-tch/firewall.include'
 * Running script '/lib/functions/firewall-mmpbx.sh'
 * Running script '/lib/functions/weburl-tch.sh'
no LAN interface given, disabled weburl!
sh: write error: Invalid argument
 * Running script '/lib/functions/firewall-dropbear.sh'
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
Root Script: Detected low flash space device...
lua: (command line):1: ')' expected near 't'
lua: (command line):1: ')' expected near 't'
Warning: Option @zone[0].wan is unknown
Warning: Option @zone[1].wan is unknown
Warning: Option @zone[2].wan is unknown
Warning: Option @zone[3].wan is unknown
Warning: Section @zone[3] (wan) cannot resolve device of network 'wan'
Warning: Section @zone[3] (wan) cannot resolve device of network 'wwan'
Warning: Section @zone[3] (wan) cannot resolve device of network 'wan6'
Warning: Section @zone[3] (wan) cannot resolve device of network 'wwan_4'
Warning: Section @zone[3] (wan) cannot resolve device of network 'wwan_6'
Warning: Section @zone[3] (wan) has no device, network, subnet or extra options
 * Flushing IPv4 filter table
 * Flushing IPv4 nat table
 * Flushing IPv4 mangle table
 * Flushing IPv4 raw table
 * Flushing IPv6 filter table
 * Flushing IPv6 mangle table
 * Flushing IPv6 raw table
 * Flushing conntrack table ...
 * Populating IPv4 filter table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
   * Rule 'drop_lan_2_Guest1'
   * Rule 'drop_Guest1_2_lan'
   * Rule 'drop_lan_2_Guest1_5GHz'
   * Rule 'drop_Guest1_5GHz_2_lan'
   * Rule 'drop-lan_2_Guest1_GW'
   * Rule 'drop-lan_2_Guest1_5GHz_GW'
   * Rule 'drop-lan_2_hotspot'
   * Rule 'drop-Guest_2_hotspot'
   * Rule 'drop-Guest5G_2_hotspot'
   * Rule 'Allow-Guest1_ICMP'
   * Rule 'Allow-Guest1_DHCP'
   * Rule 'Allow-Guest1_DNS'
   * Rule 'Allow-Guest1_5GHz_ICMP'
   * Rule 'Allow-Guest1_5GHz_DHCP'
   * Rule 'Allow-Guest1_5GHz_DNS'
   * Rule 'Allow-DHCP-Renew'
   * Rule 'Deny-CUPS-wan'
   * Rule 'SSH_wan'
   * Rule 'Default action for outgoing NAT'
   * Forward 'lan' -> 'wan'
   * Forward 'Guest1' -> 'wan'
   * Forward 'Guest1_5GHz' -> 'wan'
 * Populating IPv4 nat table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
 * Populating IPv4 mangle table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
 * Populating IPv4 raw table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
 * Populating IPv6 filter table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
   * Rule 'drop_lan_2_Guest1'
   * Rule 'drop_Guest1_2_lan'
   * Rule 'drop_lan_2_Guest1_5GHz'
   * Rule 'drop_Guest1_5GHz_2_lan'
   * Rule 'Allow-Guest1_ICMPv6'
   * Rule 'Allow-Guest1_5GHz_ICMPv6'
   * Rule 'Allow-Ping6'
   * Rule 'Allow-DHCPv6'
   * Rule 'Allow-ICMPv6-Input'
   * Rule 'Allow-ICMPv6-Forward'
   * Rule 'Deny-CUPS-lan-v6'
   * Rule 'Default action for outgoing NAT'
   * Forward 'lan' -> 'wan'
   * Forward 'Guest1' -> 'wan'
   * Forward 'Guest1_5GHz' -> 'wan'
 * Populating IPv6 mangle table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
 * Populating IPv6 raw table
   * Zone 'lan'
   * Zone 'Guest1'
   * Zone 'Guest1_5GHz'
   * Zone 'wan'
 * Set tcp_ecn to off
 * Set tcp_syncookies to on
 * Set tcp_window_scaling to on
 * Running script '/etc/firewall.user'
 * Running script '/lib/functions/firewall-restart-ext-tch.sh'
 * Running script '/lib/functions/firewall-ext-tch.sh'
 * Running script '/lib/functions/tod.sh'
 * Running script '/usr/lib/intercept/firewall.sh'
 * Running script '/lib/functions/firewall-wol.sh'
   ! Skipping due to path error: No such file or directory
 * Running script '/usr/share/miniupnpd-tch/firewall.include'
 * Running script '/lib/functions/firewall-mmpbx.sh'
 * Running script '/lib/functions/weburl-tch.sh'
no LAN interface given, disabled weburl!
sh: write error: Invalid argument
 * Running script '/lib/functions/firewall-dropbear.sh'
uci: Invalid argument
killall: dnsmasq: no process killed
root@mygateway:/etc#
FrancYescO commented 5 years ago

wlctl cap shows no sta mode on all other similar hardware, so basically wifi card of these hardware can be used only in AP mode

nclmrc commented 5 years ago

The best solution for me is here https://openwrt.org/docs/guide-user/network/wifi/relay_configuration You can put the repeater in the same subnet. Insert the ip of wifi dhcp client also in relay bridge.

FrancYescO commented 5 years ago

the issue is still that this is not applicable on technicolor device as they cannot act as wifi client (needed to connect to a phone hotspot..)... are you using it on another router or simply the routers are connected via lan?!

kevdagoat commented 5 years ago

I think this should be closed, as the wl driver for this chip are all closed source, so there is no hope for STA mode