From owner-freebsd-current@freebsd.org Sun Jul 24 18:42:08 2016 Return-Path: Delivered-To: freebsd-current@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 3CAD7BA18FF; Sun, 24 Jul 2016 18:42:08 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (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 01BB6186E; Sun, 24 Jul 2016 18:42:08 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mail-io0-x22a.google.com with SMTP id q83so145236752iod.1; Sun, 24 Jul 2016 11:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=a325cawI4RKbZ7+6/uA4y713IcPgd0azRAJKGg4Nwug=; b=hfFjUMJMebhQd70iYosnVE2KBOziz+ODO7CkUL7voQiKR5g2aQ8Z3jOcO3zPhTMPbG Xwn+yuPh1/QwwIxeY78ZRyoadNX8P+Bdo17VRkIC/1jgFds8KQ2kJ+KbSMEWFyxoGuST DlZZHqg416c8vjjmiHTXEz3eZy9auFPTsastz/OKdawa6k6al/EYiJS3FxZBabK6yNIE xiPLBUvgobG/hp7PHxwQe3rAqDlVAohoqpFuyOV3xy920vYjFaxctLu8ptX8ozlOqmwl FXVrRr3Xr2a3hCRf+Psvvr5vCNn9Axi/zWYIfnB6aANxkhTIH3ZCKXiPOgsYeaY2utPe UU9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=a325cawI4RKbZ7+6/uA4y713IcPgd0azRAJKGg4Nwug=; b=Fo7CfFP+O8QAKXJArEcFir+3HjE45eWNSYwynWLP7p+kccGETVEyjTnr4dTS4/Juzh OUEWOigdO453+IuCcuf1ZDTq5f8akc8+3B+x19X4ecWDomMevUNldtBlonpyEFUrayhV v4D6cYcCTv8uCzZdJsCZp8HQNJSUERBz3H377AkswE8EYnYUhlX1wQCem83sC1riLbI+ 5/iR269N8zXiYSxxgkdMjXPpaEqAKGVyBqaGfL18rsS9hgRPE9HPt26VFFymskz0na82 WqOgGlFox9ZYa0MrseWymBGe/ZtJu56V2oJOWAhYT2LaKq07qwz3jTPHN/cD5gxZgUVv +90A== X-Gm-Message-State: AEkoous8ddxcNESKVpuD5hXnmwta1l4Gf8k0lkZWO0RmnCzSwfz7qzgOfuxTEnCslKhim85gffbv348Qus26Ag== X-Received: by 10.107.129.152 with SMTP id l24mr16603246ioi.179.1469385727318; Sun, 24 Jul 2016 11:42:07 -0700 (PDT) MIME-Version: 1.0 Sender: kob6558@gmail.com Received: by 10.79.78.213 with HTTP; Sun, 24 Jul 2016 11:42:06 -0700 (PDT) In-Reply-To: <1469379334.84197.40.camel@freebsd.org> References: <20160722183556.2fc39fd7.ohartman@zedat.fu-berlin.de> <1469206374.84197.14.camel@freebsd.org> <20160723220430.34ce02fe.ohartman@zedat.fu-berlin.de> <1469306951.84197.31.camel@freebsd.org> <20160724080330.3a27e875.ohartman@zedat.fu-berlin.de> <20160724083859.4c0dd392@ernst.home> <20160724105134.184f0b7f.ohartman@zedat.fu-berlin.de> <1469379334.84197.40.camel@freebsd.org> From: Kevin Oberman Date: Sun, 24 Jul 2016 11:42:06 -0700 X-Google-Sender-Auth: ErFVBtR9kHSlW0SwlkLJAQwS_x8 Message-ID: Subject: Re: Digi Watchport/T temperature sensor as /dev/ttyU To: Ian Lepore Cc: "O. Hartmann" , Gary Jennejohn , "freebsd-usb@FreeBSD.org" , FreeBSD CURRENT Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 18:42:08 -0000 On Sun, Jul 24, 2016 at 9:55 AM, Ian Lepore wrote: > On Sun, 2016-07-24 at 10:51 +0200, O. Hartmann wrote: > > Am Sun, 24 Jul 2016 08:38:59 +0200 > > Gary Jennejohn schrieb: > > > > > On Sun, 24 Jul 2016 08:03:30 +0200 > > > "O. Hartmann" wrote: > > > > > > > Am Sat, 23 Jul 2016 14:49:11 -0600 > > > > Ian Lepore schrieb: > > > > > > > > > On Sat, 2016-07-23 at 22:04 +0200, O. Hartmann wrote: > > > > > > Am Fri, 22 Jul 2016 10:52:54 -0600 > > > > > > Ian Lepore schrieb: > > > > > > > > > > > > > On Fri, 2016-07-22 at 18:35 +0200, O. Hartmann wrote: > > > > > > > > For temperature monitoring, we have a bunch of Digi > > > > > > > > Watchport/T > > > > > > > > sensors: > > > > > > > > > > > > > > > > http://ftp1.digi.com/support/documentation/90000406_H.pdf > > > > > > > > > > > > > > > > > > > > > > > [...] > > > > > > > > > > > > > > I think the attached patch will make it show up as a > > > > > > > ttyU*/cuaU* > > > > > > > device > > > > > > > for you. (You should probably use the /dev/cuaU* flavor, > > > > > > > to avoid > > > > > > > problems with tty layer and modem control signals). > > > > > > > > > > > > > > I keep wishing we had a mechanism, like a sysctl that could > > > > > > > be set > > > > > > > or > > > > > > > something, that would let you supply a vendor/product pair > > > > > > > and have > > > > > > > the > > > > > > > ugensa driver attach to that device, for quick testing of > > > > > > > this sort > > > > > > > of > > > > > > > thing. > > > > > > > > > > > > > > -- Ian > > > > > > > > > > > > No, it doesn't change anything. I applied the patch to most > > > > > > recent > > > > > > CURRENT and it is > > > > > > still the same. But thanks anyway. > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > oh > > > > > > > > > > Oh, my bad, I forgot to mention: You'll have to manually > > > > > "kldload > > > > > ugensa" before plugging in the device (or load it from your > > > > > loader.conf). > > > > > > > > > > When the change gets committed (assuming it works), the devd > > > > > usb > > > > > scripts will get regenerated, and that's what handles the auto > > > > > -load of > > > > > the driver. > > > > > > > > > > -- Ian > > > > man ugensa doesn't exist! As I wrote earlier, I tried everything > > > > to load what I could > > > > find. It seems, the patch and the hint about ugensa.ko did the > > > > magic ;-) Thank you > > > > very much! Could the patch be made permanent to FreeBSD CURRENT? > > > > > > > > And also important: where is the man page for ugensa? Can the the > > > > module be compiled > > > > staitcally into the kernel or are there pitfalls? > > > > > > > > > > Even the most complete man page found in the internet, the one from > > > Dragonfly, doesn't list your Digi International device as being one > > > of those supported. > > > > Yes. That is a pity. But Linux seems to operate this serial device. I > > have to check next > > time I get hands on a Linux box, what driver is attached to the > > sensor. > > > > > > > > Still, having the man page under FreeBSD would at least provide a > > > hint > > > that the driver even exists. > > > > Agreed. > > > > > > > > I added device ugensa to my config file and the kernel was > > > generated > > > without an error. > > > > Me, too. > > > > > > > > > root@localhost: [src] kldload ugensa > > > > > > > > ugen2.7: at usbus2 > > > > ugensa0: > > > > on usbus2 > > > > ugensa0: Found 1 interfaces. > > > > root@thor: [src] man ugensa > > > > No manual entry for ugensa > > > > root@localhost: [src] ll /dev/cuaU0* > > > > 203 crw-rw---- 1 uucp dialer - 0xcb Jul 24 07:51 /dev/cuaU0 > > > > 204 crw-rw---- 1 uucp dialer - 0xcc Jul 24 07:51 > > > > /dev/cuaU0.init > > > > 205 crw-rw---- 1 uucp dialer - 0xcd Jul 24 07:51 > > > > /dev/cuaU0.lock > > > > > > > > > > > > I'll try now to get informations out of the device, I let you > > > > know whether that is a > > > > success. But anyway, again, thank you for helping making the > > > > device visible and > > > > available. > > > > > > > > > I had no luck with retrieving informations out of the device by the > > Perl5 script provided > > by Nagios.org. A prerequisite for the Perl script is the FreeBSD port > > > > comms/p5-Device-SerialPort > > > > Patching the script is trivial, but I do not know whether the > > backend, > > comms/p5-Device-SerialPort, works a sexpected. So the first, dirty, > > trial ended up in > > nothing - since the information gained from the sensor is an empty > > string/nothing. > > > > I'm not familiar with serial devices, so far, so probably there is > > something trivial > > missing. > > I looked around for some info on these Watchport devices. Their manual > indicates that they use both serial comms to send commands and receive > data, and they use serial-comms modem control signals (RTS/CTS, DTR, > etc). Some googling makes it look like they use a TI 5052 USB serial > chip. On linux, that would be handled by the io_ti USB serial driver. > > All of that adds up to the freebsd ugensa driver (which is "generic > serial IO") probably not working. The ugensa driver has nothing chip > -specific in it, it's for accessing devices which can do bulk > read/write without needing to configure any of the other serial comms > parameters. The ugensa driver works with things like gps receivers > that have simple text-only interfaces. > > I think these watchport devices will likely need real serial comms > configuration -- baud rate at least, to even be able to talk to them. > In other words, freebsd needs a real driver for TI 5052 chips. It > looks like a fairly complete datasheet for the chip is available (but I > don't have time to write a driver myself). > > -- Ian > There are several different USB serial drivers. Off-hand I see ubser, ubsa, uchcom, ucom, ucycom, uftdi, ubgensa, umcs, umct, umoscom, uplcom, usb_serial, uslcom, and uvscom. Whether any of these will support the TI chip, I can't say. Most have man pages, but a few, as has been noted, are lacking one. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683