Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Hello Ian,
Thank you for your detailed question!
When using concurrent Wi-Fi modes (AP and client) on your Verdin iMX8MP, both interfaces should operate on the same Wi-Fi channel for proper functionality. However, there isn’t a built-in mechanism to automatically synchronize channels between AP and client modes. Here’s what you can consider:
1. Setting Channel in AP Mode:
- In your hostapd.conf, you can set a fixed channel with
channel=40
, as you have done. - Alternatively, you can use
channel=0
, which lets hostapd select the channel automatically based on regulatory requirements and available channels. However, this still does not synchronize the channel with a concurrent client connection.
Reference: How to Setup Wi-Fi Access Point Mode - Configuration
2. Concurrent Operation:
- When running both AP and client modes, many Wi-Fi chipsets force the AP to operate on the channel of the network that the client is connected to. Typically, you must ensure that both interfaces (AP and client) are on the same band (e.g., 2.4 GHz or 5 GHz) and channel.
- The exact behavior often depends on the wireless chipset, driver capabilities, and firmware. Documentation & logs can help you verify what is happening at runtime.
Reference: AP mode and Station mode enabling simultaneously
3. Manual Synchronization:
- For automation, you could develop a userspace script that:
- Monitors the client connection and reads the current channel.
- Updates hostapd.conf with this channel.
- Restarts the hostapd service if the channel changes.
- Here is a generic approach:
- Use
iw dev wlan0 link
oriw dev wlan0 info
to determine the current channel for your client interface. - Dynamically adjust the AP channel by modifying
hostapd.conf
and restarting hostapd as needed.
- Use
- Note: This may cause short outages when switching channels and won’t work for all wireless drivers/chipsets.
Monitor System Logs:
- Always check logs (
dmesg
,journalctl
, or hostapd logs) for messages about channel conflicts or driver capability limitations.
Key References:
- Networking with Torizon OS | Toradex Developer Center
- How to Setup Wi-Fi Access Point Mode - Configuration
- AP mode and Station mode enabling simultaneously
If you would like example scripts or a more detailed step-by-step, please let me know!
Best regards,
Toradex AI Assistant.