How to configure raspberry pi 3b+ as a repeater

i want to make a wireless-repeater with a RPI3B+.

i could configure the RPI in client mode ( so the RPI connects to an AP), and also i succeeded to configure it as an AP bridged to the eth0.

but when i try to set-up the repeater configuration with 'relayd' , it didn't work at all.

My question is : is it possible to make a repeater with the RPI3B+ (without using a wifi-dongle).

If yes , how to do it?
Regards.

Check travelmate package.

thanks for your reply,

i installed travelmate and i configured the file wireless , firewall and network , but it didn't work ,

network :

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd79:3fcb:dd61::/48'


config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'trm_wwan'
        option proto 'dhcp'

wireless :

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option path 'platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option disabled '0'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'trm_wwan'
        option mode 'sta'
        option ssid 'OpenWrt'
        option encryption 'psk2'
        option key '123456'
        

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt-Repeater'
        option encryption 'psk2'
        option key '123456'

firewall :

config zone
        option name 'wan'
        option network 'wan wan6 trm_wwan'

/*************************/

Error message :

[  223.662739] br-lan: port 1(wlan0-1) entered disabled state
[  223.909109] ieee80211 phy0: brcmf_link_down: WLC_DISASSOC failed (-52)
[  224.015034] br-lan: port 1(wlan0-1) entered blocking state
[  224.023231] br-lan: port 1(wlan0-1) entered forwarding state
[  224.672250] br-lan: port 1(wlan0-1) entered disabled state
[  227.197402] ieee80211 phy0: brcmf_link_down: WLC_DISASSOC failed (-52)
[  227.302371] br-lan: port 1(wlan0-1) entered blocking state
[  227.310304] br-lan: port 1(wlan0-1) entered forwarding state
[  232.123685] br-lan: port 1(wlan0-1) entered disabled state
[  232.309497] ieee80211 phy0: brcmf_link_down: WLC_DISASSOC failed (-52)
[  232.415029] br-lan: port 1(wlan0-1) entered blocking state
[  232.423013] br-lan: port 1(wlan0-1) entered forwarding state
[  233.192351] br-lan: port 1(wlan0-1) entered disabled state
[  233.992082] br-lan: port 1(wlan0-1) entered blocking state
[  233.999782] br-lan: port 1(wlan0-1) entered forwarding state
[  243.031462] ieee80211 phy0: brcmf_escan_timeout: timer expired
[  243.502861] br-lan: port 1(wlan0-1) entered disabled state
[  244.573292] device wlan0-1 left promiscuous mode
[  244.580298] br-lan: port 1(wlan0-1) entered disabled state

First of all fix your post above and use preformatted text </> when pasting code.
Then add the travelmate configuration as well.
Finally keep in mind that the access point will not work if the station has not connected first.

the station is well connected to the ap but when i add the travelmate configuration , the connection was no more established

uci show travelmate

/etc/init.d/travelmate status

uci show travelmate

travelmate.global=travelmate
travelmate.global.trm_enabled='1'
travelmate.global.trm_captive='1'
travelmate.global.trm_proactive='1'
travelmate.global.trm_netcheck='0'
travelmate.global.trm_autoadd='0'
travelmate.global.trm_iface='trm_wwan'
travelmate.global.trm_triggerdelay='2'
travelmate.global.trm_debug='0'
travelmate.global.trm_maxretry='5'
travelmate.global.trm_listexpiry='0'
travelmate.global.trm_minquality='35'
travelmate.global.trm_maxwait='30'
travelmate.global.trm_timeout='60'
travelmate.global.trm_rtfile='/tmp/trm_runtime.json'

/etc/init.d/travelmate status
::: travelmate runtime information
  + travelmate_status  : running / not connected
  + travelmate_version : 1.4.13
  + station_id         : -/-/-
  + station_interface  : -
  + faulty_stations    : radio0/OpenWrt/-
  + last_rundate       : 2019.10.10-14:02:01
  + system             : Raspberry Pi 3 Model B Plus Rev 1.3, OpenWrt SNAPSHOT r10570-0e6d97f

