Subject: Enable AP and Station Mode Simultaneously with AzureWave AW-CM276NF
Hello,
I’m using an AzureWave AW-CM276NF wireless module, and I want to enable both AP mode and station mode simultaneously on the server side.
So far, I’ve successfully enabled AP mode with a static IP address and launched a web server using Flask and Python. The web server is accessible at http://192.168.0.1:8080. In the Flask script, I use connman commands to:
Enable Wi-Fi
Set up the access point
Show available Wi-Fi networks in a dropdown box
Accept the SSID and password for connecting to a network
However, when I run the script, I encounter the following error:
error:
Enabling Wi-Fi…
wifi is already enabled
Setting up Access Point…
Error setting wifi SSID: The name net.connman was not provided by any .service files
Access Point ‘VerdinAP’ started
Waiting for 192.168.0.1…
IP address is now active.
Starting Flask web server at http://192.168.0.1:8080…
Serving Flask app ‘flaskapsta8’
Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
Running on http://192.168.0.1:8080
Press CTRL+C to quit
[ 397.223082] tether: port 1(mlan0) entered disabled state
The access point starts, but I am unable to list the available Wi-Fi networks on the web page or connect to a network while in **AP mode**.
My goal is to:
1. Enable **AP mode** and **station mode** simultaneously.
2. Show available Wi-Fi networks in the dropdown after the web server starts in **AP mode**.
3. Allow users to select a Wi-Fi network and connect using **connman**.
Could you please help me resolve these errors and set up simultaneous AP and station modes correctly?
Thank you!
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
Thank you for reaching out with your question about enabling both AP and Station modes on your AzureWave AW-CM276NF module. Let’s address the issues you’re encountering and guide you through the setup.
Driver and Firmware Support: First, ensure that your wireless driver supports concurrent mode operation. The NXP 88W8997 chipset in your module typically supports this feature, but it must be enabled in the driver. Check your driver’s documentation for details on enabling concurrent mode.
Connman Configuration: Since you’re using connman, verify that it is configured to manage both AP and Station modes. You may need to edit connman’s configuration files to define both interfaces and their roles. Ensure that the connman service is running correctly by checking its status with systemctl status connman and restarting it if necessary.
Error Handling: The error “The name net.connman was not provided by any .service files” suggests an issue with the connman service. Make sure the service is properly registered and started. This might involve reinstalling or reconfiguring connman.
Hostapd Configuration: If you’re using hostapd for AP mode, ensure it is correctly configured and does not conflict with Station mode settings. You may need to specify different interfaces for AP and Station modes in your configuration files.
Network Interface Management: Use ifconfig or ip commands to verify that both network interfaces are up and running. You should see separate interfaces, such as uap0 for AP and wlan0 for Station.
Testing and Debugging: Start by ensuring that AP mode is stable. Then, attempt to connect to a Wi-Fi network in Station mode. Monitor system logs using dmesg and journalctl for any errors or warnings that could provide further insights.
By following these steps, you should be able to configure your system to support both AP and Station modes simultaneously. If you encounter further issues, reviewing the specific driver documentation for additional configuration options may be helpful.
I hope this helps you achieve your goal. If you have any more questions, feel free to ask.
Best regards,
Toradex AI Assistant.
Please, also check if these links can help you solve your problem:
I saw you opened three topics about the same question. I’ll ask you to not do this.
It creates an unnecessary amount of tickets for the support team and it makes it harder to focus on what needs to be answered. The next time, I’ll recommend you open only one topic with all the info and details that you have and wait for our response.
About your issue, please check the article about Networking with Torizon OS. There you can find more information about how to use the SoM as both an AP and a Client. Besides, please be sure both Client and AP mode are on the same channel (2.4 GHz or 5 GHz), otherwise, it might not work.