Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fender Bronco 40 support? #20

Open
StillVoidingWarranties opened this issue Oct 8, 2023 · 42 comments
Open

Fender Bronco 40 support? #20

StillVoidingWarranties opened this issue Oct 8, 2023 · 42 comments

Comments

@StillVoidingWarranties
Copy link

StillVoidingWarranties commented Oct 8, 2023

Hello offa,

I have a Fender Bronco 40 amp which from what I understand is very similar to the Mustang series, just with different modeling presets for bass. (Fender Bronco 40 Manual)
It used to be controllable with the Fuse Silverlight-app from Fender.

I managed to build Plug v1.4.3 and the connection fails with the error message
ERROR: Invalid amp id: 239

This error changes depending on the position of the amp selection knob. It has 8 positions and for my setup it produces the ids 171, 0, 0, 244, 239, 219, 219, 219.

Here is the output from dmesg:

[56819.047021] usb 1-7: new full-speed USB device number 26 using xhci_hcd
[56819.204199] usb 1-7: New USB device found, idVendor=1ed8, idProduct=000a, bcdDevice= 1.00
[56819.204216] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[56819.204224] usb 1-7: Product: Bronco Amplifier 
[56819.204230] usb 1-7: Manufacturer: FMIC
[56819.204236] usb 1-7: SerialNumber: F62BFF373537553057156631
[56819.210811] hid-generic 0003:1ED8:000A.0011: hiddev2,hidraw4: USB HID v1.10 Device [FMIC Bronco Amplifier ] on usb-0000:00:14.0-7/input0

lsusb:
Bus 001 Device 026: ID 1ed8:000a FMIC Bronco Amplifier

lsusb -v:

Bus 001 Device 026: ID 1ed8:000a FMIC Bronco Amplifier 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1ed8 
  idProduct          0x000a 
  bcdDevice            1.00
  iManufacturer           1 FMIC
  iProduct                2 Bronco Amplifier 
  iSerial                 3 F62BFF373537553057156631
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0084
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      32
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength       0x001e
        bInCollection           1
        baInterfaceNr(0)        1
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0200 Input Undefined
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               1
        iTerminal               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           2
        bDelay                  1 frames
        wFormatTag         0x0001 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        44100
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x00c0  1x 192 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioStreaming Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bLockDelayUnits         0 Undefined
          wLockDelay         0x0000

Sadly, I lack the C++ skills to look into this but if the Bronco is as similar to the Mustang as I suspect then making Plug compatible with the Bronco should be doable. If someone is interested I will try to help as good as I can.

@StillVoidingWarranties
Copy link
Author

I just tried to connect with usb debugging enabled.

On plugging in the amp there is

[ 4.647294] [00009504] libusb: debug [linux_get_device_address] getting address for device: 1-7 detached: 0
[ 4.651728] [00009504] libusb: debug [linux_get_device_address] scan 1-7
[ 4.651766] [00009504] libusb: debug [linux_get_device_address] bus=1 dev=28
[ 4.651772] [00009504] libusb: debug [udev_hotplug_event] udev hotplug event. action: add.
[ 4.651775] [00009504] libusb: debug [linux_enumerate_device] busnum 1 devaddr 28 session_id 284
[ 4.651780] [00009504] libusb: debug [linux_enumerate_device] allocating new device for 1/28 (session 284)
[ 4.651812] [00009504] libusb: debug [linux_get_parent_info] dev 0x7faeb4001f60 (1-7) has parent 0x55d1273ed6b0 (usb1) port 7
[ 4.689494] [00009504] libusb: debug [linux_get_device_address] getting address for device: 1-7 detached: 0
[ 4.689511] [00009504] libusb: debug [linux_get_device_address] scan 1-7
[ 4.689544] [00009504] libusb: debug [linux_get_device_address] bus=1 dev=28
[ 4.689551] [00009504] libusb: debug [udev_hotplug_event] udev hotplug event. action: bind.

Then, when trying to connect I get

[10.536388] [00009502] libusb: debug [libusb_get_device_descriptor]  
[10.536393] [00009502] libusb: debug [libusb_open] open 1.28
[10.536422] [00009502] libusb: debug [usbi_add_event_source] add fd 20 events 4
[10.536433] [00009502] libusb: debug [libusb_claim_interface] interface 0
[10.536595] [00009502] libusb: debug [libusb_submit_transfer] transfer 0x55d12770b1b0
[10.536602] [00009502] libusb: debug [add_to_flying_list] arm timer for timeout in 1000ms (first in line)
[10.536618] [00009502] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[10.536622] [00009502] libusb: debug [handle_events] event sources modified, reallocating event data
[10.536627] [00009502] libusb: debug [usbi_wait_for_events] poll() 3 fds with timeout in 60000ms
[10.536632] [00009502] libusb: debug [usbi_wait_for_events] poll() returned 1
[10.536636] [00009502] libusb: debug [handle_event_trigger] event triggered
[10.536639] [00009502] libusb: debug [handle_event_trigger] hotplug message received
[10.536645] [00009502] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[10.536648] [00009502] libusb: debug [usbi_wait_for_events] poll() 3 fds with timeout in 60000ms
[10.536691] [00009502] libusb: debug [usbi_wait_for_events] poll() returned 1
[10.536707] [00009502] libusb: debug [reap_for_handle] urb type=2 status=0 transferred=4
[10.536712] [00009502] libusb: debug [handle_control_completion] handling completion status 0
[10.536716] [00009502] libusb: debug [arm_timer_for_next_timeout] no timeouts, disarming timer
[10.536721] [00009502] libusb: debug [usbi_handle_transfer_completion] transfer 0x55d12770b1b0 has callback 0x7faee25fd100
[10.536725] [00009502] libusb: debug [sync_transfer_cb] actual_length=4
[10.536732] [00009502] libusb: debug [libusb_free_transfer] transfer 0x55d12770b1b0
[10.536738] [00009502] libusb: debug [libusb_submit_transfer] transfer 0x55d12770b1b0
[10.536741] [00009502] libusb: debug [add_to_flying_list] arm timer for timeout in 1000ms (first in line)
[10.536752] [00009502] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[10.536755] [00009502] libusb: debug [usbi_wait_for_events] poll() 3 fds with timeout in 60000ms
[10.536983] [00009502] libusb: debug [usbi_wait_for_events] poll() returned 1
[10.536996] [00009502] libusb: debug [reap_for_handle] urb type=2 status=0 transferred=36
[10.537000] [00009502] libusb: debug [handle_control_completion] handling completion status 0
[10.537003] [00009502] libusb: debug [arm_timer_for_next_timeout] no timeouts, disarming timer
[10.537008] [00009502] libusb: debug [usbi_handle_transfer_completion] transfer 0x55d12770b1b0 has callback 0x7faee25fd100
[10.537011] [00009502] libusb: debug [sync_transfer_cb] actual_length=36
[10.537017] [00009502] libusb: debug [libusb_free_transfer] transfer 0x55d12770b1b0

[...]