It is not connected.
Make sure the ssid and key in /etc/config/wireless are correct.
Restart travelmate. In case it doesn't work enable debug and post here the logs

To debug travelmate runtime problems, please always enable the 'trm_debug' flag, restart travelmate and scan the system log ( logread -e "travelmate" )

the ssid and key are correct ( connection established before adding travelmate configuration ).

when i add

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt-Repeater'
        option encryption 'psk2'
        option key '123456'
        option disabled '0' 

it looks like travelmate set "option disabled '0' " to '1' " automatically.

Thu Oct 10 15:19:25 2019 user.debug travelmate-1.4.13[1305]: f_jsnup::: config: default_radio0, status: connected (net ok/100), sta_iface: trm_wwan, sta_radio: radio0, sta_essid: Open0
Thu Oct 10 15:19:25 2019 user.debug travelmate-1.4.13[1305]: f_check::: mode: initial, name: wlan0, status: true, connection: net ok/100, wait: 1, max_wait: 30, min_quality: 35, capti0
Thu Oct 10 15:19:25 2019 user.debug travelmate-1.4.13[1305]: f_main ::: status: true, proactive: 1
Thu Oct 10 15:19:25 2019 user.debug travelmate-1.4.13[1305]: f_prep ::: config: default_radio0, mode: sta, network: trm_wwan, radio: radio0, trm_radio: -, trm_active_sta: default_radi0
Thu Oct 10 15:19:25 2019 user.debug travelmate-1.4.13[1305]: f_prep ::: config: cfg033579, mode: ap, network: lan, radio: radio0, trm_radio: -, trm_active_sta: default_radio0, proacti:
Thu Oct 10 15:19:25 2019 user.debug travelmate-1.4.13[1305]: f_check::: mode: dev, name: radio0, status: true, connection: net ok/100, wait: 1, max_wait: 30, min_quality: 35, captive:0
Thu Oct 10 15:19:25 2019 user.debug travelmate-1.4.13[1305]: f_main ::: active_radio: radio0, active_essid: "OpenWrt", active_bssid: -
Thu Oct 10 15:19:25 2019 user.debug travelmate-1.4.13[1305]: f_main ::: iwinfo: /usr/bin/iwinfo, dev_list: radio0, sta_list: default_radio0-radio0, faulty_list: -
Thu Oct 10 15:19:25 2019 user.debug travelmate-1.4.13[1305]: f_main ::: active station prioritized 'radio0/OpenWrt/-' - break
Thu Oct 10 15:19:27 2019 user.debug travelmate-1.4.13[1305]: f_net  ::: fetch: /bin/uclient-fetch, timeout: 5, url: http://captive.apple.com, result: net ok
Thu Oct 10 15:19:27 2019 user.debug travelmate-1.4.13[1305]: f_jsnup::: config: default_radio0, status: connected (net ok/100), sta_iface: trm_wwan, sta_radio: radio0, sta_essid: Open0
Thu Oct 10 15:19:27 2019 user.debug travelmate-1.4.13[1305]: f_check::: mode: initial, name: wlan0, status: true, connection: net ok/100, wait: 1, max_wait: 30, min_quality: 35, capti0
Thu Oct 10 15:19:55 2019 user.debug travelmate-1.4.13[1305]: f_net  ::: fetch: /bin/uclient-fetch, timeout: 5, url: http://captive.apple.com, result: net nok
Thu Oct 10 15:19:55 2019 user.info travelmate-1.4.13[1305]: uplink 'OpenWrt/-' is out of range (0/35)
Thu Oct 10 15:19:55 2019 user.debug travelmate-1.4.13[1305]: f_jsnup::: config: default_radio0, status: running / not connected, sta_iface: trm_wwan, sta_radio: radio0, sta_essid: Ope0
Thu Oct 10 15:19:55 2019 user.debug travelmate-1.4.13[1305]: f_check::: mode: initial, name: wlan0, status: false, connection: -, wait: 1, max_wait: 30, min_quality: 35, captive: 1, n0
Thu Oct 10 15:20:00 2019 user.debug travelmate-1.4.13[1305]: f_net  ::: fetch: /bin/uclient-fetch, timeout: 5, url: http://captive.apple.com, result: net nok
Thu Oct 10 15:20:00 2019 user.debug travelmate-1.4.13[1305]: f_jsnup::: config: default_radio0, status: running / not connected, sta_iface: trm_wwan, sta_radio: radio0, sta_essid: Ope0
Thu Oct 10 15:20:00 2019 user.debug travelmate-1.4.13[1305]: f_check::: mode: initial, name: wlan0, status: false, connection: -, wait: 1, max_wait: 30, min_quality: 35, captive: 1, n0
Thu Oct 10 15:20:00 2019 user.debug travelmate-1.4.13[1305]: f_main ::: status: false, proactive: 1
Thu Oct 10 15:20:00 2019 user.debug travelmate-1.4.13[1305]: f_prep ::: config: default_radio0, mode: sta, network: trm_wwan, radio: radio0, trm_radio: -, trm_active_sta: -, proactive0
Thu Oct 10 15:20:00 2019 user.debug travelmate-1.4.13[1305]: f_prep ::: config: cfg033579, mode: ap, network: lan, radio: radio0, trm_radio: -, trm_active_sta: -, proactive: 1, trm_ea:
Thu Oct 10 15:20:05 2019 user.debug travelmate-1.4.13[1305]: f_check::: mode: dev, name: radio0, status: false, connection: -, wait: 1, max_wait: 30, min_quality: 35, captive: 1, netc0
Thu Oct 10 15:20:05 2019 user.debug travelmate-1.4.13[1305]: f_main ::: iwinfo: /usr/bin/iwinfo, dev_list: radio0, sta_list: default_radio0-radio0, faulty_list: -
Thu Oct 10 15:20:05 2019 user.debug travelmate-1.4.13[1305]: f_main ::: sta_radio: radio0, sta_essid: "OpenWrt", sta_bssid: -
Thu Oct 10 15:20:11 2019 user.debug travelmate-1.4.13[1305]: f_main ::: scan_buffer: 1024, scan_list: 100,B8:27:EB:11:C1:F8,"OpenWrt",-,91,AC:84:C9:02:44:B7,"MiFibra-44B0-5G",-,91,4
Thu Oct 10 15:20:11 2019 user.debug travelmate-1.4.13[1305]: f_main ::: scan_quality: 100, scan_essid: "OpenWrt", scan_bssid: B8:27:EB:11:C1:F8, scan_open: -
Thu Oct 10 15:20:48 2019 user.debug travelmate-1.4.13[1305]: f_check::: mode: sta, name: wlan0, status: false, connection: -, wait: 31, max_wait: 30, min_quality: 35, captive: 1, netc0
Thu Oct 10 15:20:53 2019 user.debug travelmate-1.4.13[1305]: f_check::: mode: rev, name: -, status: false, connection: -, wait: 1, max_wait: 30, min_quality: 35, captive: 1, netcheck:0
Thu Oct 10 15:20:53 2019 user.debug travelmate-1.4.13[1305]: f_jsnup::: config: -, status: running / not connected, sta_iface: -, sta_radio: -, sta_essid: -, sta_bssid: -, faulty_list0
Thu Oct 10 15:20:53 2019 user.info travelmate-1.4.13[1305]: can't connect to uplink 'radio0/OpenWrt/-' (1/5, Raspberry Pi 3 Model B Plus Rev 1.3, OpenWrt SNAPSHOT r10570-0e6d97f)
Thu Oct 10 15:21:35 2019 user.debug travelmate-1.4.13[1305]: f_check::: mode: sta, name: wlan0, status: false, connection: -, wait: 31, max_wait: 30, min_quality: 35, captive: 1, netc0

