Anyone figured out how to stop CGMiner from taking over the serial ports? I'm trying to use /dev/ttyUSB0 for another app, but CGMiner grabs it every time.
How to Stop CGMiner from Taking Serial Ports?
12 replies 344 views
Try launching the other app first. Get it running, then fire up CGMiner and add the USB devices. If the other app is already active, maybe CGMiner will just step over those ports.
wallet_vaultFull Member
Posts: 321 · Reputation: 431
#3Nov 15, 2019, 07:16 PM
You could check this guide from cgminer.info about command-line arguments. If that doesn't help, how about running CGMiner under a different user?
Thanks for the suggestion! I did that and it still closes all other serial apps when CGMiner kicks in. Just super annoying because those ports work fine without it.
Hey, I appreciate the tips. I'm gonna give that a shot and see if it makes a difference. Fingers crossed!
You nailed it! Once I found out what ports the miners were using, setting the command like usb 1:11,1:8,1:5,1:14 helped it run without snagging the other serial ports.
Awesome you figured it out! Are you on Kano's updated version of CGMiner? If not, there's a link in my profile. Also, Sidehack has a new Smart Hub that could be useful.
Yep, I'm on Kano's 4.12.1. It’s been solid for me except for that port issue, but all good now.
For those interested, I put together a shell script that lists USB devices with matching IDs and launches CGMiner with those devices specified. Just place it in the CGMiner folder as cgstart.sh.
wallet_vaultFull Member
Posts: 321 · Reputation: 431
#10Nov 17, 2019, 10:41 PM
Nice script! That’s gonna save a lot of time. A couple thoughts though. Maybe make the sleep command longer since CGMiner clears the screen? Also, could you loop it for multiple devices?
Hey, I initially set the sleep for 15 seconds while I was debugging. It's easy to adjust. The script checks all USB devices, so new ones will show up when you run it.
I updated the code so now it also shows unused devices. Output looks pretty neat!
Just for kicks, I added an old antminer U2. It shows as a CP2102 USB to UART Bridge Controller and identifies correctly. Here’s how the output looks now.
Related topics
- Issues with ripemd160 on Ubuntu 22 9
- New Bitcoin Improvement Proposal with $100 Reward 9
- Clipboard Vulnerabilities in Cryptocurrency Transactions 8
- Understanding the Differences Between Traditional and Simplified Chinese Mnemonics 6
- Running Bitcoin Core on a Laptop with Limited Storage 20
- Exploring Blockstream's Satellite Tech and Its Potential 22