[12.069805] [00009502] libusb: debug [libusb_submit_transfer] transfer 0x55d12770b1b0
[12.069809] [00009502] libusb: debug [add_to_flying_list] arm timer for timeout in 500ms (first in line)
[12.069815] [00009502] libusb: debug [submit_bulk_transfer] need 1 urbs for new transfer with length 64
[12.069825] [00009502] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[12.069829] [00009502] libusb: debug [usbi_wait_for_events] poll() 3 fds with timeout in 60000ms
[12.569863] [00009502] libusb: debug [usbi_wait_for_events] poll() returned 1
[12.569894] [00009502] libusb: debug [libusb_cancel_transfer] transfer 0x55d12770b1b0
[12.569986] [00009502] libusb: debug [arm_timer_for_next_timeout] no timeouts, disarming timer
[12.573257] [00009502] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[12.573267] [00009502] libusb: debug [usbi_wait_for_events] poll() 3 fds with timeout in 60000ms
[12.573275] [00009502] libusb: debug [usbi_wait_for_events] poll() returned 1
[12.573297] [00009502] libusb: debug [reap_for_handle] urb type=1 status=-2 transferred=0
[12.573301] [00009502] libusb: debug [handle_bulk_completion] handling completion status -2 of bulk urb 1/1
[12.573304] [00009502] libusb: debug [handle_bulk_completion] abnormal reap: urb status -2
[12.573307] [00009502] libusb: debug [handle_bulk_completion] abnormal reap: last URB handled, reporting
[12.573311] [00009502] libusb: debug [usbi_handle_transfer_cancellation] detected timeout cancellation
[12.573314] [00009502] libusb: debug [arm_timer_for_next_timeout] no timeouts, disarming timer
[12.573318] [00009502] libusb: debug [usbi_handle_transfer_completion] transfer 0x55d12770b1b0 has callback 0x7faee25fd100
[12.573321] [00009502] libusb: debug [sync_transfer_cb] actual_length=0
[12.573325] [00009502] libusb: debug [libusb_free_transfer] transfer 0x55d12770b1b0
ERROR:  Invalid amp id: 0

@offa
Copy link
Owner

offa commented Oct 12, 2023

ERROR: Invalid amp id: 0

The amp IDs listed above aren't known to plug yet, but 0 usually indicates some kind of communication issues (eg. a different protocol or package format used).

Can you dump the initial packets between PC and device? If not, I can provide you a test version which does it.

@StillVoidingWarranties
Copy link
Author

StillVoidingWarranties commented Oct 12, 2023

I am sorry but I don't know how to log USB traffic except for what I have posted above. If you could provide me with a test version I will happily make some logs. I may also be able to reactivate an old Windows 7 installation with FUSE installed but I don't know how to create any logs on Windows.

@offa
Copy link
Owner

offa commented Oct 12, 2023

The 20-bronco branch contains a very basic dumper – it'll write all received bytes to stdout (hex).

Amp packets are those with a 0x05 on the 3rd position (aka array index 2).

@StillVoidingWarranties
Copy link
Author

Ok, thank you very much. I will look into this in a bit.

@StillVoidingWarranties
Copy link
Author

Ok, here is what I found. First try:
1c 01 05 00 13 00 01 00 00 00 00 00 00 00 00 00 9b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ba aa ff aa 8f 60 86 80 80 00 80 80 07 07 07 01 02 04 00 01 7f 01 07 64 19 8c b3 80 80 89 00 00

Second try, different virtual amp selection:
1c 01 05 00 07 00 01 00 00 00 00 00 00 00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 80 ff 8e 63 80 80 80 ff 80 80 01 01 01 02 03 00 00 01 7f 01 00 0d 80 4c ff ff 55 aa 00 00

Third try, different USB port, different virtual amp selection
1c 01 05 00 12 00 01 00 00 00 00 00 00 00 00 00 9a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f3 59 80 ff 9c 47 aa 80 80 00 80 80 06 06 06 01 02 06 06 01 7f 01 06 60 19 80 b3 80 80 80 00 00

@StillVoidingWarranties
Copy link
Author

I have tried each of the 24 presets because they result in different bytes being sent. These are organized in 3 banks:
1 - 8: Factory presets (amber bank)
9 - 16: User presets A (green bank)
17 - 24: User presets B (red bank)

These are the 24 lines of data I received:

