Hello, I am trying to create a wifi box. Using the available code, I made some modifications to use esp8266, I got it to work halfway. In the EOS terminal I see that it receives ping and subcrisciption of parameters. The problem is in the last part of the code when we ask that you receive parameters from EOS.
the original code says
and I'm trying to do it that way
size = Udp.available(); if (size > 0) { // Fill the msg with all of the available bytes while (size--) curMsg += (char)(Udp.read()); } if (Udp.endofPacket()) { parseOSCMessage(curMsg); lastMessageRxTime = millis(); // We only care about the ping if we haven't heard recently // Clear flag when we get any traffic timeoutPingSent = false; curMsg = String(); }
if (lastMessageRxTime > 0) { unsigned long diff = millis() - lastMessageRxTime; //We first check if it's been too long and we need to time out if (diff > TIMEOUT_AFTER_IDLE_INTERVAL) { connectedToConsole = ConsoleNone; lastMessageRxTime = 0; updateDisplay = true; timeoutPingSent = false; }
//It could be the console is sitting idle. Send a ping once to // double check that it's still there, but only once after 2.5s have passed if (!timeoutPingSent && diff > PING_AFTER_IDLE_INTERVAL) { OSCMessage ping("/eos/ping"); ping.add(BOX_NAME_STRING "_hello"); // This way we know who is sending the ping Udp.beginPacket(outIp, outPort); ping.send(Udp); Udp.endPacket(); timeoutPingSent = true; } }
if (updateDisplay) displayStatus();}}
I have the problem in the line marked in red. what would be the correct way to translate this for "Udp"?
Thanks!!
There is no method endOfPacket() for UDP. Let the if statement away.
And how should I do it then?
I tested a little bit with an Arduino WIFIv2 board and I have also many problems, so I stopped working.Generally that WIFI is not very stable, I think there are many problems with the Arduino framework.I think the connection must permanently tested and reconnected.
making some changes (adding issueSubscribes (); in the loop and skipping the "waiting for eos" screen I get it to work without problems.) but if I don't have a fixture selected or I have one that doesn't use pan and til my arduino restarts.
Exception (28):epc1=0x40202f8c epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000008 depc=0x00000000
>>>stack>>>
ctx: contsp: 3ffffd70 end: 3fffffc0 offset: 01a03fffff10: 00000001 00000000 3fffff30 402030bc 3fffff20: 3ffee4e8 ffffffff 3ffee4e8 40201546 3fffff30: 3fff01bc 00000000 00000000 00000004 3fffff40: 00000005 3fff0184 00000000 00000010 3fffff50: 3fffdad0 00000000 3ffee558 40201d18 3fffff60: 007a1200 e686af92 80000000 00000000 3fffff70: 00000000 3fff010c 00000000 00000010 3fffff80: 00000000 00000000 00000001 40100154 3fffff90: 3fffdad0 00000000 3ffee704 3ffee744 3fffffa0: 3fffdad0 00000000 3ffee704 40205330 3fffffb0: feefeffe feefeffe 3ffe850c 401011b5 <<<stack<<<
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1384, room 16 tail 8chksum 0x2dcsum 0x2dvbc204a9b~ld
exception decorder
Exception 28: LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads PC: 0x40202f8c: OSCData::getFloat() at /Users/jefatecnico/Documents/Arduino/libraries/OSC-master/OSCData.cpp line 191 EXCVADDR: 0x00000008 Decoding stack results 0x402030bc: OSCMessage::route(char const*, void (*)(OSCMessage&, int), int) at /Users/jefatecnico/Documents/Arduino/libraries/OSC-master/OSCMessage.cpp line 391 0x40201546: parseOSCMessage(String&) at /Users/jefatecnico/Downloads/enviar_3 6/enviar_3/enviar_3.ino line 245 0x40201d18: loop() at /Users/jefatecnico/Downloads/enviar_3 6/enviar_3/enviar_3.ino line 568 0x40100154: ets_post(uint8, ETSSignal, ETSParam) at /Users/jefatecnico/Library/Arduino15/packages/esp8266/hardware/esp8266/2.6.2/cores/esp8266/core_esp8266_main.cpp line 160 0x40205330: loop_wrapper() at /Users/jefatecnico/Library/Arduino15/packages/esp8266/hardware/esp8266/2.6.2/cores/esp8266/core_esp8266_main.cpp line 180
Maybe that is the USB for Serial. Try to let the USB disconnected to the computer where nomad is installed.
No, it's a problem remains the same. I think it has something to do with that there is no parameter update
as far as I can see the reset problem comes when it receives the pan and tilt command with no value. when we live a fixture eos emits/ eos / subscribe / param / tilt. no values This causes it to reset.Can you think of any way to ignore this message to try to avoid the restart?
send.ino.zip
I tested with an ESP8266 and an ESP32 with the same behavior and I really don't know why this happens. Maybe it is a bug with the OSC library (I don't think so) maybe it is a general bug of the ESP system handling floats. I will test it with an Ethernetboard and see what happens.Fixed also the issues with the splash screen and static IP (you must configure a gateway address and subnet).send.zip
It is a bug in the framework of ESP8266 and ESP32. If I try the code with an 'Arduino WIFI 2' there are no exceptions. You should post the problem in the dedicated forums.
In the OSC library there are also macros with ESPxx which can cause the problem.
I put a post on the esp8266 forum, I wait for an answer. I'm also looking to use another osc library to try.
the esp forum and CNMAT seem dead, I don't get an answer. I'm thinking of something else, what do you think of combining the original code with this www.esp8266.com/viewtopic.php
Try following library https://github.com/stahlnow/OSCLib-for-ESP8266
The same problem... Thanks for your time
i think it works
the original: