Giter Club home page Giter Club logo

Comments (11)

Aurical avatar Aurical commented on August 20, 2024

This code seems to work for me, can you try it?

#include <WiFi.h>

char ssid[] = "yourNetwork";  //Set the AP's SSID
char pass[] = "Password";     //Set the AP's password
char channel[] = "1";         //Set the AP's channel
int status = WL_IDLE_STATUS;  // the Wifi radio's status

void setup() {
    //Initialize serial:
    Serial.begin(115200);
    // Check wifi status
    status = WiFi.status();
    // attempt to start AP:
    while (status != WL_CONNECTED) {
        Serial.print("Attempting to start AP with SSID: ");
        Serial.println(ssid);
        status = WiFi.apbegin(ssid, pass, channel);
        delay(10000);
    }

    //AP started:
    Serial.println("AP mode started");
}

void loop() {
    // check the network connection once every 10 seconds:
    delay(10000);
}

from ambd_arduino.

technoblogy avatar technoblogy commented on August 20, 2024

Yes, it works, but doesn't work if I remove the line:

delay(10000);

In my actual application the main loop will be executing other code. Is there a call I need to make periodically to check the network connection?

Thanks, David

from ambd_arduino.

Aurical avatar Aurical commented on August 20, 2024

It looks like the RTOS running in the background does not like a empty loop. using vTaskDelay(1 / portTICK_PERIOD_MS); is sufficient to keep it running.

from ambd_arduino.

technoblogy avatar technoblogy commented on August 20, 2024

That works - thanks!

from ambd_arduino.

technoblogy avatar technoblogy commented on August 20, 2024

Now I'm getting a new problem. When I try and create a Soft Access Point I get the error:

Error!!!upd_new error

but the Soft Access Point seems to have succeeded, and I can see it in my list of Networks.

However, when I try to connect to it I get a series of errors:

Cannot allocate pbuf to receive packet

What's the problem here? It was working at first. Thanks, David

from ambd_arduino.

Aurical avatar Aurical commented on August 20, 2024

Do you mind posting your code here? Need to get an idea of what it is doing in the main loop.

from ambd_arduino.

technoblogy avatar technoblogy commented on August 20, 2024

I'll try and create a cut-down version that shows the problem.

from ambd_arduino.

technoblogy avatar technoblogy commented on August 20, 2024

OK, I think I've figured it out. I omitted the line:

status = WiFi.status();

It seems it's necessary to call WiFi.status() before calling WiFi.apbegin().

Thanks, David

from ambd_arduino.

technoblogy avatar technoblogy commented on August 20, 2024

I've now got a version of uLisp, my Lisp for microcontrollers, available for the Ameba RTL8722DM IoT Development Board:

http://www.ulisp.com/show?39RE

Is there somewhere more appropriate I could mention this?

from ambd_arduino.

Aurical avatar Aurical commented on August 20, 2024

It looks like Realtek developers do check here occasionally. Alternatively, you could try posting in the community forum at https://forum.amebaiot.com/

from ambd_arduino.

technoblogy avatar technoblogy commented on August 20, 2024

Thanks!

from ambd_arduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.