1c 01 05 00 07 00 01 00 00 00 00 00 00 00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 80 ff 8e 63 80 80 80 ff 80 80 01 01 01 02 03 00 00 01 7f 01 00 0d 80 4c ff ff 55 aa 00 00 
1c 01 05 00 06 00 01 00 00 00 00 00 00 00 00 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 bf 81 00 80 63 a7 a4 91 80 ff 80 80 02 02 02 00 00 0d 02 01 7f 01 01 03 99 40 ff ff 80 80 00 00 
1c 01 05 00 05 00 01 00 00 00 00 00 00 00 00 00 97 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ed aa 80 63 55 55 9c 80 80 ff 80 80 03 03 03 00 00 0a 00 01 7f 01 01 03 99 40 ff ff ff 80 00 00 
1c 01 05 00 04 00 01 00 00 00 00 00 00 00 00 00 98 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b8 88 80 80 78 55 a0 80 80 00 80 80 04 04 04 01 02 05 04 01 7f 01 01 03 99 40 ff ff 57 50 00 00 
1c 01 05 00 03 00 01 00 00 00 00 00 00 00 00 00 9b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 aa ff aa 80 80 9c 80 80 ff 80 80 07 07 07 02 03 00 00 01 7f 01 00 03 99 40 ff ff 80 80 00 00 
1c 01 05 00 02 00 01 00 00 00 00 00 00 00 00 00 9a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d5 80 80 ff 9c 47 9c 80 80 00 80 80 06 06 06 01 02 06 06 01 7a 01 01 03 99 40 ff ff 80 80 00 00 
1c 01 05 00 01 00 01 00 00 00 00 00 00 00 00 00 99 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7d 9e 80 ff 80 80 b6 80 a3 00 80 80 05 05 05 01 02 02 00 01 7d 01 06 60 19 80 b3 80 80 80 00 00 
1c 01 05 00 00 00 01 00 00 00 00 00 00 00 00 00 bd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b9 50 80 e3 55 47 aa 80 80 00 80 80 08 08 08 01 02 09 08 01 7f 01 01 03 99 40 ff ff ff e3 00 00 
1c 01 05 00 0f 00 01 00 00 00 00 00 00 00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 88 80 ff 64 c9 b4 80 80 00 80 80 01 01 01 05 02 0a 00 01 7b 01 00 27 66 59 e6 c0 00 7e 00 00 
1c 01 05 00 0e 00 01 00 00 00 00 00 00 00 00 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cd 69 00 80 ad 8f 84 9e 80 00 80 80 02 02 02 00 02 08 02 02 7f 01 00 60 19 80 b3 80 80 80 00 00 
1c 01 05 00 0d 00 01 00 00 00 00 00 00 00 00 00 97 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a2 aa 80 63 40 55 b9 80 80 ff 80 80 03 03 03 00 00 0c 00 01 7b 01 03 27 66 59 e6 c0 ff 80 00 00 
1c 01 05 00 0c 00 01 00 00 00 00 00 00 00 00 00 98 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 22 80 80 7c 7c c2 80 80 00 80 80 04 04 04 01 02 05 04 01 7d 01 01 03 99 40 ff ff 34 49 00 00 
1c 01 05 00 0b 00 01 00 00 00 00 00 00 00 00 00 9b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7c aa ff aa 8c 4e 7d 80 80 00 80 80 07 07 07 01 02 04 00 01 7a 01 0a 7d 19 c0 80 40 80 9b 00 00 
1c 01 05 00 0a 00 01 00 00 00 00 00 00 00 00 00 9a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c2 54 80 ff 69 47 9c 80 80 00 80 80 06 06 06 01 02 06 06 01 7a 01 01 03 99 40 ff ff 80 80 00 00 
1c 01 05 00 09 00 01 00 00 00 00 00 00 00 00 00 99 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7d 9e 80 ff 80 80 b6 80 a3 00 80 80 05 05 05 01 02 03 00 01 7d 01 06 60 19 80 b3 80 80 80 00 00 
1c 01 05 00 08 00 01 00 00 00 00 00 00 00 00 00 bd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c9 51 80 e3 55 47 aa 80 80 00 80 80 08 08 08 01 02 05 08 01 7f 01 01 03 99 40 ff ff ff e3 00 00 
1c 01 05 00 17 00 01 00 00 00 00 00 00 00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 88 80 ff 1b a8 c7 80 80 00 80 80 01 01 01 05 02 0a 00 01 7f 01 00 27 66 59 e6 c0 00 41 00 00 
1c 01 05 00 16 00 01 00 00 00 00 00 00 00 00 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cd 69 00 80 ff 8f 63 e2 80 00 80 80 02 02 02 00 02 08 02 02 7f 01 00 60 19 80 b3 80 80 80 00 00 
1c 01 05 00 15 00 01 00 00 00 00 00 00 00 00 00 97 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ba 80 63 55 55 67 80 80 ff 80 80 03 03 03 00 00 0a 00 01 ff 01 01 03 99 40 ff ff ff 80 00 00 
1c 01 05 00 14 00 01 00 00 00 00 00 00 00 00 00 98 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e2 00 80 80 7c 7c c2 80 80 00 80 80 04 04 04 01 02 03 04 01 7d 01 06 60 19 80 b3 80 34 3b 00 00 
1c 01 05 00 13 00 01 00 00 00 00 00 00 00 00 00 9b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ba aa ff aa 8f 60 86 80 80 00 80 80 07 07 07 01 02 04 00 01 7f 01 07 64 19 8c b3 80 80 89 00 00 
1c 01 05 00 12 00 01 00 00 00 00 00 00 00 00 00 9a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f3 59 80 ff 9c 47 aa 80 80 00 80 80 06 06 06 01 02 06 06 01 7f 01 06 60 19 80 b3 80 80 80 00 00 
1c 01 05 00 11 00 01 00 00 00 00 00 00 00 00 00 99 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7d 9c 80 ff 80 4b b6 80 a3 00 80 80 05 05 05 01 02 03 00 01 7d 01 09 6e 19 a6 80 40 80 5c 00 00 
1c 01 05 00 10 00 01 00 00 00 00 00 00 00 00 00 bd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a4 ff 80 e3 55 47 aa 80 80 00 80 80 08 08 08 01 02 05 08 01 7f 01 01 03 99 40 ff ff ff e3 00 00

