I seem to be having a small problem with the Soft AP pass through mode (CE = 1, DO = 0). Although I have successfully configured the module and the module is working as a AP, it does not appear to commit the Soft AP configuration to flash with the WR command. When I reboot the XBee all the Soft AP settings are lost and I need to re-configure them via resending the required AT commands from my application.
I should point out this is a small recent change to my application, which previously operated only in STA mode. I have simply added the ability to configure CE=1 or 2 according to user requirements and issue identical set of AT commands otherwise.
When I configure CE=2 (STA mode) followed by WR, on reboot the STA settings are retained and the device joins the network automatically (just at it did previously). All well and good.
However if I set CE=1 (Soft AP mode) and issue a WR, the Soft AP comes up and works immediately following being configured - but the SoftAP settings are lost on a subsequent reboot.
For example on reboot the SSID is blank and encryption is set Open (not WPA2 as configured). As a result no Soft AP is broadcast.
Question: Should the S6B be able to commit a Soft AP pass through configuration to flash with a WR command? Does anyone else have this working? Or is it really necessary to re-configure Soft AP Pass Through mode on each reboot?
Many thanks in advance for your input.
Try setting DO to a value of 2 instead of a 1. What this does is Enables Pin field 1 (Enable Soft AP) and not bit field 0 which enables infrastructure modem.
Thanks, but when I said DO=0 I was indicating that I was setting bit 1 (i.e. Mask value 0x02) to zero. I am not setting the value of the whole DO register to 1. In fact my entire DO settings (if you are interested) for both AP and STA mode are configured as all bits ZERO (DO=0x00) as I am not interested in any of the device cloud or exposing provisioning mode.
Please note, unless I am reading the “Enable Soft AP Mode” section of the manual wrong, I do NOT want “Soft AP Provisioning Mode” which is what this bit controls. I want the “Soft AP Pass Through Mode”.
I don’t want the device coming up with the default SSID (with the MAC address as part of the SSID) and providing a web interface (Provisioning mode) as the Soft AP. I want a user defined Soft AP SSID to which the user can connect a second device in the field (a Third party WiFi printer) and communicate with it from my hardware with the XBee built into it.
Also note that the SoftAP is working as I require once I have it configured. It’s just saving of the Soft AP settings that are failing. On hard reboot of the XBee the SSID is being lost (despite a WR being issued). If I configure standard STA mode, all settings are correctly retained.
Relevant quote from manual. Note I am doing what is says to disable provisioning mode (clear bit 1 of DO):
Enable Soft AP mode
The module operates in Soft AP mode in two different ways: provisioning mode and pass through mode. These two Soft AP modes are enabled differently.
Pass through mode is enabled by setting CE to 1, which is not the default configuration. When CE is 1, it overrides parameters for provisioning mode.
Provisioning mode is enabled by default. It may be disabled by clearing bit 1 of DO. The other requirement to enable provisioning mode is that SSID must be NULL. Again, SSID is NULL by default and it may be forced to NULL by issuing the NR command.
I am not able to reproduce the issue you are seeing. When I do this with an S6B module running firmware version 2026 it works exactly as expected. That is I issue a +++ and get the OK. Then I issue ATCE1 ATWR and ATCN getting the OK after each step. I then power cycle the module and read the CE command. It has retained its value I set it to.