Comments (7)
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.
Could you give me more information?
- source code
- esp32-arduino version
- Arduino IDE or PlatformIO and version
- ArduinoOSC version
- etc.
from arduinoosc.
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.
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.
Let me add :
- Please give a source code. (Delete your WiFi info plz ;))
from arduinoosc.
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.
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)
- errors compiling the OscEtherUno sketch HOT 1
- Improve sending/receiving bundle
- Compilation error when including ArduinoOSC.h in a C++ header HOT 5
- Event-driven approach to receiving OSC data rather than polling? HOT 4
- Is it possible to have a non-fixed IP ? HOT 3
- Unable to parse or post any OSC message on WiFi HOT 4
- ESP32 AP mode HOT 5
- run ArduinoOSCEther with OLIMEX ESP32 POE HOT 9
- Core Panic issue HOT 1
- support for RPI Pico W HOT 1
- Example with OSC over Serial using MsgPacketizer HOT 1
- Teensy 4.1 Native Ethernet support HOT 2
- Add support for multicast? HOT 1
- Add support for softAP HOT 1
- Add support for Raspberry Pi PICO W
- multiple clients HOT 1
- now the dependencies must be installed separately? HOT 5
- RP2040 not sending wifi when in station mode HOT 6
- gccのバージョンエラー HOT 3
- In OscWiFiAP example, no ip obtained. HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinoosc.