Skip to content

midiwala CLI: "malformed address" when port name contains additional ":" (e.g. "Bome Network Virtual:BomeBox: MIDIHUB-1 [1]") #23

@ToFFmashines

Description

@ToFFmashines

Description

When using midiwala connect|disconnect with quoted client:port names that themselves contain an extra colon in the port part (e.g. player: T-1), the CLI returns malformed address …. Using numeric clientID:portID works, so this appears to be a parsing limitation in the name-based address path.

Environment

  • Device: Raspberry Pi 5
  • OS: Patchbox OS (ALSA with PipeWire present)
  • midiwala/midiminder version: (can supply exact version if needed)
  • Context: RTP-MIDI + Bome Network : over net connected BomeBox with USB hub and two Blokas MidiHub and others midi stuf. Player is PC with Bome Network and connected Torso T-1 and Arturia BeatStep Pro sequencers.
  • Date observed: 2025-11-03

Steps to Reproduce

  1. List ports (note the extra colon in the port part of some names):

    $ midiwala list --ports --plain
    Bome Network Virtual:player
    Bome Network Virtual:player: Arturia BeatStep Pro 1
    Bome Network Virtual:player: T-1
    Bome Network Virtual:BomeBox
    Bome Network Virtual:BomeBox: CME UF
    Bome Network Virtual:BomeBox: MIDIHUB-1 [1]
    Bome Network Virtual:BomeBox: MIDIHUB-1 [2]
    Bome Network Virtual:BomeBox: MIDIHUB-1 [3]
    Bome Network Virtual:BomeBox: MIDIHUB-1 [4]
    Bome Network Virtual:BomeBox: MIDIHUB-2 [1]
    Bome Network Virtual:BomeBox: MIDIHUB-2 [2]
    Bome Network Virtual:BomeBox: MIDIHUB-2 [3]
    Bome Network Virtual:BomeBox: MIDIHUB-2 [4]
    Bome Network Virtual:BomeBox: WIDI Bud Pro
    Midi Through:Port-0
    rtp-zyn1:out-zyn1
    rtp-zyn2:out-zyn2
  2. Name-based connect where the port name contains an extra colon → fails:

    $ midiwala connect "Bome Network Virtual:player: T-1" "Bome Network Virtual:BomeBox: MIDIHUB-2 [1]"
    malformed address 'Bome Network Virtual:player: T-1'
  3. Name-based connect where neither side contains an extra colon inside the port name → works:

    $ midiwala connect "Midi Through:Port-0" "rtp-zyn1:out-zyn1"
    Connected Midi Through:Port-0 [14:0] --> rtp-zyn1:out-zyn1 [130:0]
  4. ID-based connect for the same “failing” pair → works:

    # player: T-1            → 132:2
    # BomeBox: MIDIHUB-2 [1] → 132:9
    $ midiwala connect    132:2 132:9
    $ midiwala disconnect 132:2 132:9

Actual Behavior

  • Name-based call (with quotes) errors out when the port contains an additional colon:

    malformed address 'Bome Network Virtual:player: T-1'
    
  • The same endpoints work via IDs.

  • Name-based calls without extra colons in the port (e.g., Midi Through:Port-0rtp-zyn1:out-zyn1) work fine.

Expected Behavior

  • Name-based addresses should accept port names containing : (since midiwala -l and list --ports --plain present such names) and resolve them to clientID:portID internally.

