Open daveyijzermans opened 5 years ago
Hi! Good question! I experienced a similar issue, my case was that at some point I had another server installed which took port 49152, and noticed that FocusriteControlServer would start on 49153. This was the case only sometimes, depending on which of the two servers would start first. My guess would be that for Mac, the default port is 49152, then if not available they increment until they find something available.
I have 2 solutions in mind:
Right now I don't have time to code them into the Swift app, let me know if you have a working solution.
Thank for your response! I thought about this approach as well, but thinking it would be rather slow. So I downloaded the iOS app, configured Wireshark to sniff my iPhone traffic. Turns out the iPhone sends a UDP broadcast message. Focusrite Control Servers on the network listen to this and is they receive a
See this gist for a Node.js implementation. I think you can rewrite this to C/Swift if you want to include it in your application. Sorry I don't know C(++)/Swift!
https://gist.github.com/daveyijzermans/f0354858b3eb765e19361ab85a6bc55b
Hope that helps. Sorry I answered my own question the day after. 😅
Kind regards,
Davey
Great find, thanks for sharing this gist!
Thank for your response! I thought about this approach as well, but thinking it would be rather slow. So I downloaded the iOS app, configured Wireshark to sniff my iPhone traffic. Turns out the iPhone sends a UDP broadcast message. Focusrite Control Servers on the network listen to this and is they receive a message they send back a response with the correct port!
See this gist for a Node.js implementation. I think you can rewrite this to C/Swift if you want to include it in your application. Sorry I don't know C(++)/Swift!
https://gist.github.com/daveyijzermans/f0354858b3eb765e19361ab85a6bc55b
Hope that helps. Sorry I answered my own question the day after. 😅
Kind regards,
Davey
Hi Davey,
Any chance you can share your node.js code? I'd like to experiment with it as I am trying to interface to a hardware volume knob I built.
thanks,
Brendin
When you run the gist it should spit out the server ip and port of any Focusrite Control Server running and you can create a standard UDP socket to it and interact with the server as figured out by this repo's creator. It's fun to try to decode it yourself. :)
If you're looking for an example, you can take a look at my project. Although it is part of something else I think you can extract the necessary bits from it.
When you run the gist it should spit out the server ip and port of any Focusrite Control Server running and you can create a standard UDP socket to it and interact with the server as figured out by this repo's creator. It's fun to try to decode it yourself. :)
If you're looking for an example, you can take a look at my project. Although it is part of something else I think you can extract the necessary bits from it.
Thanks. I built the UDP discovery based off of your code for my ESP8266 Arduino project.
@daveyijzermans Massive thanks for figuring out the UDP trick, extremely helpful! I've coded a completely new version that's much more stable, if you're curious you can check it here: https://www.raduvarga.com/software/focusrite-midi-control
Hi! Thanks for your work in sniffing the Focusrite server protocol! I've used it to create my own implementation in Node.js. However, I try to connect with my client to a different computer on the network.
Until now this has worked, but suddenly the port to the control server has changed! It first was 49935, now on one computer it's 49930 and on another computer it's become 49943.
In your source code the port is hardcoded as 49152 (AppDelegate.swift, line 16) but this has never been the case for me.
I'm using the Focusrite Control Server on Windows though, might that be a cause of the issue? Do you have an idea how I can search for the right port each time or why even the port is changing?
Thanks!