Bitcoin Mining on Mac OS X – ASICs

While it’s been possible to purchase ASICs (Application Specific Integrated Circuits – chips specifically created to mine Bitcoins in this case) for several months, it has been a difficult and risky process involving auctions on forums with one-way exchanges of money for promises of future hardware. However, recently ASICMINER has made it much easier to purchase their Blades and USB miners. You can pick up one of the USB ASIC miners for around $90 USD (at current exchange rates). One of these will hash at around 333 Mh/s at a fraction of the power usage of modern GPUs.

USB Block Erupter

Installation

To get started using a USB ASIC under OS X, such as the Block Erupter from ASICMINER, you will first need to install either cgminer or bfgminer. You can refer to my previous article for details on installing cgminer or bfgminer under OS X. The basic steps are:

  1. Launch Terminal.app from Spotlight or your Applications folder
  2. Install Homebrew by entering the following command:
    ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
  3. Run the following command and fix any reported issues:
    brew doctor
  4. Tap this Homebrew repostory so that you can install packages from it:
    brew tap nwoolls/xgminer
  5. Finally, install either cgminer or bfgminer:
    brew install cgminer

If you’d like to install the miner using the latest source from Github rather than the latest official package, use the –HEAD (two dashes prefix) parameter, e.g.:

brew install bfgminer --HEAD

NOTE: if you are going to use bfgminer, at this time you must use the above –HEAD parameter to get the latest changes from Github. Otherwise USB devices may not be recognized automatically.

Also, if you are using bfgminer you must install the CP210x USB to UART Bridge VCP driver found here. This driver will break USB support in cgminer. Click here for instructions on removing the driver. If you get a page saying your session timed out, visit the main knowledge base site first, and then navigate to the removal instructions. I’ve also reproduced their instructions below:

To uninstall the VCP driver from a Mac OS machine, just drag the driver to the trash from the System/Library/Extensions folder (SilabsUSBDriver) and then reboot the machine.

To verify if a driver is present, plug in a CP210x device and check the /dev directory for a device named “tty.SLAB_USBtoUART”. If this is not present, it means no VCP driver is active, or that the CP210x device has a VID/PID combination that does not match the driver installed. The VID/PID can be found in the device listing in the System Profiler (even if a corresponding driver is not installed).

Detection

Once you have successfully installed one of the above Bitcoin miners, use the following commands to probe for the ASIC USB devices:

cgminer --ndevs

The above command should show USB details for each Erupter ASIC:

[2013-07-01 17:16:30] USB all: found 18 devices - listing known devices
.USB dev 0: Bus 58 Device 2 ID: 10c4:ea60
Manufacturer: 'Silicon Labs'
Product: 'CP2102 USB to UART Bridge Controller'
.USB dev 1: Bus 93 Device 2 ID: 10c4:ea60
Manufacturer: 'Silicon Labs'
Product: 'CP2102 USB to UART Bridge Controller'
[2013-07-01 17:16:30] 2 known USB devices

For bfgminer, use the following command:

bfgminer -S all -d?

The bfgminer output should show ICA devices for the Erupter ASIC:

[2013-07-01 17:15:12] Started bfgminer 3.1.1
[2013-07-01 17:15:17] Devices detected:
[2013-07-01 17:15:17] 0. OCL 0 (driver: opencl)
[2013-07-01 17:15:17] 1. OCL 1 (driver: opencl)
[2013-07-01 17:15:17] 2. ICA 0 (driver: icarus)
[2013-07-01 17:15:17] 3. ICA 1 (driver: icarus)
[2013-07-01 17:15:17] 4 devices listed

Mining

Finally, once you have ensured the miner is recognizing your ASIC, you can start mining with it. You can start cgminer without any special parameters:

cgminer -o hostname -u username -p password

Or start bfgminer with the -S all parameter:

bfgminer -o hostname -u username -p password -S all

cgminer USB Erupter

If you run into any issues you can leave comments below. However, if your issues are specific to cgminer or bfgminer you can find specific forum threads for them here and here.

UPDATE: Several readers have asked how to mine using only their ASIC devices and not their GPUs. Both cgminer and bfgminer support the –disable-gpu (two dashes prefix) argument:

cgminer -o hostname -u username -p password --disable-gpu
bfgminer -o hostname -u username -p password -S all --disable-gpu

Advertisements

59 thoughts on “Bitcoin Mining on Mac OS X – ASICs

  1. Al

    Thank you for the great tutorial. I have it working with an ASICMiner Block Erupter USB 300MH/s Sapphire. How do you stop cgminer? Control C? Thanks.

    Reply
  2. Bill Wilson

    Hi —

    I’m very unfamiliar with much of what goes on in the command line world, but I think I’ve followed each of the steps above (and in the earlier article on installing the miners). When I try to detect the USB devices as suggested, I get:

    [2013-07-11 20:40:43] Started bfgminer 3.1.3
    [2013-07-11 20:40:44] Unrecognized baud rate: 115200
    [2013-07-11 20:40:44] Unrecognized baud rate: 115200
    [2013-07-11 20:40:44] Unrecognized baud rate: 115200
    [2013-07-11 20:40:55] Devices detected:
    [2013-07-11 20:40:55] 0. OCL 0 (driver: opencl)
    [2013-07-11 20:40:55] 1. OCL 1 (driver: opencl)
    2 devices listed

    I’m running OS X 10.8.4 on a 2009 15″ MacBook Pro.

    Can you offer any suggestions or fixes, please? Many thanks in advance!

    Reply
    1. Ugh

      I’m using CGminer 3.3.4 on OSX 10.8.4, on a Macbook Pro with Core i5 processor, with a Block Erupter, and for every one share submitted, I get about 6 messages saying “AMU0: TIMEOUT GetResults took 3000ms but was 100ms”.

      Reply
  3. gblaz

    I have the exact same error. I have gotten things to work fine under windows. But I get the unrecognized baud rate error when I run bfgminer with the “bfgminer -S all -d?” options and when I run it with the command options that worked under version 3.1.1 which were “-S all –icarus-options 115200:1:1 –icarus-timing 3.0=100”.

    I’m puzzled and trying different things…. If anyone has a solution – please post it.

    Reply
  4. Josh

    cgminer works fine for me. bfgminer doesn’t detect the Block Erupter.
    Any idea what could be the reason?

    Reply
    1. nwoolls Post author

      Did you install the driver package and reboot? Did you supply the –HEAD parameter when compiling bfgminer so it uses the latest source & fixes?

      Reply
      1. Josh

        I installed with the –HEAD parameter. I can’t remember installin drivers though. Checking that now, maybe thats the step i missed.

      2. Josh

        Many thanks! That was actually it.
        Are there any recommended settings? I have to start it with “-S all” to make it use the Block Erupter at all, but it looks like the mHash performance is not great (way below 33x).

        What are people using as CLI settings to start bfgminer? 🙂

      3. wash

        Very nice tutorial, thanks. I got to this point (installing with –HEAD parameter):

        wash@MacBookPro.local:/usr/local/Cellar$ brew install bfgminer –HEAD
        ==> Cloning https://github.com/luke-jr/bfgminer.git
        Updating /Library/Caches/Homebrew/bfgminer–git
        ==> Checking out branch bfgminer
        ==> ./autogen.sh
        ==> ./configure –prefix=/usr/local/Cellar/bfgminer/HEAD PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/jansson/lib/pkgconfig –enable-scrypt
        ==> make install
        make[1]: *** [bfgminer-logging.o] Error 1
        /bin/sh: stdin: No such file or directory
        make[1]: *** [bfgminer-driver-opencl.o] Error 1
        make[1]: *** [bfgminer-ocl.o] Error 1
        make: *** [install-recursive] Error 1

        Any suggestions would be appreciated.

      4. nwoolls Post author

        Don’t use the –HEAD parameter. At least not right now. The latest source for both bfgminer and cgminer is broken on OS X. Both authors know about it and are working on fixing it. Until then omit that parameter. ASIC mining should work fine on the current public release of either.

      5. wash

        Thanks for answer.
        So to sum things up, I have bfgminer 3.1.4 installed (no –HEAD parameters), all steps according tutorial. Bfgminer doesn’t see asic usb miner.
        Cgminer sees, but during mining generates a lot of timeouts.

        Mac OS X Lion 10.7.5

      6. nwoolls Post author

        bfgminer 3.1.4 should be fine, though I only have 10.8 for testing. Did you install the USB UART drivers for OS X? And reboot?

      7. nwoolls Post author

        There’s already a section with bold text about the drivers.

        “Also, if you are using bfgminer you must install the CP210x USB to UART Bridge VCP driver found here. This driver will break USB support in cgminer. Click here for instructions on removing the driver. If you get a page saying your session timed out, visit the main knowledge base site first, and then navigate to the removal instructions.”

  5. Noyb

    Thanks so much! Mining on a mac is an absolute pain, now I’m hashing away happily with BFG with my Jalapeno 🙂

    1<3

    Reply
      1. BF

        Im so confused now. In your update it says you can disable GPU mining. Does that mean it will bypass the GPU and just use the Erupter? That will work even if my graphic card is not ATI/AMD? And now I can’t get bfgminer to work and the link for uninstalling the driver is down so I dont know how to go back to cgminer. 😦 please help!

      2. nwoolls Post author

        Yes, if you run the with proper parameters the mining software will not use your GPU and will instead only use the Erupter, regardless of the type of graphics card you have.

        I’ve updated the article with regards to removing the driver. Hopefully that helps you.

  6. Pink

    Hi, is there a possible to mine LTC or other scrypt coins with bfgminer. bfgminer works fine with BTC. If i run cgminer i will get everytime “Icarus detect (20:8) failed to initialise (incorrect device?)” so i couldn’t test cgminer with scrypt. thanks for nice post and thanks for helping me

    Reply
    1. nwoolls Post author

      There’s not a limit that I am aware of. The limit, if there is one, would be the total number of USB devices the OS can handle. As long as you buy high quality, powered USB hubs and a little USB fan to keep them cool you can stack those USB sticks pretty high on one machine.

      Reply
  7. martin

    I just followed your instructions and got as far as trying to install cgminer, but it I get this result:

    ==> Summary
    🍺 /usr/local/Cellar/curl/7.31.0: 75 files, 2.0M, built in 116 seconds
    ==> Installing cgminer dependency: jansson
    ==> Downloading http://www.digip.org/jansson/releases/jansson-2.4.tar.bz2
    ######################################################################## 100.0%
    ==> ./configure –prefix=/usr/local/Cellar/jansson/2.4
    ==> make install
    🍺 /usr/local/Cellar/jansson/2.4: 8 files, 160K, built in 15 seconds
    ==> Installing cgminer dependency: libusb
    ==> Downloading http://downloads.sourceforge.net/project/libusb/libusb-1.0/libus
    ######################################################################## 100.0%
    ==> ./configure –prefix=/usr/local/Cellar/libusb/1.0.9
    ==> make install
    🍺 /usr/local/Cellar/libusb/1.0.9: 11 files, 416K, built in 24 seconds
    ==> Installing cgminer
    ==> Downloading https://github.com/ckolivas/cgminer/archive/v3.3.1.tar.gz
    ######################################################################## 100.0%
    curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 54
    Error: Download failed: https://github.com/ckolivas/cgminer/archive/v3.3.1.tar.gz

    Any ideas on how I can get it to install? I’m completely new to using Terminal, but I’m willing to learn, but I just don’t know where to start!

    Any help would be grately appreciated.
    Thanks in advance.
    Martin.

    Reply
  8. John Thompson

    Thanks for the write up. I have tried all I can think of but I’m still getting an error (failed to initialise)

    [2013-08-08 14:20:56] USB all: found 20 devices – listing known devices
    .USB dev 0: Bus 253 Device 6 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 1: Bus 253 Device 7 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    [2013-08-08 14:20:56] 2 known USB devices

    …….
    [2013-08-08 14:18:49] Started cgminer 3.3.1
    [2013-08-08 14:18:50] Icarus detect (253:6) failed to initialise (incorrect dev
    ice?)
    [2013-08-08 14:18:50] Icarus detect (253:7) failed to initialise (incorrect dev
    ice?)

    I can not seem to get the asic to initialise. Mac running 10.8 xcode installed, brew doctor has no issues.
    Thanks

    Reply
  9. martin

    So I’ve got as far as installing cgminer, and it detecting my device:
    [2013-08-09 19:05:17] CL Platform 0 vendor: Apple
    [2013-08-09 19:05:17] CL Platform 0 name: Apple
    [2013-08-09 19:05:17] CL Platform 0 version: OpenCL 1.1 (Aug 10 2012 19:59:48)
    [2013-08-09 19:05:17] Error -1: Getting Device IDs (num)
    [2013-08-09 19:05:17] clDevicesNum returned error, no GPUs usable
    [2013-08-09 19:05:17] 0 GPU devices max detected
    [2013-08-09 19:05:19] USB all: found 7 devices – listing known devices
    .USB dev 0: Bus 250 Device 7 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    [2013-08-09 19:05:19] 1 known USB devices

    …but I think I’m being a complete idiot and I don’t know what to type in for the next bit to start mining. I know you said to enter:
    cgminer -o hostname -u username -p password –disable-gpu

    But I assume I put my own hostname, username and password it? If so, what hostname, username and password?

    I’ve used BitMinter on a PC to mine using the ASIC, but I’d like to get it set up on this mac too. Are the hostnames, username and password for a pool that I’m part of?

    Thanks in advance! 🙂

    Reply
    1. nwoolls Post author

      Yes you need to enter the host, worker username and worker password for your mining pool. For BitMinter it would be something like -o mint.bitminter.com:3333 -u username_workername -p workerpassword

      Reply
  10. collinssolutions

    i followed the guide and i had the driver installed so i removed it and did the probe from cgminer and got this, I think its not detecting my USB miner. ANy thoughts?

    [2013-08-09 08:40:43] CL Platform 0 vendor: Apple
    [2013-08-09 08:40:43] CL Platform 0 name: Apple
    [2013-08-09 08:40:43] CL Platform 0 version: OpenCL 1.2 (Apr 25 2013 18:32:06)
    [2013-08-09 08:40:43] Platform 0 devices: 1
    [2013-08-09 08:40:43] 0 ATI Radeon HD 6750M
    [2013-08-09 08:40:43] 1 GPU devices max detected

    Reply
  11. joereform

    Newbie question: I have a Block Erupter hashing smoothly on my Mac w/ cgminer. What are the advantages/disadvantages of disabling the GPU vs. having it run alongside the ASIC?

    Reply
    1. nwoolls Post author

      It is most likely not profitable to use your GPU to mine Bitcoins. The difficulty has been skyrocketing (it just went up ~40%). The only Mac I’d consider GPU mining with (beyond just playing) is a Mac Pro, due to it’s larger, open case and ability to use full fledged GPUs.

      Reply
  12. jdeokule

    I’ve followed the instructions for cgminer and it detected my Block Erupter.

    However, I’m getting the following errors consistently:
    [2013-08-17 00:17:07] AMU0: TIMEOUT GetResults took 783ms but was 100ms
    [2013-08-17 00:17:07] Rejected ad5245ac Diff 1/1 AMU 0 ((-2, u’Share is above target
    [2013-08-17 00:17:09] AMU0: TIMEOUT GetResults took 2205ms but was 100ms
    [2013-08-17 00:17:11] AMU0: TIMEOUT GetResults took 1525ms but was 100ms
    [2013-08-17 00:17:11] Rejected 43a1de7a Diff 3/1 AMU 0 ((-2, u’Share is above target
    [2013-08-17 00:17:13] AMU0: TIMEOUT GetResults took 2469ms but was 100ms
    [2013-08-17 00:17:16] AMU0: TIMEOUT GetResults took 3000ms but was 100ms
    [2013-08-17 00:17:19] AMU0: TIMEOUT GetResults took 3000ms but was 100ms

    I’m running this on a 15″ Macbook Pro using cgminer 3.3.4. I’ve successfully mined with the GPU on this machine.

    Appreciate this post and your help!

    Reply
  13. Martin

    Hi,

    Thanks for your help, it’s mining away nicely now 🙂

    I just had a question, when I run it in cgminer on my MBP it runs at approx 318mhps, however on my PC at work using bitminter it runs at approx 335mhps. Can you think of a reason why this would happen, or how I can increase the hash rate on the mac to equal it on the PC?

    Many thanks!
    Martin.

    Reply
  14. Phill

    bfgminer seems more stable on Mac, for me at least cgminer caused usb to hang and generate lots of errors relating to AppleUSBEHCI in Console.

    Reply
  15. BTCLTC

    dude you’re the best, totally helped us get mining with this. Any tips on mining litecoin? I’d like to get some gpu cards to run off a mac mini to mine litecoin. Any tips on hooking this up? Can I run that at the same time as the erupter? Thanks man, you rock!

    Reply
  16. BitGirl

    Thank you so much for this guide! I am a total newbie, using an Eruptor Blade to figure out ASIC mining while waiting for a larger pre-ordered rig. I seem to have the same problem as jdeokule: constant timeout errors. Are those normal? If not, how do I fix them? I am using cgminer and therefore did not install the driver. I think my system sees the miner and even hashes since I see a few lines that might mean it accepted work and my hashrate climbs up above 300Mh occasionally. But I feel like I barely know what I am talking about here…

    2013-09-05 18:37:49] AMU0: TIMEOUT GetResults took 2001ms but was 100ms
    [2013-09-05 18:37:51] AMU0: TIMEOUT GetResults took 1790ms but was 100ms
    [2013-09-05 18:37:51] Accepted 2f9ee6ab Diff 5/1 AMU 0 pool 0

    I am using an iMac, OSX10.8.4, CGMiner 3.3.4.

    Thank you!

    Reply
  17. cbon

    I also have the same AMU0: TIMEOUT problem on cgminer no matter what I do and getting very frustrated! I don’t even get any hashes at all, in contrast to the above poster. Using cgminer –ndevs shows my SiliconLabs USB Erupters accurately. I am on an old dual-G5 PowerMac with 10.5.8. Did NOT install the driver. Haven’t been able to get bfgminer to install properly so I’m stuck with cgminer, which I know should work on PPC macs. Tried various combinations of USB ports, powered USB hubs, etc. Any thoughts? (besides “get a new computer”… not an option at the moment!)

    Thoughts? Would really appreciate it!

    Reply
  18. thsart (@thsart)

    Is there anything you can do if it doesn’t find all the USB Erupters? I have 24 connected and it’s only seeing 16. I’m using a Macbook Pro Retina with 4 Anker 9+1 USB 3.0 Hubs. From what I’ve read on all the forums the Anker is recommended. 😦

    Reply
  19. Cesar

    Hello,

    So I am relatively new to mining and I’ve been adding to my collection of USB Erupters, just received a batch of 15 in the mail. I was able to install cgminer –HEAD with no real big issues but when I start mining I randomly get these errors:

    USB timeout waiting for ‘/tmp/cgminer-usb-“number usually 26-23” ‘

    And they happen randomly on the start. I’ve powered down my usb hub, restart my computer, and clear out the /tmp dir and each I get about 4+ blocks that get timeout errors. It’s not the USB Erupters because all the green lights are on and I can see them through OSX and cgminer:

    $ cgminer –ndevs
    [2013-09-21 10:23:08] CL Platform 0 vendor: Apple
    [2013-09-21 10:23:08] CL Platform 0 name: Apple
    [2013-09-21 10:23:08] CL Platform 0 version: OpenCL 1.2 (Apr 25 2013 18:32:06)
    [2013-09-21 10:23:08] Platform 0 devices: 1
    [2013-09-21 10:23:08] 0 GeForce GTX 660 Ti
    [2013-09-21 10:23:08] 1 GPU devices max detected
    [2013-09-21 10:23:08] USB all: found 28 devices – listing known devices
    .USB dev 0: Bus 26 Device 23 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 1: Bus 26 Device 22 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 2: Bus 26 Device 21 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 3: Bus 26 Device 20 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 4: Bus 26 Device 19 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 5: Bus 26 Device 18 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 6: Bus 26 Device 15 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 7: Bus 26 Device 12 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 8: Bus 26 Device 11 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 9: Bus 26 Device 17 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 10: Bus 26 Device 16 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 11: Bus 20 Device 2 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 12: Bus 26 Device 8 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 13: Bus 20 Device 1 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    .USB dev 14: Bus 26 Device 3 ID: 10c4:ea60
    Manufacturer: ‘Silicon Labs’
    Product: ‘CP2102 USB to UART Bridge Controller’
    [2013-09-21 10:23:08] 15 known USB devices

    9 USB Erupters are hooked into a USB 3.0 hub. The other 6 are hooked into USB ports on my tower. The timeouts span both USB Erupters hooked into the hub and/or tower.

    Any suggestions? Right now I have 11 running with 4 being timeouted. Thats the best start I’ve had so far.

    Thanks

    Reply
  20. Jeff McClure

    Is there anyway to “unbreak” the incompatibility between cgminer and CP210x USB to UART Bridge VCP driver?

    I got bfgminer working, but I’d really like to use cgminer (it’s easier to maintain since I’m already an avid macports user)

    Reply
  21. Peter

    Thank you very much! I’ve been following all your guides for mining BTC and LTC on the mac and you’ve made it very easy for me 🙂

    Installed the driver, rebooted, plugged my block erupter in and was hashing away with ease! Cheers!

    Reply
  22. jezmond55

    This is a great blog entry, but it doesn’t work at all for cgminer and Zeus miners. It never detects anything over USB even with the Silicon Labs driver installed

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s