@offa
Copy link
Owner

offa commented Oct 12, 2023

The packets seem similar to the mustang ones. I've taken your first example and decoded it using it's format (some values only):

  • Header:
    • stage: ready
    • type: operation
    • dsp: amp
    • slot: 0x13 (19 dez.)
  • Payload:
    • model: 0x9b
    • volume: 0xba (186 of 255)

Could these match your settings?

@StillVoidingWarranties
Copy link
Author

StillVoidingWarranties commented Oct 12, 2023

Yes, this looks plausible, I think for the first try I used the 3rd model in the 3rd bank which would be #19.

BTW: The amps of the Bronco 40 are called:

  • Rumble
  • '59 Bassman
  • Bassman TV
  • Bassman 300
  • Redhead
  • Rockin' Peg
  • KGB800
  • Monster

@offa
Copy link
Owner

offa commented Oct 12, 2023

The 59 Bassman is included with id 0x64. Could you select that one, start Plug and see if you get past the invalid amp id error?

We have to figure out the id's of each amp model. Selecting on of those prior to starting Plug should yield a Invalid amp id <ID of selected amp> error.

@StillVoidingWarranties
Copy link
Author

Sadly, the Bronco's 59 Bassman preset does not seem to work.

Strangely, I get different IDs without changing the preset. The first one (Rumble) was reported as 0, 71, 171, 238, 244, 245, 251, 252 and 255 on different attempts. Now, after a few tries I cannot get anything other than 0. I tried different cables and different USB ports and power cycling the amp. I will try rebooting the computer.

@StillVoidingWarranties
Copy link
Author

Error ids vary wildly even after reboot or closing and reopening Plug.

@StillVoidingWarranties
Copy link
Author

StillVoidingWarranties commented Oct 13, 2023

