From owner-freebsd-usb@freebsd.org Sat Apr 30 14:11:52 2016 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D447AB2211D for ; Sat, 30 Apr 2016 14:11:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F2E8151E for ; Sat, 30 Apr 2016 14:11:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 993BF1FE022; Sat, 30 Apr 2016 16:11:49 +0200 (CEST) Subject: Re: Prevent attach of modem serial emulated device on USB attach? To: Karl Denninger , freebsd-usb@freebsd.org References: <08f991ca-0c97-3d29-8b56-5a4ac9f904f3@denninger.net> From: Hans Petter Selasky Message-ID: <5724BDEB.3060502@selasky.org> Date: Sat, 30 Apr 2016 16:15:07 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <08f991ca-0c97-3d29-8b56-5a4ac9f904f3@denninger.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2016 14:11:52 -0000 On 04/30/16 16:06, Karl Denninger wrote: > So I have managed to get access via ugen to one of the USB devices I > want to talk to. > > I would like to generalize that in a library, but am confounded by a > /second /device that comes up "looking like a modem", although it is > not. This is convenient if you want to open and deal with it like a > modem, but unfortunately that attachment appears to prevent me from > successfully using it with the ugen interface at the same time, as the > attachment looks like it "eats" the inbound byte stream. > > Is there a reasonably-easy way to /prevent /FreeBSD from declaring this > device eligible to be attached as if it was a character-style modem, > leaving it only on ugen? I have figured out how to use devd to change > permissions on attach, but not how to prevent it from attaching a > generic USB device to a specific driver. > Hi, Did you try: libusb_detach_kernel_driver() or libusb20_dev_detach_kernel_driver() --HPS