Are you a bit far from the AP maybe?

no , the distance between the ap and the station is about 10 centimeters :slight_smile:

Does the wireless chip on the RPi support simultaneous STA and AP?

i think yes

iw phy0 info
  valid interface combinations:
                 * #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
                   total <= 3, #channels <= 2
                 * #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
                   total <= 4, #channels <= 1

1 Like

I just tried it on my Roadwarrior Carambola2 and worked like a charm.
Installed both TRM and Luci-app. I did the changes in Luci, but most things were left to defaults.

/etc/config/network

 config interface 'trm_wwan'
 	option proto 'dhcp'

/etc/config/firewall

 config zone
	option name 'wan'
	option network 'lte wan wwan trm_wwan'

/etc/config/wireless

 config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'platform/ar933x_wmac'
	option disabled '0'
	option htmode 'HT40'
	option country 'CZ'
	option legacy_rates '0'
	option distance '30'
	option channel '11'

config wifi-iface
	option ssid 'trendy-hotspot'
	option encryption 'psk2'
	option device 'radio0'
	option key 'SomeKey'
	option mode 'ap'
	option network 'lan'
	option wpa_disable_eapol_key_retries '1'

config wifi-iface
	option network 'trm_wwan'
	option device 'radio0'
	option mode 'sta'
	option ssid 'trendy-guest'
	option encryption 'none'
	option disabled '0'

