0

I want to use me linux IMX7 device as wifi repeater (access point wifi client):

           wifi                        wifi            wan
TABLET <~.~.~.~.~> (ap0) IMX7 (wlan0) <.~.~.~.~.> ROUTER <───> INTERNET
   |                 | (connman)   |                 |
   |                 |             |                 |
 (dhcp)         192.168.4.1     (dhcp)          192.168.10.1

according to this guide: Access point as WiFi repeater, optional with bridge.

The IMX7 is running an application using connman to configure eth0 and wlan0 (its given, I cant change that).

At start, the IMX7 creates an access point on some channel using hostapd.

                                  backend
                                  --------                                       
                  channel6 ( ( (  | IMX7 |      
                                  --------  

Then, I connect with a tablet.

frontend                           backend
---------                         --------                                 
| TABLET | ( ( (  channel6 ( ( (  | IMX7 |      
---------                         --------  

The application on the backend shall show me available wifis in the area. The backend shall then connect to the selected (from frontend) access point.

 frontend                         backend       
---------                         --------                         -------                  
| TABLET | ( ( (  channel6 ( ( (  | IMX7 |  ( ( ( channel 11 ( ( ( | AP1 |   
---------                         --------                         -------

Because ap0 and wlan0 have to be on the same channel, hostapd creating wifi on ap0 has to be reconfigured to use channel 11 here.

frontend                           backend
---------                          --------                         -------                  
| TABLET | ( ( (  channel11 ( ( (  | IMX7 |  ( ( ( channel 11 ( ( ( | AP1 |   
---------                          --------                         -------

My problem is, that I have an application running on the imx7 that does configure the eth0 and wlan0 interface via connman and I can't change that. So when creating .network files for systemd-networkd for wlan0, the "wifi technology" disappears from connmanctl.

Further, the channel that hostapd uses has to be the same, that the access point (AP) uses. So at first, the IMX7 uses a fixed channel for hostapd. After connection to any access point, the channel of hostapd has to be changed to the same. I find it rather hackish to rewrite the config file and restart hostapd.

So the question is, if it is possible in general to have connman and systemd-netword running in parallel. Or how would you solve that problem?

Thanks a lot, I hope I have showed the problem so you can understand it.

Michael

1

What is a IMX7 device? Is it a Raspberry Pi? The tutorial you have linked to is made for a Raspberry Pi with extensive using systemd-networkd and its dependency management. Look at the Details - General section. There are three steps that must always be done in a strict order.

I suppose connman (you don't gave a link) is one of the scripts that automated setup of an access point. It's advantage is that you do not have to know much about networking, it's disadvantage is that they do things you cannot control. I also suppose connman is using old style networking using ifupdown to control /etc/network/interfaces and/or dhcpcd and dnsmasq and things, but even not systemd-networkd. So I'm not very hopeful that it can be used together with systemd-networkd.

You noted that you have always to change the channel for hostapd to the same channel than the client connection has. On my tests I have found that this isn't necessary. The channel option in /etc/hostapd/hostapd.conf must be present but has no meaning. As far as the client connection is established it will also change the channel of the access point. That means that the channel the internet router (192.168.10.1) is using, determines the channel of the local access point (192.168.4.1).

To avoid this limitations you may consider to use an additional wifi dongle so you have two independent physical interfaces. An example for this using a Raspberry Pi with systemd-networkd you can find at Access point as WiFi repeater with additional WiFi-dongle.

  • thanks for your answer. I had the problem, that when I did not change the wifi channel, wpa_supplicant could not associate with the access point. I will check that again. – Michael Mar 9 at 12:41
  • But I am not sure how well it will work for the tablet to keep connection, if the access point created by hostapd will change its channel. – Michael Mar 9 at 12:44
  • The problem of manual switching the hostapd channel is with connman, isn't it? To avoid this I have suggested to use an additional physical wifi device. – Ingo Mar 9 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.