Want to DIY a new device, don't know where to start

I have an Esp32 which can control an LED, a beeper and an electrical shocking thing.
Preferably when communicating with Intiface, it would show up as just that, a light, a beeper and a shocker.

As a simple test, my Esp32 accepts a number from 0 to 255 in the serial console, and numbers above 127 turn my LED on, while those below or equal turn it off.

To this end, I am hoping to (at least) connect to it via serial. I am unable to connect to it with the response:

Looking for protocol that matches specifier: Serial(SerialSpecifier { baud_rate: 0, data_bits: 0, stop_bits: 0, parity: ‘\0’, port: “/dev/ttyUSB0” })
No viable protocols for hardware Serial(SerialSpecifier { baud_rate: 0, data_bits: 0, stop_bits: 0, parity: ‘\0’, port: “/dev/ttyUSB0” }), ignoring.

My protocols field in my buttplug-device-config.json begins as follows:

  "protocols": {
    "CUSTOMXXX": {
      "serial": [
        {
          "port": "default",
          "baud-rate": 115200,
          "data-bits": 8,
          "parity": "N",
          "stop-bits": 1
        }
      ],
      "defaults": {
        "name": "ESP32",
        "messages": {
          "LinearCmd": [
            {
              "StepRange": [
                0,
                255
              ],
              "ActuatorType": "Vibrate"
            }
          ]
        }
      }
    },
    --

Edit: I am using Intiface-Central v2.4.0 for linux x64 (Straight from github)

“CUSTOMXXX” isn’t a protocol we support. The list of protocols in the device config are related to the protocols implemented in the library, so you can’t just make one up and expect things to work.

Most likely, you’ll want to use tcode, but even then, nothing on your device is supports by actuators in either Buttplug or tcode, so you’re probably going to have to just act like everything is a vibrator.

Were you ever able to get this working? Im running into a similar error when attempting to connect to an ESP32. I tried using both the tcode-v03 and nobra protocols but it isn’t able to connect.

Ive tried adding my serial port, baud-rate, etc using both the Serial Devices UI and modifying the device-config.json for those protocols but I get the same error:


Found protocol "nobra" for user specifier Serial (SerialSpecifier { baud_rate: 0, data_bits: 0, stop_bits: 0, parity: '\0', port: "/dev/cu.usbserial-110" }).
Device Serial Port Device /dev/tty.usbserial-110 (/dev/tty.usbserial-110) found.
Device errored while trying to connect: Device Configuration Error: No protocols with viable communication matches for hardware.

Im wondering if for some reason its not reading the baud-rate value and other options since th error states 0 for all those values regardless of what I set on the config.

Read the error messages you posted.

Your port name is /dev/tty.usbserial-110, not the /dev/cu-usbserial-110 you have set.

Sorry for the confusion, that;s bad cropping on my part.

The line before what I posted is:
Device Serial Port Device /dev/cu.usbserial-110 (/dev/cu.usbserial-110) found.

Connecting the esp32 over usb will create both, the cu should be for outbound from the computer and the tty should be inbound.

Both /dev/tty.usbserial-110 and /dev/cu.usbserial-110 are always detected by IC. I;ll only get the Found protocol message if the device is connected and I have a config for that address (which in this case was only for the cu).

Ive tried configuring for each and both and i get the same error, just with the corresponding address in the Found protocol line. If I have a config set for both addresses I get 2 Device errored messages.

I am on MacOS and was curious if this was related to this issue in serialport-rs:

The suggested fix is to set baud rate to 0 to force the connection, but that didn’t get me any further. At some point I have to write a rust app to test if i can get serialport-rs to connect.