travelmate status

::: travelmate runtime information
  + travelmate_status  : connected (net ok/45)
  + travelmate_version : 1.2.2
  + station_id         : radio0/trendy-guest/-
  + station_interface  : trm_wwan
  + faulty_stations    : 
  + last_rundate       : 11.10.2019 00:07:25
  + system             : 8devices Carambola2 board, OpenWrt 18.06.2 r7676-cddd7b4c77

In my debugs I can see clearly the message that it connected:

Thu Oct 10 23:58:12 2019 user.info travelmate-1.2.2[13007]: connected to uplink 'radio0/trendy-guest/-' (8devices Carambola2 board, OpenWrt 18.06.2 r7676-cddd7b4c77)

which I don't see in your logs. However I think that in f_jsnup lines it shows some connection, which is lost later. What I don't have at all is the f_net, most likely to detect captive portals, which results to nok so maybe something is wrong there.

I don't have any ideas, so unless someone else has, maybe you could ask user dibdot.

i checked how to configure a repeater on raspbian and it worked very well, (this is the link to the tutorial that i followed it : https://raspberrypi.stackexchange.com/questions/89803/access-point-as-wifi-router-repeater-optional-with-bridge ).

The idea is to disable debian networking and dhcpcd , then Enable systemd-networkd and finally use hostapd to configure an AP , and wpa_supplicant to configure a STA. All the configurations are done via systemd.

However, systemd is not available on openwrt and hostapd & wpa_supplicant don't work on OWRT as the same way on Raspbian because the UCI system generates them dynamically by parsing the /etc/config/wireless file when wifi is started up.
My questions is :
1/ Can systemd work on openwrt ? if yes,How to added it.
2/ Can i disable the file wireless and configure wifi with hostapd and wpa-supplicant.

OpenWrt uses procd, not systemd, systemctl, init, or the like. No, it is an integral part of the distro, and the steps you describe are not applicable to OpenWrt as there is no "Debian networking" or "networkd" on OpenWrt.

Networking is managed by netifd and the hostap config files are generated on-the-fly from the UCI configuration.

In short, if you want Raspbian, you need to install Rasbpian.

1 Like

ok , i want to know the repeater configuration under OpenWrt

It would be faster to post your configs and in the travelmate thread.

Sorry, I have no experiences with broadcom chipsets/raspberry devices - I don't know if/why they don't support mixed ap/sta mode setups. I can't help with such devices.