Mini Trooper controlled over Wi-Fi/MQTT

Hi,

For a personal project I’m looking for a way to control a Mini Trooper bot over Wi-Fi. We’ve set up an instance of Shiftr, an MQTT server, and can send messages from IOT devices and the web.

There are two ways I see this happening:

  • Mini Trooper, maybe with a RoboBoard X4, directly connected to Wi-Fi and connecting to MQTT
  • Mini Trooper over bluetooth, connected to a PC as a MQTT gateway.

What do you think would be the best option? Anything I’m forgetting?

Ačiū,

Frederik

Hi,

Mini Trooper (Mini Control Board X3) only has BLE connectivity, so it can be controlled from smartphones, PC (currently it’s quite complicated to implement BLE applications in PC, maybe easier with Linux or Raspberry), ESP32.

RoboBoard X4 has BLE and WiFi connectivity. The only thing - we haven’t implemented WiFi connectivity in Totem API yet, but it’s available trough standard ESP32 API.

Totem uses custom protocol designed for communication over CAN bus. Internally it’s completely different from MQTT, but uses similar function calls: Totem.X4.write("motorA", 100) meaning some kind string command and value. These topics can be transferred over MQTT and easily encoded to Totem commands.

Way to implement with Mini Control Board X3:

X3 ← (BLE connection) ← ESP32 ← Totem BLE API ← MQTT Client ← (WiFi connection) ← MQTT Broker.

Way to implement with RoboBoard X4:

X4 ← Totem API ← MQTT Client ← (WiFi connection) ← MQTT Broker.

Translating to Totem API:

void MQTTReceive(String topic, String payload) {
  int command = TotemModule::hashCmd(topic);
  int value = toInt(payload);
  Totem.X4.write(command, value);
}
1 Like

Thanks for the reply!

  • Using the X3 BLE control board, is there a way to remove security so I can send Bluetooth datagrams directly? I’ve had some success doing that with noble on the BBC micro:bit.

  • Using the X4, is it possible to swap out the X3 for the X4 on the Mini Trooper? Or do I need to build a different robot?

Using the X3 BLE control board, is there a way to remove security so I can send Bluetooth datagrams directly? I’ve had some success doing that with noble on the BBC micro:bit.

By “security” you meant “pairing”?. Currently Totem products doesn’t use pairing and packets encryption. Only simple connection.
Or you meant sending L2CAP packets directly to avoid GATT protocol? No, that is not supported and would only complicate things.

Using the X4, is it possible to swap out the X3 for the X4 on the Mini Trooper? Or do I need to build a different robot?

X4 is twice as big as X3 and uses beefier battery, so unfortunately - no. X4 is for bigger and more powerful robots.

Yes! Simple connections is perfect for me :slight_smile:

Seems like I will need a bigger robot :slight_smile:

Thanks for your help! I’ll try to get something working with BLE first, and let you know about the progress.

Will be waiting for some results :slight_smile: