From owner-freebsd-usb@freebsd.org Sun Oct 1 19:00:10 2017 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 01CF2E2C132 for ; Sun, 1 Oct 2017 19:00:10 +0000 (UTC) (envelope-from tomek.cedro@gmail.com) Received: from mail-ua0-x244.google.com (mail-ua0-x244.google.com [IPv6:2607:f8b0:400c:c08::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A90206AE97; Sun, 1 Oct 2017 19:00:09 +0000 (UTC) (envelope-from tomek.cedro@gmail.com) Received: by mail-ua0-x244.google.com with SMTP id 97so1220582uai.2; Sun, 01 Oct 2017 12:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cnxh8vGp5V+doRioxamPcNJZEyH2Zt1yQbnZVsAkb70=; b=esxxN3gw5y+ENBJmiCeHX9pkAculSov5fMWcPvzN4zuLt8Mm18hxa14fGOkCeUqnTH hDwAYb3Bv2wtb+4Abg4yx9lhwC9dcPdf9N4tqNNlsdsWqcQ+zULa6Qj7fOm0sZPEz+oP ch0J1LzqA4JLTlP/D4Gv/GmYpFXvG7Zd5BFS033EyUXAmTWRHXdPaohDdjgpbwMQDyYS gPZQqEmLrsA5L8FJZtaweH2xm8YrTBrQPhvAhS0MeDBrDg3aR0AgK84nueFDeme/CmUB 4dqwf8y7XmU0oVASzrXE3C39zlYpCY/132s3Mr1R4usp0OmCIMuyVGjg4A7/Jj8gIPww MW8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cnxh8vGp5V+doRioxamPcNJZEyH2Zt1yQbnZVsAkb70=; b=aNIzEIAcSkrgh0F1gCiuin5tm2+1jcYyHkPtfhkoMiO/9/QdDJcC8iY6bFhd8DTaoW NrhMsrBoEvXioSluKwiAxMdaYDzlmGmgGPpZYFg5H6Bxr5yHDHIgqmuu1H67isy8zvZe /dw+D5vAjC2x4Mu9dnMQGWcnNiTPA2oY2j7sZOjoHXtfajHEYnkRQSCg3auKNttzUl8h 1MPOJ/QqJclx8EB8CfSmio+Q1m3GLXgPoJko65Mdg6Lke7DJhCMtgGp/+SZLdKLa3VtW Cj7De/q47EH84cZZvGEGiQ8ToTl9ZyqNcwp7g4dGvjBp62vPOLsehQNWbu1e81BxFO+Y bAUA== X-Gm-Message-State: AHPjjUhZjZvMTFzcYNBRUw6uzKQgPvB5GLtUQKifREFOjn+lFDK9kWxg YbbtFzQjZ6BXfVqhk0tlD+beSF0+eezltZ1NVJi/5A7c X-Google-Smtp-Source: AOwi7QB5AGYfneKCTihTBhh1nM+wqCL8Xn17R1PCDniDuFGaPYYjIIIaYvX8P49lHRsOzwn7V6x5NoksbhPBCUbXELg= X-Received: by 10.176.6.195 with SMTP id g61mr8881437uag.161.1506884408548; Sun, 01 Oct 2017 12:00:08 -0700 (PDT) MIME-Version: 1.0 Sender: tomek.cedro@gmail.com Received: by 10.159.53.237 with HTTP; Sun, 1 Oct 2017 11:59:48 -0700 (PDT) In-Reply-To: <1506882193.22078.32.camel@freebsd.org> References: <1506465459.73082.168.camel@freebsd.org> <165556bc-c011-bebd-feee-5bbd4cb5943e@selasky.org> <1506876055.22078.24.camel@freebsd.org> <87d62aba-0b35-8b20-cf1f-9fd2de2d301a@selasky.org> <1506882193.22078.32.camel@freebsd.org> From: Tomasz CEDRO Date: Sun, 1 Oct 2017 20:59:48 +0200 X-Google-Sender-Auth: Irdjj-ZDaSvU6FlWZGF0C2Vj2pc Message-ID: Subject: Re: USB/U3G: Added support for Panasonic CF-F9 GOBI 3G modem to U3G module To: Ian Lepore Cc: Hans Petter Selasky , "freebsd-usb@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Oct 2017 19:00:10 -0000 On Sun, Oct 1, 2017 at 8:23 PM, Ian Lepore wrote: > On Sun, 2017-10-01 at 20:17 +0200, Tomasz CEDRO wrote: >> On Sun, Oct 1, 2017 at 7:21 PM, Hans Petter Selasky >> wrote: >> > >> > On 10/01/17 19:09, Tomasz CEDRO wrote: >> > > >> > > >> > > On Sun, Oct 1, 2017 at 6:40 PM, Ian Lepore >> > > wrote: >> > > > >> > > > >> > > > On Sun, 2017-10-01 at 18:33 +0200, Tomasz CEDRO wrote: >> > > > > >> > > > > >> > > > > On Wed, Sep 27, 2017 at 8:32 AM, Hans Petter Selasky > > > > > asky.org >> > > > > > >> > > > > > >> > > > > > wrote: >> > > > > > >> > > > > > On 09/27/17 00:37, Ian Lepore wrote: >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > On Wed, 2017-09-27 at 00:30 +0200, Hans Petter Selasky >> > > > > > > wrote: >> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > On 09/27/17 00:11, Tomasz CEDRO wrote: >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > https://github.com/freebsd/freebsd/pull/115 >> > > > > > > > > >> > > > > > > > > :-) >> > > > > > > > > >> > > > > > > > The devd.conf rule should match more than just vendor >> > > > > > > > and >> > > > > > > > product: >> > > > > > > > >> > > > > > > > >> > > > > > > > +# Load GOBI 2000/3000 U3G QDL modem firmware on attach >> > > > > > > > / boot. >> > > > > > > > +# Note: This requires additional "gobi_loader" utility >> > > > > > > > to be >> > > > > > > > installed, >> > > > > > > > +# as well as valid QDL driver firmware files placed >> > > > > > > > in >> > > > > > > > /boot/firmware/gobi. >> > > > > > > > +# If modem does not accept valid firmware try >> > > > > > > > gobi_loader >> > > > > > > > -2000 >> > > > > > > > switch. >> > > > > > > > +# Please adjust modem VID/PID to match your device >> > > > > > > > supported >> > > > > > > > by >> > > > > > > > u3g >> > > > > > > > module. >> > > > > > > > +#attach 100 { >> > > > > > > > +# match "vendor" "0x04da"; >> > > > > > > > +# match "product" "0x250e"; >> > > > > > > > +# action "/usr/local/sbin/gobi_loader /dev/cuaU0 >> > > > > > > > /boot/firmware/gobi/"; >> > > > > > > > +#}; >> > > > > > > > >> > > > > > > > Else patch looks good. >> > > > > > > > >> > > > > > > > --HPS >> > > > > > > >> > > > > > > Hard-coding /dev/cuaU0 cannot possibly be right. >> > > > > > > >> > > > > > > -- Ian >> > > > > > > >> > > > > > These three lines are missing: >> > > > > > >> > > > > > match "system" "DEVFS"; >> > > > > > match "subsystem" "CDEV"; >> > > > > > match "type" "CREATE"; >> > > > > > >> > > > > > >> > > > > > --HPS >> > > > > Thanks! Updated! :-) >> > > > > >> > > > > https://github.com/freebsd/freebsd/pull/115 >> > > > > >> > > > If this is to be an example, it should be correct. Please >> > > > replace the >> > > > "cuaU0" with "$cdev". (See /etc/devd/uath.conf for an >> > > > example). >> > > > >> > > > -- Ian >> > > >> > > Thanks Ian! Is it okay now? I have moved this example to >> > > dedicated >> > > /etc/devd/u3g.conf file, and added u3g load to >> > > /etc/devd/usb.conf.. if >> > > syntax is okay I will verify on my laptop.. >> > > >> > > https://github.com/freebsd/freebsd/pull/115 >> > > >> > Looks good to me. Don't forget to MFC! >> > >> > --HPS >> /etc/devd/u3g.conf: >> >> notify 100 { >> match "system" "USB"; >> match "subsystem" "DEVICE"; >> match "type" "ATTACH"; >> match "vendor" "0x04da"; >> match "product" "0x250e"; >> action "/usr/local/bin/gobi_loader /dev/$cdev /boot/firmware/gobi/"; >> }; >> >> This does not work when /dev/$cdev is used.. but it works when >> /dev/cuaU0 is used. Ian, could you please advise? :-) >> > > Hmmm, then I'd have to surmise that everything in /etc/devd/uath.conf > will fail the same way. > > I noticed earlier the events mentioned were > > match "system" "DEVFS"; > match "subsystem" "CDEV"; > match "type" "CREATE"; > > and I would expect $cdev to have the right value on a CDEV/CREATE > event, but not necessarily on a DEVICE/ATTACH event. > > -- Ian I have verified on uath device (more on that below) and it turns out $cdev works fine.. but it returns /dev/usb/X.Y.Z not the /dev/cuaU0 which does not work with this "gobi_loader" utility which requires /dev/cuaU0 (CDC / serial port device)... any clues how to replace $cdev with cuaUX? :-) Regarding the UATH, I have TP-LINK TL-WN822N Ver2.0 based on Atheros 9002[1] and it seems to work with modified /dev/devd/uath.conf but the uathload returns "Operation not permitted" when executed as root and during boot.. [1] https://wikidevi.com/wiki/TP-LINK_TL-WN822N_v2 -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info