Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poller exception - NO not implemented #9

Closed
TheTechnobear opened this issue Nov 22, 2019 · 2 comments · Fixed by #12
Closed

poller exception - NO not implemented #9

TheTechnobear opened this issue Nov 22, 2019 · 2 comments · Fixed by #12

Comments

@TheTechnobear
Copy link
Contributor

[2019-11-22T17:42:32Z] [rtpclient.cpp:122] Connecting control port 55192 to 192.168.1.94:5004
FF FF 4E 4F  00 00 00 02  0B 3A 48 21  99 CD 42 47  

..NO .... .:H! ..BG 

[2019-11-22T17:42:32Z] [poller.cpp:147] Catched exception at poller: Not Implemented

this is caused by macOS rejecting a connection, and NO is not implemented in rtppeer
if you point me to the relevant bit in spec on how to parse NO, id be happy to implement.
(hopefully the NO reply will give is more info as to WHY macOS is rejecting)

rtpmidid::rtppeer::parse_command


  switch(command){
    case rtppeer::OK:
      parse_command_ok(buffer, port);
      break;
    case rtppeer::IN:
      parse_command_in(buffer, port);
      break;
    case rtppeer::CK:
      parse_command_ck(buffer, port);
      break;
    case rtppeer::BY:
      parse_command_by(buffer, port);
      break;
    default:
      buffer.print_hex(true);
      throw not_implemented();
  }
}

statc

Catchpoint 1 (exception thrown), 0x76db4948 in __cxa_throw () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
(gdb) bt
#0  0x76db4948 in __cxa_throw () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#1  0x000e8794 in rtpmidid::rtppeer::parse_command (this=0x15c750, buffer=..., port=rtpmidid::rtppeer::CONTROL_PORT) at /home/patch/projects/rtpmidid/src/rtppeer.cpp:112
#2  0x000e84cc in rtpmidid::rtppeer::data_ready (this=0x15c750, buffer=..., port=rtpmidid::rtppeer::CONTROL_PORT) at /home/patch/projects/rtpmidid/src/rtppeer.cpp:62
#3  0x000ed5dc in rtpmidid::rtpclient::data_ready (this=0x15c750, port=rtpmidid::rtppeer::CONTROL_PORT) at /home/patch/projects/rtpmidid/src/rtpclient.cpp:176
#4  0x000eca58 in rtpmidid::rtpclient::<lambda(int)>::operator()(int) const (__closure=0x15bdfc) at /home/patch/projects/rtpmidid/src/rtpclient.cpp:88
#5  0x000edd1c in std::_Function_handler<void(int), rtpmidid::rtpclient::connect_to(std::__cxx11::string, uint16_t)::<lambda(int)> >::_M_invoke(const std::_Any_data &, int &&) (
    __functor=..., __args#0=@0x7effee08: 12) at /usr/include/c++/8/bits/std_function.h:297
#6  0x000ce4f8 in std::function<void (int)>::operator()(int) const (this=0x15bdfc, __args#0=12) at /usr/include/c++/8/bits/std_function.h:687
#7  0x000cba84 in rtpmidid::poller_t::wait (this=0x136838 <rtpmidid::poller>) at /home/patch/projects/rtpmidid/src/poller.cpp:145
#8  0x00094bfc in main (argc=1, argv=0x7efff204) at /home/patch/projects/rtpmidid/src/main.cpp:55
@davidmoreno
Copy link
Owner

The main reference is the apple documentation. Its sparse compared with the RFC, but goes more to the point. And actually as this about the handshake, it is not covered by the RFC.

https://developer.apple.com/library/archive/documentation/Audio/Conceptual/MIDINetworkDriverProtocol/MIDI/MIDI.html

All that it says about "NO" is: If the invitation was rejected, no further packets are exchanged

So I would just close and delete the peer after a "NO".

@TheTechnobear
Copy link
Contributor Author

thanks for the link very useful....

ok, will need to look at the code to see how to identify the initiating connect.
(it'll be interesting to see which connection it is... Ive my suspicions ;) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants