Coder Social home page Coder Social logo

Core Panic about arduinoosc HOT 7 CLOSED

hideakitai avatar hideakitai commented on May 23, 2024
Core Panic

from arduinoosc.

Comments (7)

devinroth avatar devinroth commented on May 23, 2024 2

I just tried out a different ESP32 board and it doesn't crash. There must be something wrong with the other board. Thanks for you help.

from arduinoosc.

hideakitai avatar hideakitai commented on May 23, 2024

Could you give me more information?

  • source code
  • esp32-arduino version
  • Arduino IDE or PlatformIO and version
  • ArduinoOSC version
  • etc.

from arduinoosc.

devinroth avatar devinroth commented on May 23, 2024

Source: ArduinoOSC OscWIFi example program.
Esp32-arduino version: 1.0.1
Arduino IDE 1.8.9
ArduinoOSC version: 0.2.1

The board sends OSC messages just fine. It's only when receiving that it crashes. It seems to be related to the callback. It receives data just fine if I don't use a callback.

from arduinoosc.

hideakitai avatar hideakitai commented on May 23, 2024

mmm... in the same configuration, my examples works fine w/ Max8.
Let me know more information:

  • Is arduino-esp32 repo in the latest master branch??
  • Which program do you use to send OSC?
    Thank you for your cooperation!

from arduinoosc.

hideakitai avatar hideakitai commented on May 23, 2024

Let me add :

  • Please give a source code. (Delete your WiFi info plz ;))

from arduinoosc.

devinroth avatar devinroth commented on May 23, 2024

First off, thanks for helping. I'm pretty sure this problem is an ESP32 issue not a ArduinoOSC problem but let's try to get to the bottom of the problem.

Maybe there's a problem with the board. I have another ESP32 I can try it on later today.

I installed the arduino-esp32 with the board manager in the IDE as recommended. https://github.com/espressif/arduino-esp32

I'm using my own program SwiftOSC to send data. I even tried sending identical data to the board as you send out in the example code with the same problem. So I know for a fact it's not a formatting issue.

I'm using your OscWifi example with only changing Wifi info. I tried commenting out all the code in the callback so it happens somewhere between receiving the data and calling the callback.

#include <ArduinoOSC.h>

// WiFi stuff
const char* ssid = "your-ssid";
const char* pwd = "your-password";
const IPAddress ip(192, 168, 1, 201);
const IPAddress gateway(192, 168, 1, 1);
const IPAddress subnet(255, 255, 255, 0);

// for ArduinoOSC
OscWiFi osc;
const char* host = "192.168.1.200";
const int recv_port = 10000;
const int send_port = 12000;

void onOscReceived(OscMessage& m)
{
    Serial.print("callback : ");
    Serial.print(m.ip()); Serial.print(" ");
    Serial.print(m.port()); Serial.print(" ");
    Serial.print(m.size()); Serial.print(" ");
    Serial.print(m.address()); Serial.print(" ");
    Serial.print(m.arg<int>(0)); Serial.print(" ");
    Serial.print(m.arg<float>(1)); Serial.print(" ");
    Serial.print(m.arg<String>(2)); Serial.println();
}

void setup()
{
    Serial.begin(115200);

    // WiFi stuff
    WiFi.begin(ssid, pwd);
    WiFi.config(ip, gateway, subnet);
    while (WiFi.status() != WL_CONNECTED) { Serial.print("."); delay(500); }
    Serial.print("WiFi connected, IP = "); Serial.println(WiFi.localIP());

    // ArduinoOSC
    osc.begin(recv_port);

    // TODO: TBD
    // osc.subscribe("/int32", i);
    // osc.subscribe("/float", f);
    // osc.subscribe("/string", s);
    // osc.subscribe("/blob", b);

    osc.subscribe("/callback", onOscReceived); // old style (v0.1.x)

    osc.subscribe("/lambda", [](OscMessage& m)
    {
        Serial.print("lambda : ");
        Serial.print(m.ip()); Serial.print(" ");
        Serial.print(m.port()); Serial.print(" ");
        Serial.print(m.size()); Serial.print(" ");
        Serial.print(m.address()); Serial.print(" ");
        Serial.print(m.arg<int>(0)); Serial.print(" ");
        Serial.print(m.arg<float>(1)); Serial.print(" ");
        Serial.print(m.arg<String>(2)); Serial.println();
    });
    osc.subscribe("/wildcard/*/test", [](OscMessage& m)
    {
        Serial.print("wildcard : ");
        Serial.print(m.ip()); Serial.print(" ");
        Serial.print(m.port()); Serial.print(" ");
        Serial.print(m.size()); Serial.print(" ");
        Serial.print(m.address()); Serial.print(" ");
        Serial.print(m.arg<int>(0)); Serial.println();

    });
    osc.subscribe("/need/reply", [](OscMessage& m)
    {
        Serial.println("/need/reply");

        int i = 12;
        float f = 34.56F;
        double d = 78.987;
        String s = "hello";
        bool b = true;

        osc.send(host, send_port, "/send", i, f, d, s, b);
    });

    // TODO: TBD
    // osc.publish(host, send_port, "/value", value);
    // osc.publish(host, send_port, "/millis", &millis);
}

void loop()
{
    osc.parse(); // should be called
}

from arduinoosc.

devinroth avatar devinroth commented on May 23, 2024

I should add that I don't think it's a parsing problem. It doesn't crash when data is received and I don't get an error from the parser..

from arduinoosc.

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.