ch341eeprom command not found

WheatAndBarley

Well-known member
Hey all, finally trying to get my FV1 dev board running on MacOS and I've hit a small hurdle.

I installed everything here:

I have SpinCAD running in java which I loaded some .spcd files into. I saved the bank as a hex file, used Terminal to convert the hex file to a bin file.

Now when I try using ch341eeprom -s 24c32 -w <filename.bin> I get a 'command not found error'.

If I go to my USB connections in System Information I can see a 'Vendor-specific device' which disappears if I unplug the USB cable from the dev board. If I wire the pedal up normally and turn it on the LED doesn't light up (think its in backwards) but when I turn one of the knobs it seems to act as a mix knob except there's nothing to mix in.

So I believe it's working properly (except the LED lol), I just can't figure out the last step to get the bin file onto the EEPROM. Any tips? Am I missing a driver something?
 
  • Like
Reactions: fig
Hi @WheatAndBarley ,
Sounds like maybe a PATH or permissions issue. Try sudo CHMOD +x on the executable, and make sure it's location is within the executable PATH. Also, with the new MacOS, I'm sure you have run into the dreaded "Denied!" that you have to manually allow in System Preferences -> Security and Privacy - > General.
 
Yeah there's nothing showing up in the security section about it.

Can you explain the path thing a little simpler? In terminal I'm in the folder that my hex file is in. I tried going:

sudo CHMOD +x ch341eeprom -s 24c32 -w Bank1Test.bin

and it returned:

CHMOD: ch341eeprom: No such file or directory
CHMOD: -s: No such file or directory
CHMOD: 24c32: No such file or directory
CHMOD: -w: No such file or directory

so I'm not 100% sure I did that right.
 
  • Like
Reactions: fig
Sure...

The OS needs to know where that executable file is and where the file you're processing are. That can be achieved by either including the physical path on the command line OR by creating provisions for them in your environment PATH. The former is much quicker but requires a bit more typing.

On my rig, the ch341eeprom executable is located in /usr/local/bin, so I'd type;

/usr/local/bin/ch341eeprom -s 24c32 -w /path-to/Bank1Test.bin. <- you need to specify /path-to/

If your executable is in another folder, simply provide the correct path. That may solve your issue, but if not, then try;

sudo chmod +x /path-to/ch341eeprom

...with nothing after...it will prompt you for your password (unless you are logged in as root).
 
Oooooook so that's one step forward. Couldn't figure out where my ch341 executable was, turns out it was in my downloads folder. Moved it to a more convenient location, ran the command line code with the proper file paths and got a message saying I had to allow the executable in the security section of system preferences. So I go do that since it shows up now, then try again and get:

libusb: info [darwin_detach_kernel_driver] no capture entitlements. may not be able to detach the kernel driver for this device
libusb: warning [darwin_detach_kernel_driver] USB device capture requires either an entitlement (com.apple.vm.device-access) or root privilege
Failed to detach kernel driver: 'No such process'
Couldnt configure USB device with vendor ID: 1a86 product ID: 5512

Any ideas what this means?
 
  • Thinking
Reactions: fig
slightly different error:

libusb: info [darwin_detach_kernel_driver] no capture entitlements. may not be able to detach the kernel driver for this device
libusb: info [darwin_claim_interface] no interface found; setting configuration: 1
libusb: info [darwin_claim_interface] interface not found Failed to claim interface 0: 'Input/output error'
Couldnt configure USB device with vendor ID: 1a86 product ID: 5512
 
I should clarify too I'm using a cheap-ish USB dongle to connect to my 2019 macbook pro that only has USB C style connections. I have a 2012 mbp kicking around somewhere that I could probably try using directly.
 
  • Like
Reactions: fig
Yes, you do have to have a data cable, and not just a power/charge line. That might clear the whole #shebang up.
 
The actual USB cable I'm using is the one from my Zoom U44 audio interface which does power and data, and when I use the interface it's always plugged into this UBC C dongle so I'm not sure that's the issue. When I look at it in system info it shows up as a USB 2.0 hub with the name of the manufacturing company, and then under that is where it shows 'Vendor Specific Device' and some more info which disappears if I unplug the cable from the USB jack on the pedal.
 
  • Like
Reactions: fig
" may not be able to detach the kernel driver for this device"
That's the sticky bit. There is a way to manually unbind it but the thing is, you shouldn't have to.
I'll see what I can dig up...I'd try the other laptop just for giggles.
 
At the bottom of this page are some files / drivers for the chip...

 
I'm able to recreate your issue on the same hardware with reads but not writes.

Those messages you're getting are labeled info. The program is most likely working.

Writes
Bash:
user@MacBook-Pro % sudo ./ch341eeprom -s 24c32 -w bypass.bin
Read [4096] bytes from file [bypass.bin]
Wrote [4096] bytes to [24c32] EEPROM

Reads
Bash:
user@MacBook-Pro % sudo ./ch341eeprom -s 24c32 -r currentbank.bin
libusb: info [darwin_detach_kernel_driver] no capture entitlements. may not be able to detach the kernel driver for this device
libusb: info [darwin_claim_interface] no interface found; setting configuration: 1
Read [4096] bytes from [24c32] EEPROM
Wrote [4096] bytes to file [currentbank.bin]
 
  • Like
Reactions: fig
So as an update I resurrected my wife's 2010 MBP so I could plug it directly into a USB port and not use a dongle and I got something. Went through the install, moving the files and whatnot and eventually got this message when I tried to write my bin file to the eeprom:

libusb: info [darwin_detatch_kernel_driver] no capture entitlements. may not be able to detach the kernel driver for this device
libusb: info [darwin_claim_interface] no interface found; setting configuration: 1
Read [4096] bytes from file [/users/PATH/Bank1test.bin]
Wrote [4096] bytes to [24c32] EEPROM

So basically matches what @daeg posted here before. I got excited and thought this meant it had worked but I'm still getting nothing from the pedal itself, just the popping when I change the toggle and the mix and volume controls working as normal.
 
  • Like
Reactions: fig
Which patch are you trying to load?
I forget exactly which ones. iirc I used the fv1 dev flash tool to load a few into the first 3 slots, then converted that hex file to a bin file. Might be worth repeating that process since that was months ago now.
 
  • Like
Reactions: fig
Back
Top