Connecting To TouchDRO Scale Adapter

TouchDRO application supports BlueTooth and USB connectivity for the scale adapters. Presently, the premade scale adapters use BlueTooth Classic connectivity, while a DIY adapter can be built with either a BlueTooth transceiver or a compatible USB adapter.

User Interface Overview

The "Connect" button icon is located in the upper right corner of the screen. Depending on the selected connection type, it will show either the BlueTooth symbol or the USB symbol.

Fig. 1: Connection Button
Fig. 1: Connection Button

Connection type can be chosen on the main TouchDRO setting screen by toggling the "Use USB Connection" setting. The default state is "off", which means that the application will use BlueTooth.

Fig. 2: Connection Type Button
Fig. 2: Connection Type Button

The icon can be in one of three states depending on the current connection status as shown below:

BlueTooth USB State Description
Disconnected The application is not connected to the scale adapter
Connecting The application is trying to establish connection to the scale adapter
Connected A connection has been established and the application is receiving position data
  • Tapping the button while it's in "Disconnected" state will bring up the Device Selection dialog, where you can choose to which device the application should connect.
  • Tapping the button while it's in "Connecting" or "Connected" state will close the connection.

BlueTooth Connection

BlueTooth is the default connection method for the TouchDRO application. Although there is no further configuration needed within the application, the adapter must be paired with your Android device before use. The process might vary slightly depending on the Android OS version and device manufacturer, but in general, it consists of the following steps:

  1. From the top of the screen, swipe down once
  2. Long-press the BlueTooth connection button. This will bring up the BlueTooth settings page
  3. If needed, turn BlueTooth on (it is usually on by default)
  4. If needed, press the "Scan" button (in most cases the page will open and start scanning automatically)
  5. Wait for the TouchDRO adapter to appear in the list of Available Devices
    • New ESP32-based boards will appear as "TouchDRO"
    • Older boards and DIY kits will appear as "HC-05"
  6. Tap on the relevant entry in the list.
  7. The device will switch to "Pairing" mode and a dialog asking for a pass code will appear
  8. Enter "1234" (without quotes) and press "Enter" (the button text might differ on different devices/OS version)

If the pairing is successful, the new device will appear in the top part of the screen on the list of paired devices. Press the "Back" button to go to the main screen and open the TouchDRO application.

  1. In the top-right corner of the screen you will see a white BlueTooth icon; tap it once.
  2. This will bring up the "Select a Device" dialog that should now show the TouchDRO adapter you paired in the previous step.
  3. Tap on the device name to connect to it.

The icon will switch to the "Connecting" animation as the application tries to establish a connection with the BlueTooth transceiver. If the connection is successful, the icon will switch to a solid blue "Connected" mode and the application will play a chime.

To disconnect from the adapter, tap the connection button. The application will close the connection. It will beep four times and the icon will switch back to "Disconnected" mode (white BlueTooth icon)

If the connection fails, please refer to the "When Things go Wrong" section further down this page.

USB Connection

Supported USB Adapters

TouchDRO application can connect to a scale adapter using a USB-to-Serial bridge. There are a number of different options that include dedicated hardware devices, as well as some common microcontrollers running special firmware that emulates the "USB composite communication class" (AKA "USB CDC Class"). Unfortunately, most Android devices lack standard CDC drivers, so the implementation is left to the application developers. Consequently, the list of devices supported by TouchDRO is relatively limited and includes:

  • FTDI FT232R, FT232H, FT2232H, FT4232H, FT230X, FT231X, FT234XD
  • Prolific PL2303
  • Silabs CP210x devices
  • Arduino devices that use the ATmega32U4 MCU for USB-to-Serial Bridge (with CDC/ACM Protocol)

TouchDRO Configuration

In order to connect to a USB adapter, TouchDRO needs to be configured for USB connection mode. The setting is accessible on the main Application Settings page that is accessible from the left "drawer" menu.

There are two settings that need to be changed:

  • "Use USB Connection" should be turned on
  • USB Baud Rate needs to be set to match the BAUD rate defined in the microcontroller firmware.

Once you go back to the main screen, you will notice that the connection icon now shows a white USB symbol. You can now connect your USB adapter to the tablet using a compatible USB cable.

  • Tap the "Connect" icon button (white USB symbol in the upper-right corner of the screen)
  • "Select a Device" dialog will display the list of connected compatible USB devices, as shown below.
  • Tap on the desired device to connect to it.
  • If your tablet is running a newer version of the OS, you might see a dialog asking for permission to access the USB device. Please grant the permission, or TouchDRO will not be able to establish a connection.

The connection icon will switch to the "Connecting" animation while the application is trying to establish a connection with the adapter. Once the connection is successful, the icon will switch to the "Connected" mode showing a green USB symbol and the app will play a chime.

To disconnect from the adapter, tap the connection button. The application will close the connection. It will beep four times and the icon will switch back to "Disconnected" mode (white USB icon)

When Things go Wrong

No BlueTooth Devices in The List

The "Select a Device" dialog list is empty or the TouchDRO adapter does not appear on the list

This happens when the adapter is not paired with your Android device. Please refer to the steps outlined at the start of this page.

No USB Devices

TouchDRO supports only a limited number of devices. If the application can't find any compatible USB devices, it will show an error dialog similar to the one shown below.

Fig. 3: No USB Devices Dialog
Fig. 3: No USB Devices Dialog

If your device is plugged in and is working correctly but TouchDRO can't find it, it usually means that the device is not compatible. It could be using a different USB device driver or the vendor/device IDs are not allowlisted.

