All attempts at making trelay work failed, solved

Hi!

I have old but revamped laptop with a wifi card too sensitive to high temperature (a problem in Brazil!). Normally at home I use a wired connection but on the road I would like to reuse a pocket router (gl.inet 6416) as a wifi to ethernet "converter". In the past I already had configured sucessfully the "relayd" solution but it requires a static ip which means reconfiguring each time I connect to my in-laws home network since I have no control over their ISP router.

Based on those articles (1 2 3) I decided to give a try at "trelay" to avoid static IPs. Unfortunately I tried many possible combinations but none worked. I suspect that vlan capability might be the culprit but I am not sure.

config & infos (only pertinent parts)
Hostname           gl-6416
Model              GL.iNet 6416
Architecture       Atheros AR9330 rev 1
Target Platform    ath79/generic
Firmware Version   OpenWrt 23.05.2 r23630-842932a63d / LuCI openwrt-23.05 branch git-23.306.39416-c86c256

config device
        option name 'phy0-sta0'

config device
        option name 'eth0'

config interface 'admin'
        option proto 'static'
        option device 'eth1'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option delegate '0'

config interface 'lan'
        option proto 'none'
        option device 'eth0'

config interface 'wlan'
        option proto 'none'
        option device 'phy0-sta0'

config trelay
        option enabled  1
        option dev1     eth0
        option dev2     phy0-sta0

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/ahb/18100000.wmac'
        option channel 'auto'
        option band '2g'
        option htmode 'HT20'
        option country 'BR'
        option cell_density '0'

config wifi-iface 'wifinet1'
        option device 'radio0'
        option mode 'sta'
        option ssid 'someSSID'
        option encryption 'psk2'
        option key 'somepassword'
        option network 'wlan'


Tue Mar 19 09:24:49 2024 kern.info kernel: [  790.311195] trelay: eth0 <-> phy0-sta0: started

Duh!!!!!! I did not read well enough to catch that you absolutely need to "paste" the mac address of the device connected to the ethernet port on the wifi client definition/advanced. I was using the mac address of the ethernet ports...not good. Works like a charm now. The only difference in the wireless config is the destination mac address:

config wifi-iface 'wifinet1'
        option device 'radio0'
        option mode 'sta'
        option ssid 'someSSID'
        option encryption 'psk2'
        option key 'somepassword'
        option network 'wlan'
        option macaddr '64:00:6A:XX:YY:ZZ'

For an even more complete solition you may refer to my spin off post

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.