I read your documentation and the Bronco's amp name packets (0x1c 0x01 0x04) seem to differ from that as the Bronco sends the slot number as the 5th byte, not the 4th which is always 0. It does however send the amp names in bytes 16 - 32. I could decode them from a connection log, e.g. the factory presets were sent as

  • Monster
  • Redhead
  • Rockin' Peg
  • KGB800
  • Bassman 300
  • Bassman TV
  • '59 Bassman 4x10
  • Rumble Clean

Also, after the mysterious device with address 0x0a there is another packet for a device 0x0d containing only zeroes. After that the following packets seem to be the same as with Mustangs with the confirmation and effects settings.

bronco.txt

@offa
Copy link
Owner

offa commented Oct 14, 2023

Error ids vary wildly even after reboot or closing and reopening Plug.

Did your test with the log attached fail with a 0 too? The amp packet seems to use model 0x9a there.

Bronco sends the slot number as the 5th byte, not the 4th which is always 0.

Could it be that the slot is not one, but two bytes?

@StillVoidingWarranties
Copy link
Author

Did your test with the log attached fail with a 0 too? The amp packet seems to use model 0x9a there.

I didn't remember so I redid the test. I selected the "Bassman '59" factory preset (device id 0x01) and the log is about the same (except for the selected amp), see attached log.
bronco_bassman59.log

Could it be that the slot is not one, but two bytes?

Yes. I guess Fender wanted to accomodate more than 256 devices and extended the device id to a little endian Word.

@offa
Copy link
Owner

offa commented Oct 16, 2023

I do get a amp model id of 0x99, did you get an error containing that id?
The value appeared in the examples above too.

@StillVoidingWarranties
Copy link
Author

No, the error message showed id 0.

@offa
Copy link
Owner

offa commented Oct 17, 2023

Could it be, that the amp uses a different order of packets, thus leading to a non-amp packet being parsed as an amp packet? The current implementation isn't that clever and does quite some assumptions regarding packet order.

@offa
Copy link
Owner

offa commented Oct 17, 2023

I have added a commit to investigate this. It'll print the actual bytes considered as amp packet and the value at the amp id position. Let's see what is decoded on the bronco! :-)

@StillVoidingWarranties
Copy link
Author

Here are three logfiles.

  • bronco_01.log is a connection attempt with factory preset "Rumble" (Nr. 1). Plug reported error id 0.
  • bronco_02.log is a connection attempt with factory preset "'59 Bassman" (Nr. 2). Plug reported error id 0.
  • bronco_03.log is a connection attempt with user preset 9. Plug reported error id 208

Does that help? Do you have similar logs of a Mustang amp?

@offa
Copy link
Owner

offa commented Oct 17, 2023

Sorry, I made a mistake – logging after parsing doesn't make much sense if the former fails 🤦‍♂️. Could you do the test again with the updated commit? One is enough.

@StillVoidingWarranties
Copy link
Author

StillVoidingWarranties commented Oct 17, 2023

Sure. Here it is: bronco_04.log
I made a few more attempts with the same result: All bytes in the amp packet are zeroes.

@StillVoidingWarranties
Copy link
Author

Here it (propably incorrectly) identified amp id 28: bronco_05.log

@offa
Copy link
Owner

offa commented Oct 17, 2023

As expected there's garbage decoded instead of amp data …

It could be that Broncos transmit a different number of packets. At least we have found the root of the issue …

@StillVoidingWarranties
Copy link
Author

I already mentioned that the Bronco does not send its id on the 4th position of the amp name packets but at the 5th position, e.g.
1c 01 04 00 02 00 00 00 00 00 00 00 00 00 00 00 52 6f 63 6b 69 6e 27 20 50 65 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

instead of

1c 01 04 02 00 00 00 00 00 00 00 00 00 00 00 00 52 6f 63 6b 69 6e 27 20 50 65 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Is ist possible that this confuses Plug when it later tries to reference that amp id (which is always 00 on the Bronco).

@offa
Copy link
Owner

offa commented Oct 17, 2023

