By dave | April 7, 2019

Controlling a tcMenu embedded Arduino sketch from the desktop is trivial. When building your menu using the tcMenu designer UI you can specify how the menu can be controlled remotely, and suitable remote connectors are compiled into your Arduino sketch automatically.

If you’ve not already got a tcMenu application running on your Arduino device, then follow the tcMenu for Arduino quick start guide first.

When you generate the code for your sketch, take note of the remote options that you’ve chosen; you’ll need this in the next section to make a connection using the pre-packaged desktop application.

As part of the tcMenu release on github, we ship the desktop connector application pre-built for both Windows and MacOS. Now start the tcMenu Connector application.

Every connector app has it’s own UUID and name, the UUID uniquely describes this app to the embedded device, while the name is a more friendly way of describing who you are. Every time you change either, any pairing must be redone.

Authentication can be set up for any type of connector, and is called pairing, when the key is shared from the controller to the embedded device. You can use various types of authentication with tcMenu, and most examples show how to configure the authentication manager. The default is no authentication allowing anyone to connect in order to get started quickly.

Connecting to the menu application using Serial

menu connector: serial connection window

Shows the connection window when serial is selected

If you selected to generate a Serial remote during code generation, then use this option.

To use the serial configuration just provide the port name and baud rate at which you want to connect. Generally speaking there is little point in using a key for serial connections, because the are connected through either a direct wire or a paired bluetooth connection.

Parameters for serial

  • The port drop down shows all ports that are available on the host.
  • The baud will pre-populate with 115200 (as this is the default on tcMenu).
  • Once all the fields are entered press start to proceed.

Connecting to the menu application using Ethernet

menu connector: ethernet connection window

Shows the connection window when ethernet is selected

If you selected to generate an Ethernet based remote during code generation, then use this option. At the moment DHCP and auto discovery are not supported, so you must provide the IP address and port that you configured.

  • The IP address will be the one you entered into your sketch directly.
  • The port is the one you specified in the code generator options (defaults to 3333).
  • Once all the fields are entered press start to proceed.

Normally Network connections are set up with a key, as of 1.3.2 the key is not sent securely and should not be relied upon for more than local area network security. This will change in a future version. In order to exchange the key, you must first “Pair” the connection using the pair function. When in pairing mode you’ll see the following in the connector app:

menu connector: pairing mode

Pairing mode on the connector app

At the same time on the embedded device a dialog should be shown with “Accept” and “Cancel” options asking if you want to pair. Choose “Accept” to allow the key to be stored in the trusted keys. Once this is done, all future connections will work without needing to do this again.

device: pairing mode

Pairing mode on the embedded device

Understanding the main screen

tcMenu remote connector main window - connected to device

tcMenu connector main window (connected to device)

Above is the main window of the tcMenu connector, showing a connection to an application called “Ada32 Ethernet” running on a MKR1300 board with an Ethernet shield. We can see that the title shows that we are connected, and at the bottom is the connectivity details, showing the embedded device’s name, platform type and version. Authentication status also appears there.

In the middle of the window all the menu items are present, each menu item has it’s own line, clicking the [<] and [>] buttons at the side of each entry decreases or increases the value. If the item is read only this option will be greyed out.

When an item background highlighted, this means that it has recently updated. It will return to the normal background a few seconds later.

When there is a disconnection the title will change to indicate the is no connection, showing the raw connectivity details. Also, the status area at the bottom changes too as per the example below. TcMenu TagVal protocol includes heart-beating, so it can nearly always detect a broken connection within a few seconds. This can be tuned for more critical applications.

tcMenu remote connector main window - not connected

tcMenu connector main window (not connected)

Logging folder

The logs for this application are stored in the .tcMenu directory under your home directory.

Back to tcMenu main page

Other pages within this category

comments powered by Disqus

We use cookies to analyse traffic and to personalise content. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Please see our privacy policy should you need more information or wish to adjust your settings.

Send a message
X

This message will be securely transmitted to Nutricherry LTD servers.