Connection Failed

The application shows "Connecting" icon animation for several seconds but then drops the connection and shows the dialog below.

Fig. 4: Connection Failed Dialog
Fig. 4: Connection Failed Dialog

This occurs when TouchDRO is unable to establish even a low level connection to the adapter. There are a few possible reasons:

  • TouchDRO adapter is turned off. Please ensure that it's plugged in and the power indicator light shows that the adapter is running. Please refer to the documentation for your adapter for the correct behavior of the power and/or heartbeat LED.
  • BlueTooth transceiver is not powered up or is faulty. This applies only to adapters that use a separate HC-05 module; ESP32-based adapters use an integrated BlueTooth transceiver.
  • TouchDRO adapter is too far from the tablet (BlueTooth has an effective range of about 30 feet/10 meters) or is behind a metal object that is blocking line-of-sight to the tablet.

Connection Timed Out

The application shows the "Connecting" icon for several seconds but then drops the connection and shows a dialog similar to the one below.

Fig. 5: Connection Timed Out Dialog
Fig. 5: Connection Timed Out Dialog

This usually means that the application was able to establish a low level connection with the BlueTooth transceiver or USB bridge, but did not receive any position data. The main two causes are:

  • The main microcontroller is not running. Please ensure that the heartbeat LED is blinking as expected for the given firmware version.
  • Incorrect wiring between the microcontroller and the communication chip. Please note that the Rx line should connect to the Tx line and vice versa, not Tx-to-Tx, Rx-to-Rx.

Data Stream Stopped

The readouts switch to gray and after a few seconds the application closes the connection, beeps four times and shows a dialog similar to the one below.

Fig. 6: Data Stream Stopped Dialog
Fig. 6: Data Stream Stopped Dialog

There are two common causes for this error:

  • TouchDRO adapter loses power or is reset, leading to dropped connection. Ensure that the adapter is plugged in securely and the power supply is rated for the correct voltage and current.
  • The microcontroller stopped communicating with the discrete USB bridge or BlueTooth transceiver. This can be either due to a loss of physical connection or a problem with the main processor. (this can not occur with the new ESP32-based adapters since they use an integrated transceiver)

Connection Lost

The application abruptly switches from "Connected" to "Disconnected" state and shows the dialog shown below.

Fig. 7: Connection Lost Dialog
Fig. 7: Connection Lost Dialog

This can happen when the connection to the scale adapter is abruptly lost. Most commonly this happens when the USB device is unplugged or powered down without first disconnecting the TouchDRO application.

Connecting on the 3.26.07 Beta

If you are running the 3.26.07 beta, connecting works differently enough that the steps above will not match what you see. There isn't a single connection type to choose in the settings any more. Instead, BlueTooth, USB, and WiFi each have their own switch, any combination of them can be turned on, and the connect button offers everything that is enabled at the moment you press it.

Connection Settings

The switches are on the "Connection Settings" screen, which opens from the "Application Settings" screen. They belong to the machine profile that is loaded, so a shop with a mill and a lathe can point each machine at its own adapter.

Each connection type gets a section of its own, and the settings belonging to a type appear only while its switch is on. BlueTooth doesn't have any settings of its own, since pairing is handled by Android and the choice of adapter is made when you connect. USB adds "USB Baud Rate", which has to match the rate defined in the adapter firmware. WiFi adds "WiFi Adapter IP Address" and "WiFi Adapter Port", which is 8080 by default, because a WiFi adapter waits for a TCP connection instead of announcing itself the way a BlueTooth or USB device does.

Fig. 8: The "Connection Settings" screen with WiFi enabled and USB switched off
Fig. 8: The "Connection Settings" screen with WiFi enabled and USB switched off

The same screen holds the "Live Data Streaming" section, which publishes readout data to other software on your network. It is covered in "Live Data Streaming".

Selecting an Adapter

The "Select a TouchDRO Adapter" dialog lists everything you can connect to right now. Paired BlueTooth adapters come first, since those rows name actual devices, followed by single rows for USB and WiFi.

Fig. 9: The "Select a TouchDRO Adapter" dialog
Fig. 9: The "Select a TouchDRO Adapter" dialog

Each BlueTooth row shows the paired name of the device and its BlueTooth address. For an adapter you have connected to before, TouchDRO adds what it worked out about it, so the row reads "TouchDRO - TDA-420" for a recognized board or "TouchDRO - Legacy" for an older one. The USB row is a single entry marked "Wired adapter", and the WiFi row shows the address and port from the connection settings, or says that no address has been set.

To connect, tap a row. "Pair New Adapter" opens the Android BlueTooth settings, which saves a trip through the system menus, and is offered whenever BlueTooth is enabled.

The Connect Button

The connect button is still in the upper right corner, and it still shows the three states described above. What it shows while disconnected now depends on how much TouchDRO can work out about the connection you are about to make. When it can name that connection, it shows the icon for it. When it can't, it shows a generic plug.

While disconnected Icon
An adapter has been connected before The connection type that adapter was using
Nothing connected yet, one connection type enabled That connection type
Nothing connected yet, several types enabled A generic plug

A remembered adapter whose connection type has since been switched off is ignored, since offering it would be a dead end, and the button falls back to the plug.

Fig. 10: The connect button while disconnected, with the readouts grayed out
Fig. 10: The connect button while disconnected, with the readouts grayed out

To bring up the dialog, tap the button while it is disconnected, as before. To reconnect to the last adapter you used without going through the dialog, press and hold the button. If nothing is remembered, or if the connection type it was using has since been switched off, the dialog will open instead.