Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By joerlane
#13054 I started playing with some example sketches and went ahead and setup an access point with WiFi.mode(WIFI_AP); This works just fine with the default ssid and channel. The problem was that I'm in an environment where the local AP is also on channel 1 (default of the ESP8266 in this case).

I poked around the ESP8266WiFi.h file and noticed I could use softAP(ssid, pass, channel);. I changed the name of the AP, set a password and channel 6. When attempting to connect to this network I am able to connect but my computer insists that I have a self assigned IP address. It continues to try and obtain an IP address but I never end up with 192.168.4.2 or an assigned router for that matter. I'm using OS X 10.9 at the moment but I doubt that makes much difference considering it works both other ways; see below.

When using the command softAP(ssid); I can assign a new network name and everything works fine as in the mode(WIFI_AP); except of course that I’m still on channel 1.

I’m pretty sure this is a bug but considering how green I am with this perhaps I’m missing something.

On an unrelated note; is there a way to digitalRead(PORTX) or the status of individual output pins? I was playing around with the example code and wanted to read the status of a GPIO output pin and return the information to the user in the event they made an invalid request. I don’t want to actually change the pin to an input; just see whether the output status is currently high or low.
User avatar
By igrr
#13170 You can read the port output register by doing
Code: Select alluint32_t portVal = *portOutputRegister(0);

Each bit will correspond to one of the pins, so to get the status of pin p you would do something like this:
Code: Select alluint32_t state = ((*portOutputRegister(0)) >> p) & 1;


For the SoftAP issue when the channel is set, let me check that.