Additional Diagnostics / Context

  • midiwala -l :

      Ports:
          Bome Network Virtual : player                         [132:0] <->
          Bome Network Virtual : player: Arturia BeatStep Pro 1 [132:1] <->
          Bome Network Virtual : player: T-1                    [132:2] <->
          Bome Network Virtual : BomeBox                        [132:3] <->
          Bome Network Virtual : BomeBox: CME UF                [132:4] <->
          Bome Network Virtual : BomeBox: MIDIHUB-1 [1]         [132:5] <->
          Bome Network Virtual : BomeBox: MIDIHUB-1 [2]         [132:6] <->
          Bome Network Virtual : BomeBox: MIDIHUB-1 [3]         [132:7] <->
          Bome Network Virtual : BomeBox: MIDIHUB-1 [4]         [132:8] <->
          Bome Network Virtual : BomeBox: MIDIHUB-2 [1]         [132:9] <->
          Bome Network Virtual : BomeBox: MIDIHUB-2 [2]         [132:10] <->
          Bome Network Virtual : BomeBox: MIDIHUB-2 [3]         [132:11] <->
          Bome Network Virtual : BomeBox: MIDIHUB-2 [4]         [132:12] <->
          Bome Network Virtual : BomeBox: WIDI Bud Pro          [132:13] <->
          Midi Through         : Port-0                         [ 14:0] <->
          rtp-zyn1             : out-zyn1                       [130:0] <->
          rtp-zyn2             : out-zyn2                       [131:0] <->
      Connections:
          Bome Network Virtual:player: T-1 [132:2] --> Bome Network Virtual:BomeBox: MIDIHUB-2 [1] [132:9]
          Midi Through:Port-0 [14:0] --> rtp-zyn1:out-zyn1 [130:0]
  • aconnect -l for system view:

      client 0: 'System' [type=kernel]
          0 'Timer           '
      	Connecting To: 146:0
          1 'Announce        '
      	Connecting To: 128:0, 129:0, 146:0, 133:0
      client 14: 'Midi Through' [type=kernel]
          0 'Midi Through Port-0'
      	Connecting To: 129:0[real:0], 130:0
      	Connected From: 129:0
      client 130: 'rtp-zyn1' [type=user,pid=1209]
          0 'out-zyn1        '
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0, 14:0
      client 131: 'rtp-zyn2' [type=user,pid=1210]
          0 'out-zyn2        '
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
      client 132: 'Bome Network Virtual' [type=user,pid=1564]
          0 'player          '
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
          1 'player: Arturia BeatStep Pro 1'
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
          2 'player: T-1     '
      	Connecting To: 129:0[real:0], 132:9
      	Connected From: 129:0
          3 'BomeBox         '
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
          4 'BomeBox: CME UF '
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
          5 'BomeBox: MIDIHUB-1 [1]'
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
          6 'BomeBox: MIDIHUB-1 [2]'
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
          7 'BomeBox: MIDIHUB-1 [3]'
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
          8 'BomeBox: MIDIHUB-1 [4]'
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
          9 'BomeBox: MIDIHUB-2 [1]'
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0, 132:2
         10 'BomeBox: MIDIHUB-2 [2]'
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
         11 'BomeBox: MIDIHUB-2 [3]'
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
         12 'BomeBox: MIDIHUB-2 [4]'
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
         13 'BomeBox: WIDI Bud Pro'
      	Connecting To: 129:0[real:0]
      	Connected From: 129:0
      client 146: 'PipeWire-System' [type=user,pid=1379]
          0 'input           '
      	Connected From: 0:1, 0:0
      client 147: 'PipeWire-RT-Event' [type=user,pid=1379]
          0 'input  

Workarounds

  • Use numeric clientID:portID:

    midiwala connect 132:2 132:9
    midiwala disconnect 132:2 132:9
  • Or convert human-readable names to IDs in caller code before invoking midiwala.

Hypothesis / Possible Fix

  • The name parser likely splits on the first colon to get client vs port. When the port contains an additional colon (e.g., player: T-1), the parser rejects it.

  • Potential fixes:

    • Parse from the right (split on the last :): client = left, port = right remainder.
    • Use a regex like ^(?P<client>[^:]+):(?P<port>.+)$ (trim spaces) to allow colons inside the port name.
    • As a stopgap, document the limitation and recommend ID form; but ideally the name-based form should work since midiwala itself presents names with embedded colons.

Happy to provide full midiwala -l output and exact versions if needed, and to test a patched build.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions