Here’s a link to a simple Xojo binary project file: Dropbox - Clear Core Connect Test.xojo_binary_project.zip - Simplify your life
This is just the networking part of a much larger application we’re working on. All it’s designed to do is connect to an MCU, send it commands, receive responses. I built this version this afternoon to help our firmware developer debug a problem I’ve been seeing on my end. to wit:
ONLY On the Mac, whether I’m in the debugger or running a compiled app, the following happens:
- Power Off MCU
- Launch Application
- Initiate connection from application
- Power on MCU
After a few seconds, the Application connects to the MCU and the Application’s server begins receiving information from the MCU on a different port. This is what we expect, however, this is the only way we’re able to successfully initiate a connection to the MCU.
• if at this point I quit the app and restart it, It receives a few sporadic messages on its server then they stop completely (even though the MCU is sending periodic messages, every few seconds), and it is totally unable to reconnect with the MCU’s server.
• Quit the app again, relaunch it, and now nothing at all coming in on the local server, and it’s still unable to send any commands to the MCU.
- Power On the MCU
- Launch the app
- Initiate the connection from the application
In this case, on the Mac, I cannot send to the MCU, but I am receiving messages on the app’s local server. If I quit and relaunch the app, the behavior is similar to above, where eventually neither is responsive after subsequent restarts of the application while the MCU remains running.
On Windows, however, both SCENARIO 1 and SCENARIO 2 work fine. I can power cycle the MCU, or quit and relaunch the app all day long and it always reconnects and just works. Ultimately, the target platform for this is Windows so that’s good, but I do all my development on the mac. I’d like to know why this isn’t working. I really hate working on Windows, so I don’t want to have to switch my dev platform for this.
Is there something I’m missing that’s causing this to happen on the mac, but not on Windows?