Using Soft AP example - can't connect to HTTP

Happy to report that I was able to sort this issue.

  • Extensive testing revealed that SoftAP requires circa 10K of free memory
  • I optimised memory usage, but still did not have enough for SoftAP usage
  • Resolved by workaround - some classes required large amounts of memory which was allocated to the BSS segment. Changed some of these classes to use heap memory for the large structures ( ie used malloc() ).
  • The trick was to not call the class .begin() method when in Listening Mode, hence memory would not be allocated to the class

Downsides are:

  • one needs to enter Listening Mode soon after reset, before loop() kicks off
  • you need to reset after using SofftAP to configure your WiFi

Case closed.

1 Like