Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

Client Disconnect

KD0RC
KD0RC Broomfield, COMember, Super Elmer Moderator

I am trying to gracefully disconnect my TeensyMaestro from the radio when it is a GUI Client. The idea is that it should not leave a connection open, causing SmartSDR to go into MultiFlex mode.

If I send this API command from a different client, it disconnects my TeensyMaestro just fine. If I issue it from within the TeensyMaestro, it has no effect. (C++ code)

fRig.send("client disconnect " + fRig.Client_Handle );

Client_Handle is the handle for the TeensyMaestro.

If I issue a plain client disconnect (i.e. disconnect everything) from my TeensyMaestro, it disconnects SmartSDR, but not itself.

Is there a sequence of commands that allows a client to disconnect itself?

Best Answer

  • Mark_W3II
    Mark_W3II Mark W3II Member ✭✭✭
    Accepted Answer

    Have you tried calling shutdown on your TCP socket?

    That should be all it takes for the radio to forget about your client.

Answers

  • KD0RC
    KD0RC Broomfield, COMember, Super Elmer Moderator

    Thanks Mark! I have not tried that. I will give it a go tomorrow. I will need to dig into the Ethernet library for the Teensy board to see what functions are available.

    This project is my first foray into any kind of TCP/IP programming, so everything I do is a new adventure!

  • KD0RC
    KD0RC Broomfield, COMember, Super Elmer Moderator

    Thanks Mark, that worked! Now if I forget and start my TeensyMaestro before starting SmartSDR, I can just power it back off and the connection will clear. Before, I had to select Disconnect and then go through the Disconnect screen and power off the TeensyMaestro anyway.

    Now that I have this fixed, I will never start up in the wrong order again... 😄

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.