The slot isn't involved yet. The value would be wrong, but the amp packet itself is complete garbage:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1c 01 0c 01 02 00 00 00 00 00 00 00 00 00 00 00 07 00 00 00 08 01 00 00 00 00 00 00 00 00 00 00 27 66 59 e6 c0 80 80 80 00 00 00 00 00 00 00 00 

Plug assumes a fixed number of packets in a given order. A different number of eg. presets on the amp could break this already. The original implementation is sometimes still mysterious …

We can narrow it down a bit tough. I'm going to update the debug code to give some more insight of the data loaded.

@StillVoidingWarranties
Copy link
Author

If it helps I could try to log a complete connection with Fender Fuse and Wireshark.

@offa
Copy link
Owner

offa commented Oct 17, 2023

While Mustangs transmit presets with two packets each (first starts with 0x1c 0x01 0x04) plus an additional for the current preset, the bronco does something different: After 24 preset (each 2 packets) comes an additional set of packets (the current values?) but then more with the preset prefix, but varying number of follow-ups. This could be the fxloop?

However, the amp packet seems at the right place but is decoded wrong later!?

@offa
Copy link
Owner

offa commented Oct 17, 2023

Branch updated: It'll print the number of presets received (should be 48) and the 7 packets, that contain the current settings. Expected are a 1c 01 04 … and 1c 01 05 … as the first two.

@StillVoidingWarranties
Copy link
Author

StillVoidingWarranties commented Oct 17, 2023

Thank you. Two logs, both resulted in

ERROR: No device found
ERROR: Invalid amp id: 0

bronco_07.log
bronco_08.log

And another with a result in amp data:

ERROR: Invalid amp id: 255

bronco_09.log

@StillVoidingWarranties
Copy link
Author

StillVoidingWarranties commented Oct 18, 2023

I managed to capture a connection between the Bronco and the Fender Fuse software using Wireshark :-). I hope this will be helpful in unterstanding what is going on.

Connection_01.zip^

Here is an export of the raw data transmitted. I removed the first packets which I guess are associated with the Bronco's USB audio interface and the packets from the host to the Bronco since these seem to be just acknowledgement packets.

Connection_01_dissected_raw.txt

@offa
Copy link
Owner

offa commented Oct 18, 2023

Preset packets: 200

🤦 That's a problem. It should be 48 on your device (2x number of presets).

Update: For quick testing there's a fixed number now, could you give the newest commit a try please?

Here is an export of the raw data transmitted.

Interesting, the packets use some different values than those received over plug!?

@StillVoidingWarranties
Copy link
Author

Thank you. But still no luck (Invalid amp id: 189).
Log: bronco_10.log

@offa
Copy link
Owner

offa commented Oct 20, 2023

But this time the correct amp packet is parsed. An invalid amp id is normal here as it's not mapped yet. 189 = 0xbd looks plausible. Do subsequent tests with the same amp yield the same value?

The first thing to fix is the wrong number of presets for Bronco.

@StillVoidingWarranties
Copy link
Author

StillVoidingWarranties commented Oct 20, 2023

Do subsequent tests with the same amp yield the same value?

Mostly yes. In my tests I sometimes got a different error on the first try but subsequent tries were consistent. Here are the IDs for the first 8 presets (amber bank, factory presets):

Preset Amp id dec Amp id hex Amp Name
1 150 0x96 Rumble
2 no error no error '59 Bassman
3 151 0x97 Bassman TV
4 152 0x98 Bassman 300
5 155 0x9b KGB 800
6 154 0x9a Rockin' Peg
7 153 0x99 SWR Redhead
8 189 0xbd Monster

The ids repeat in the two other banks (green, red) because I left the amp models the same in the user presets and only changed the settings and effects.

On the second preset I did not get an "Invalid Amp" error but rather an "Invalid Cabinet" error (id 13). The controls of Plug don't seem to do anything, however. Here is the logfile of this connection:
bronco_preset_02a.txt

In the preset 10 (2nd in the green bank) I even got a connection without any error! However, trying to set an amp setting resulted in an Input/Output error. Here is the log for that:
bronco_preset_10b.txt

