Closed ghost closed 10 years ago
I have updated Github with the most recent version.
Hi, thanks for the reply. The issue was not solved even with the new version. I alread followed all of your indications. This is my sketch:
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(147, 163,26, 195);
void setup() { Ethernet.begin(mac,ip); Serial.begin(9600); Serial.println("INITIALIZING"); AppleMIDI.begin("Arduino"); }
void loop() {
AppleMIDI.run();
AppleMIDI.noteOn(10,10,1);
delay(50);
}
I'm unable to reproduce your error, and i seem to get all notes.
Here is what I have: Hardware:
Software:
Where is what I do:
Midi note On should start to stream in (channel 1, note Bb-1, velocity 10)
Thanks again for the reply. This is my setup
Hardware
Software
I succesfully connect the session to arduino, I receive (channel 1, note Bb-1, velocity 10) but after a few seconds I receive nothing else on the monitor and rtpMIDI shows question marks (???) on the latency indicator. The amount of seconds does not change even changing the amount of delay between each send. What happens is that Arduino resets, in fact on Serial I get the message "INITIALIZING" again and Arduino fails to reconnect, Tried on different PCs using different versions of Windows and different Hardware (different Arduinos uno, mega, etc.) different Ethernet Shields. The problems always occur, both using static and dynamic IP
Hi, I am still frustrated by the same problem. The board resets after a few seconds of sending messages.
Which Ethernet Shield do you use? Is the official one? I use this one: http://hobbycomponents.com/index.php/2012-ethernet-w5100-network-shield-for-arduino-uno-mega-2560-1280-328.html
Very frustrating indeed. You have tried with mulitple Arduino's, how about another Ethernet shield? I assume that all the Ethernet examples work with your shield.
Maybe the UTP packets come in in the wrong order and that makes the parser fail (I cant reproduce your problem unfortunately to check the parser). How about you log as much as possible (in the parser) and see where things go wrong.
Alternatively, use Wireshark to check the RTP packets (this is what I used to debug)
I'm using the official Ethernet shield: http://arduino.cc/en/Main/ArduinoEthernetShield.
Hi again, still no luck. I tried also with an official Arduino Ethernet but (un)fortunately the problem still occurs. I prepared a video using RTPmidi, Wireshark and midiOX all together. However, probably a screenshot is enough. Maybe the problem is the Synchronization locked to 0? What could be the cause? If you need the video I will provide it to you. Thanks!
Can you put the Wireshark Filter to AppleMIDI and restart the Arduino (you used fixed IP addresses)). Make a screenshot and post back
Here it is the shot for wireshark filtered for AppleMIDI and RTP-midi. The program loaded is the one provided with the library (thus with DHCP) I would like to remember you that the board resets itself.
Thank you for your support.
Looking at the screen, Syncronization remains 0 - not good. I have updated the source code to fix a debugging reporting issue. In the Arduino IDE, upload and run; then look at the serial monitor. It should now report all activity and give more insight what is going on. Make screenshot and upload - this should get us going to detect the reset bug
Hi, Unfortunately I had a problem using the new version of the library. On Arduino 1.0.5 compiles but doesn't work, neither Serial does not print out anything nor Ethernet connects. Using Arduino 1.5.6-r2 it does not compile stating that the sketch uses too much dynamic memory for global variables. Using Mega it does fit but unfortunately I did not have a Mega lying around at home. I think that on 1.0.5 no error is given but the program does not work for the same reasons. I can give a try tomorrow in the morning.
Hi again, just gave a try using Mega. Installing the new library nothing different happened. However, I defined
and this is the output I received on serial:
Getting IP address... IP address is 147.163.26.246. Make sure you an rtpMIDI session that is Enabled Add device named Arduino with Host/Port 147.163.26.246:5004 Then press the Connect button Then open a MIDI listener (eg MIDI-OX) and monitor incoming notes Starting Verbose Sending NoteOn/Off of note 45 every second .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) > Invitation: peer = "DesktopR" ,ssrc = 0x97E690B3 ,initiatorToken = 0x7F7146C7 New session at slot: 0 < Invitation Accepted: peer = "Arduino" > Invitation: peer = "DesktopR" ,ssrc = 0x97E690B3 ,initiatorToken = 0x7F7146C7 < Invitation Accepted: peer = "Arduino" New Session created for 0x97E690B3 in slot 0 Connected to session DesktopR .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) Getting IP address... <-- this is where the board resets IP address is 147.163.26.246. Make sure you an rtpMIDI session that is Enabled Add device named Arduino with Host/Port 147.163.26.246:5004 Then press the Connect button Then open a MIDI listener (eg MIDI-OX) and monitor incoming notes Starting Verbose Sending NoteOn/Off of note 45 every second .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55) > Syncronization: count = 0 Timestamps = 0 989414 0 0 0 0 hmmm - Syncronization for a session that has never started. .< Note On (c=1, n=45, v=55) < Note Off (c=1, n=45, v=55)
Hi guys. First of all thank you for the amazing ljbrary. It really came at the right moment.
Second: I'm experiencing the same exact problem as bobbokop.
I tried with arduino : uno; mega 2560 r3; mega 1280.
My setup
Ubuquiti power apn Alienware r5 with windows 8.1 Arduino 1.0.5
Official ethernet shield r3 Latest rtp midi Midi library 4.2
On arduino uno; the program stay stuck on: getting ip with dhcp.
On the mega's works but works for 10 seconds and then no more midi notes coming or listened by arduino. I get the ??? In rtp Midi and the dots progressing in the serial monitor. After about a minute it comes out again with: Getting ip with dhcp It reconnects and it work for other 10 seconds.
After three times i need to reset the board.
Any solution?
Thanks for the feedback. I have a hard time reproducing the issue (grrr), so I have added a lot of debug messages in the parsers (assuming it goes wrong there). Please update to the latest version and uncomment #define DEBUG_BUILD and #undef RELEASE_BUILD. When you connect you should see a lot of debug messages fly by in the serial monitor. Can you post the messages just before the Arduino resets?
Here we are.
So... This Time i tested on a different machine . Windows 7 32 bit. Using the latest (Downloaded rtp midi from the website 2 minutes ago)
Here is what i get
Seems like it doesn't really like the rtp from windows
We might be on to something. I notice a unsupported signature in the incoming buffer (messages should start with 0xffff) (this causes a buffer overrun - buffers are now printed as part of the logging). Please update again to the latest version and uncomment #define DEBUG_BUILD and #undef RELEASE_BUILD. Can you run again and post the results? Thanks.
Tried again. This time rtp midi says after a while that the connection request was refused by the host. and here are the screens
Great, now it works properly! Thank you! Now that we are ok with this major issue, can you work on adding a way to initiate a session from Arduino? Or at least, give me some suggestions for writing the code myself? My code already has bonjour capabilities, so I know the rtpserver ip.
Oef - good to hear. I will close this ticket and open another for the session initiation by Arduino
Ehi, Haven't tested yet (will test in few hours)
But if it works now; Why don't you try to port it on teensy 3?
this board: https://www.pjrc.com/store/teensy3.html
It will work in a much Better way and will be more stable since teensy 3 have more ram and a 32 bit microcontroller.
Thanks dude :D
Teensy doesn't come straight with an Ethernet module but it has got better support for a wider range of chipsets than arduino.
Check it out: https://www.pjrc.com/store/wiz812_adaptor.html
you can use wiznet; 5100, 5200, 5500, 820io, 550io, 812, encj...
and its still arduino
Greetings, thanks for this useful library. I had a problem while using it on an Arduino Mega (but also with an Uno and Leonardo) with an Ethernet Shield and rtpMIDI driver for Windows. After around ten seconds of operations some problems occur. More precisely, the driver loses its Latency time indicator (it becomes '???') and no more events are received. However, Arduino keeps on sending events but just before the problem occurs, something weird happens. This is the Serial dump (I enabled debug mode). It seems like some conflicts occur.
< Note On (c=1, n=118, v=10) < Note On (c=1, n=118, v=10) < Note On (c=1, n< Note On (c=1, n=120, v=10) <-- Here the problem occurs < Note On (c=1, n=119, v=10)
Note that the problem occurs only when the board participates to a session. It seems like that for some reasons the board resets. In fact if I manually reset the board the behavior is very similar.
Edit: The board actually resets, in fact the setup method is perfomed again.
Have you ever experimented something similar? What could be the reason?
Thanks.