5 years, 4 months ago.

mbed-os-example-wifi with Nucleo_L476RG

The Mbed example here:

https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-wifi/

Indicates Nucleo_L476RG with ESP8266 connected to pins D8 and D2 (I assume ESP8266 Baud rate is 115200)

I have tried this, setting SSID and Password in all the .json files but get ERROR: No WiFiInterface found.

I know my hardware is working as I have been using the same configuration on other programs.

Also I generally use my own ESP8266 driver at 460800 or 921600 Baud depending on my target board. Is it possible to set an override in one of the .json files like I do for STDIO Baud rate ?

Many thanks

Paul

Edit...

I found this and it is now connecting:

mbed_app.json

{
    "config": {
        "wifi-ssid": {
            "help": "WiFi SSID",
            "value": "\"Molino\""
        },
        "wifi-password": {
            "help": "WiFi Password",
            "value": "\"36693557\""
        }
    },
    "target_overrides": {
        "*": {
            "platform.stdio-convert-newlines": true
        },
        "NUCLEO_L476RG": {
            "target.network-default-interface-type" : "WIFI",
            "esp8266.tx"                        : "D8",
            "esp8266.rx"                        : "D2",
            "esp8266.provide-default"           : true,
            "drivers.uart-serial-rxbuf-size"    : 1024,
            "drivers.uart-serial-txbuf-size"    : 1024
          }
    }      
}

But I still need to override the ESP8266 Baud Rate.

Here's the ESP8266 driver on GitHub

https://github.com/ARMmbed/mbed-os/blob/master/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp

Currently line 36 is showing the default baud rate, 115200, is it possible to override this possibly in the .json file?

1 Answer

5 years, 3 months ago.

You can try changing this line: https://github.com/ARMmbed/mbed-os/blob/master/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp#L36

Thanks, Lin, team Mbed

Accepted Answer

Hi Lin,

I'm using the online compiler so I can't do this atm, however Desmond has given a solution here:

https://os.mbed.com/questions/86806/How-to-change-ESP8266-default-WiFi-baud-/

That will give what I need on the next mbed update if this change is made.

All 100Mhz + platforms work stable at 921600 and is simple to change the baud rate using the serial pass through that is shown in the firmware upgrade page.

I will accept this answer here as I have the other question that is more relevant now.

Regards

Paul

posted by Paul Staron 23 Aug 2019