Skip to content

ESP8266WiFi: add support for String arguments to begin and softAP methods #3213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
treii28 opened this issue May 8, 2017 · 5 comments
Closed

Comments

@treii28
Copy link

treii28 commented May 8, 2017

This is for the Arduino platform. The Arduino standard library includes a type String. Why do I still need to add a .c_str() to the end of all my parameters???

e.g.: WiFi.softAP(ssid.c_str(). passwd.c_str());

@Humancell
Copy link

You don't have to add it to all of your parameters, but in this case the API that you referenced is expecting two pointers to char buffers.

The API is designed to be similar to the Arduino WiFi APIs ... which also take char buffers.

https://www.arduino.cc/en/Reference/WiFiBegin

@igrr
Copy link
Member

igrr commented May 8, 2017

The latest official WiFi101 library does support String arguments:
https://github.com/arduino-libraries/WiFi101/blob/master/src/WiFi101.h#L116
so i suppose this is a valid enhancement request.

@igrr igrr changed the title Update the methods please! ESP8266WiFi: add support for String arguments to begin and softAP methods May 8, 2017
@treii28
Copy link
Author

treii28 commented May 8, 2017

but aren't most of the Arduino WiFi APIs built to talk to a connected ESP8266 module?

@Humancell
Copy link

Humancell commented May 8, 2017

No. The Arduino WiFi APIs were designed to support the Arduino WiFi shield. You know that you can easily Google this type of information: https://www.arduino.cc/en/Reference/WiFi

This project is very different:

This project brings support for ESP8266 chip to the Arduino environment. It lets you write sketches using familiar Arduino functions and libraries, and run them directly on ESP8266, no external microcontroller required.
ESP8266 Arduino core comes with libraries to communicate over WiFi using TCP and UDP, set up HTTP, mDNS, SSDP, and DNS servers, do OTA updates, use a file system in flash memory, work with SD cards, servos, SPI and I2C peripherals.

This project has been working to replicate the Arduino APIs, and Arduino WiFi APIs, but on the ESP8266-based hardware ... which has integrated WiFi capabilities.

@devyte devyte self-assigned this Dec 23, 2018
@devyte devyte added this to the 2.5.0 milestone Dec 23, 2018
@devyte
Copy link
Collaborator

devyte commented Dec 23, 2018

Closing via #5295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants