libusb_claim_interface在mac osx上失败

时间:2015-07-02 18:48:42

标签: macos libusb cdc darwin

我必须使用.main-header与CDC进行通信。它适用于Linux,但我在Mac 10.10.3上进行测试。

libusb 1.0

日志:

r = libusb_claim_interface(dev_handle, connection.usb_interface_index); // returns -3

我稍微谷歌了,我发现有些系统服务打开了USB设备。所以有什么方法可以禁用它或使libusb以某种方式工作?我无法使用2015-07-02 23:43:13.901 xctest[66961:4625911] [TRACE ] [ ]: Claiming interface ... libusb: debug [libusb_claim_interface] interface 1 libusb: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access

1 个答案:

答案 0 :(得分:0)

libusb没有解决方案。 您应该致电#app/controllers/posts_controller.rb class PostsController < ApplicationController def index @posts = Post.all end def new @post = Post.new end def create @post = Post.new post_params respond_to do |format| if @post.save #-> this is your code, I haven't changed it much format.html { redirect_to @post, notice: 'Post was successfully created.' } format.json { render :show, status: :created } else format.html { render :new } format.json { render json: @post.errors, status: :unprocessable_entity } end end end private def post_params params.require(:post).permit(:name, :comment) end end ,但Mac OS X不支持。 看看这里:libusb_claim_interface fails on Mac OS X Mountain Lion