@offa
Copy link
Owner

offa commented Oct 23, 2023

"Invalid Cabinet" error (id 13).

Yes, Bronco cabinets are likely not complete mapped yet.

The controls of Plug don't seem to do anything, however.

UI needs some additional code too.

I have added some more code get some steps further:

  • Amp ID on receive are mapped es above
  • Sending one of these amp IDs uses a 59 Bassman (sending needs some more values to figure out)
  • Amp UI should show the amp model as above
  • Writing of those values to file throws an exception (since this needs some more work too)

Everything far from complete, but at least some steps.

@StillVoidingWarranties
Copy link
Author

Awesome, I will give it a try. In the meantime, here are some ids of the cabinet simulations the bronco uses. I took them from the FUSE backup files, there they are called "ControlIndex 17". Maybe these are the same ids that are received from/sent to the Bronco. I listed them in the order they appear in the FUSE cabinet selection.

id dec id hex name
0 0x00 No Cabsim
1 0x01 1x10 modern
2 0x02 2x10 modern
3 0x03 4x10 modern
4 0x04 4x10 Hi-Fi
13 0x0d 4x10 vintage
5 0x05 8x10 modern
6 0x06 8x10 vintage
7 0x07 1x12 modern
9 0x09 4x12 modern
10 0x0a 1x15 vintage
11 0x0b 1x15 modern
8 0x08 2x15 vintage
12 0x0c 1x18 vintage

@StillVoidingWarranties
Copy link
Author

StillVoidingWarranties commented Oct 23, 2023

Next, I will try to find out the ids of the effects of the Bronco.

Type id dec id hex Effect
Stomp Box /
Post Gain
198 0xc6 Modern Bass Overdrive
195 0xc3 Overdrive
196 0xc7 Fuzz
186 0xba Greenbox
Simple Comp
Mod / Filter Sine Chorus
Triangle Chorus
Sine Flanger
Triangle Flanger
Vibratone
Phaser
Step Filter
Envelope Controlled Filter
Octave
Delay Mono Delay
Ducking Delay
Multitap Delay
Ping Pong Delay
Reverse Delay
Tape Delay
Stereo Tape Delay
Mono Echo Filter
Stereo Echo Filter
Pitch Shift Delay
Reverb Small Hall Reverb
Large Hall Reverb
Small Room Reverb
Large Room Reverb
Small Plate Reverb
Large Plate Reverb
Ambient Reverb
Arena Reverb
'63 Fender Spring Reverb
'65 Fender Spring Reverb

@StillVoidingWarranties
Copy link
Author

StillVoidingWarranties commented Oct 23, 2023

Amp ID on receive are mapped es above

I can confirm. As long as there are no invalid cab ids the connections are successful and show the correct id in the debug output.

Amp UI should show the amp model as above

When I connect with an amp model active other than the 59 Bassman the Amplifier dropdown text is just empty. When I open the dropdown it shows the Mustang amp names (Fender '57 Deluxe, Fender '59 Bassman, Fender '57 Champ, ...)

Sending one of these amp IDs uses a 59 Bassman (sending needs some more values to figure out)

This seems to work. I changed the Treble and Bass settings in Plug and verified in FUSE that they have been indeed saved to the preset in the amp. Great progress.

Even better, all other amp settings like tone control, USB gain, noise gate settings (even custom ones) are read and saved correctly. Also, all effects settings were read and saved correctly with the exception of the four overdrive effects that are still unknown to Plug. I added the ids of these effects to the table above. This looks very close to a fully working version.

@offa
Copy link
Owner

offa commented Oct 24, 2023

These are good news! 😄

@offa
Copy link
Owner

offa commented Mar 23, 2024

The current architecture makes it quite challenging to support new devices unfortunately. And there's no proper way to do it right now :-/.

@StillVoidingWarranties
Copy link
Author

Sad to hear. Maybe one day someone will have the motivation to do a refactoring or rewrite. Thank you very much for looking into this anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants