Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-08-26 Thread Hans Petter Selasky

On 08/26/16 15:38, O. Hartmann wrote:

It is a USB interface PCB with an AT90USB162 microcontroler chip.
Attached to a FreeBSD 12-CURRENT system, it reports itself as a UHID device.
there is also a software package available - for Windows and Linux, but it
doesn't work for FreeBSD, the package compiles and produces a cmdline binary,
but it fails reading the sensor data - the uhid driver seems to be unloaded
during the call. I have no skills in writing low-level USB software, so my
explanation is slopy, sorry. But there is hope I can use this one.


Hi,

Could you send a link to this Linux software?

It should work basically!

Is your libusb up-to-date?

You can trace USB activity using "usbdump -i usbusX -f Y -s 65536 -vvv".

Maybe some command failed.

Did you try "usbhidaction" to decode the data received?

--HPS


___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-08-09 Thread Gary Palmer
On Tue, Aug 09, 2016 at 08:28:47AM -0500, Karl Denninger wrote:
> 
> On 8/9/2016 01:36, O. Hartmann wrote:
> > On Sun, 24 Jul 2016 13:12:35 -0600
> > Ian Lepore  wrote:
> >
> >> On Sun, 2016-07-24 at 12:52 -0600, Warner Losh wrote:
> >>> On Sun, Jul 24, 2016 at 12:42 PM, Kevin Oberman 
> >>> wrote:  
>  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.  
> >>> I tried to automate discovery of these things. However, the only way
> >>> you can really know for sure about the TI chip is to read it's
> >>> datasheet
> >>> and compare that with extant drivers. It's actually easier than it
> >>> sounds.
> >>>
> >>> I've often thought of unification of the TTY USB drivers, since they
> >>> are
> >>> most (but not all) based on the standard plus extra bits.
> >>>
> >>> Warner  
> >> To reiterate:  we do not have a driver for TI 5052 chips.
> >>
> >> It's not much like other usb-serial chips.  In fact it's not strictly a
> >> usb-serial chip, it's a multifunction chip that includes a software
> >> -controllable usb hub, 2 serial ports, gpio, an i2c bus master, an MCU
> >> interface, a multichannel DMA controller, and apparently even has the
> >> ability to download your own 8052-compatible microcontroller code into
> >> the 5052 and have it take over from the built-in rom code.
> >>
> >> It would be reasonable enough to write a driver that initially
> >> supported only the uart part of the chip.
> >>
> >> -- Ian
> > Now, that I know that I can not use any of our plenty Digi Watchport/T 
> > sensors
> > with FreeBSD, I'm looking for a cheap alternative of sensor, prefereably 
> > being
> > capable of taking temperature and humidity and being accessed as easy as a
> > serial terminal - as the Digi Watchport/T does with Linux.
> >
> > I still have a "resistance" changing the OS of our infrastructure to Linux 
> > due
> > to ZFS, but the very good support of drivers with the Linux OS is tempting 
> > ...
> > ___
> > freebsd-usb@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-usb
> > To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
> 
> Does hardware platform matter?  If not a very inexpensive alternative
> set is found on Adafruit's site for the Raspberry Pi and FreeBSD can
> easily talk to either some of the options directly or a cheap ($10)
> 4-channel 12-bit analog board.  I am using this approach with the Pi2 as
> a pool controller with multiple temperature inputs and drive (through a
> relay board) to handle both the VFD-controlled pump motor and valves,
> plus spa heater.

If you go down that path the DS 18B20 is a digital temperature probe
that can be tied to the GPIO pins on a PI and read from python
quite easily.  Don't think it does humidity, but as the temp. probes
have a hardware address you can hook multiple up to the same GPIO pin.

If you want humidity also then there is the DHT22 or DHT11, both
of which can be tied to the PI but need a GPIO pin per sensor.  I 
haven't tried either of them personally.

Regards,

Gary
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-08-09 Thread O. Hartmann
On Sun, 24 Jul 2016 13:12:35 -0600
Ian Lepore  wrote:

> On Sun, 2016-07-24 at 12:52 -0600, Warner Losh wrote:
> > On Sun, Jul 24, 2016 at 12:42 PM, Kevin Oberman 
> > wrote:  
> > > 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.  
> > 
> > I tried to automate discovery of these things. However, the only way
> > you can really know for sure about the TI chip is to read it's
> > datasheet
> > and compare that with extant drivers. It's actually easier than it
> > sounds.
> > 
> > I've often thought of unification of the TTY USB drivers, since they
> > are
> > most (but not all) based on the standard plus extra bits.
> > 
> > Warner  
> 
> To reiterate:  we do not have a driver for TI 5052 chips.
> 
> It's not much like other usb-serial chips.  In fact it's not strictly a
> usb-serial chip, it's a multifunction chip that includes a software
> -controllable usb hub, 2 serial ports, gpio, an i2c bus master, an MCU
> interface, a multichannel DMA controller, and apparently even has the
> ability to download your own 8052-compatible microcontroller code into
> the 5052 and have it take over from the built-in rom code.
> 
> It would be reasonable enough to write a driver that initially
> supported only the uart part of the chip.
> 
> -- Ian

Now, that I know that I can not use any of our plenty Digi Watchport/T sensors
with FreeBSD, I'm looking for a cheap alternative of sensor, prefereably being
capable of taking temperature and humidity and being accessed as easy as a
serial terminal - as the Digi Watchport/T does with Linux.

I still have a "resistance" changing the OS of our infrastructure to Linux due
to ZFS, but the very good support of drivers with the Linux OS is tempting ...
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-24 Thread Ian Lepore
On Sun, 2016-07-24 at 12:52 -0600, Warner Losh wrote:
> On Sun, Jul 24, 2016 at 12:42 PM, Kevin Oberman 
> wrote:
> > 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.
> 
> I tried to automate discovery of these things. However, the only way
> you can really know for sure about the TI chip is to read it's
> datasheet
> and compare that with extant drivers. It's actually easier than it
> sounds.
> 
> I've often thought of unification of the TTY USB drivers, since they
> are
> most (but not all) based on the standard plus extra bits.
> 
> Warner

To reiterate:  we do not have a driver for TI 5052 chips.

It's not much like other usb-serial chips.  In fact it's not strictly a
usb-serial chip, it's a multifunction chip that includes a software
-controllable usb hub, 2 serial ports, gpio, an i2c bus master, an MCU
interface, a multichannel DMA controller, and apparently even has the
ability to download your own 8052-compatible microcontroller code into
the 5052 and have it take over from the built-in rom code.

It would be reasonable enough to write a driver that initially
supported only the uart part of the chip.

-- Ian

___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-24 Thread Warner Losh
On Sun, Jul 24, 2016 at 12:42 PM, Kevin Oberman  wrote:
> 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.

I tried to automate discovery of these things. However, the only way
you can really know for sure about the TI chip is to read it's datasheet
and compare that with extant drivers. It's actually easier than it sounds.

I've often thought of unification of the TTY USB drivers, since they are
most (but not all) based on the standard plus extra bits.

Warner
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-24 Thread Kevin Oberman
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/9406_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 

Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-24 Thread Ian Lepore
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/9406_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 

Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-24 Thread Karl Denninger
On 7/24/2016 03:51, 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/9406_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 them up and those little SOBs are expensive!  I was considering
grabbing one just to play with, but not at that price :)

You should be able to "cu" to the port and send the ASCII command it
wants to provide a reading; that would verify it is working.

-- 
Karl Denninger
k...@denninger.net 
/The Market Ticker/
/[S/MIME encrypted email preferred]/


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-24 Thread O. Hartmann
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/9406_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.


pgpBQfZfrbzU4.pgp
Description: OpenPGP digital signature


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-24 Thread Gary Jennejohn
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/9406_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.

Still, having the man page under FreeBSD would at least provide a hint
that the driver even exists.

I added device ugensa to my config file and the kernel was generated
without an error.

> 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.
> 

-- 
Gary Jennejohn
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-24 Thread O. Hartmann
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/9406_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?

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.

Kind regards,

Oliver Hartmann


pgpzktTr69bUA.pgp
Description: OpenPGP digital signature


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-23 Thread Ian Lepore
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/9406_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

___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-23 Thread O. Hartmann
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/9406_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


pgpk0bOBTkXdU.pgp
Description: OpenPGP digital signature


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-22 Thread O'Connor, Daniel

> On 23 Jul 2016, at 02:05, O. Hartmann  wrote:
> 
> I tried to load any available USB serial port/adaptor driver available to 
> make this
> sensor attach as a ttyU? as it does in Linux (/dev/ttyUSB), but no luck so 
> far. I'm not
> familiar with serial consoles or the derial capabilities of FreeBSD, so i 
> might have
> overseen something essential. I'd like to access the sensor to retrieve 
> temperature data,
> even if it is in a crude way. Poking around with USB, I found that the sensor 
> device does
> release some informations, so hopefully there is a way to make it look like a 
> tty, see my
> attempts to get some informations out of the device below.

Do you know what driver picks it up in Linux?
It's pretty likely you just need to add an entry in one of the existing drivers 
to tell it about this device.

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C

___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-22 Thread Hans Petter Selasky

On 07/22/16 19:16, Karl Denninger wrote:

What do you think about my screwing with the driver to provide a
modest-sized dynamic stack that would use the sysctl interface to
add/delete vendor/product pairs for this purpose?  With a modest but
reasonable limit this then becomes something that can be used in a
production environment since you probably would have a modest number of
these devices on USB for any particular individual system and now you
don't have to futz with the kernel to add/remove them.

I implemented an application read/write piece to a ugen-attached device
but it would have been nice to be able to poke this instead via such a
"hook"; if I write it and submit it as a PR what do people think about
its odds of being committed?


Hi,

It has been suggested to extend the quirks subsystem, to be able to add 
custom attach / detach rules to central USB device drivers.


--HPS
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Digi Watchport/T temperature sensor as /dev/ttyU

2016-07-22 Thread Ian Lepore
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/9406_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
Index: sys/dev/usb/serial/ugensa.c
===
--- sys/dev/usb/serial/ugensa.c	(revision 302505)
+++ sys/dev/usb/serial/ugensa.c	(working copy)
@@ -158,6 +158,7 @@ static const STRUCT_USB_HOST_ID ugensa_devs[] = {
 	{USB_VPI(USB_VENDOR_KYOCERA2, USB_PRODUCT_KYOCERA2_CDMA_MSM_K, 0)},
 	{USB_VPI(USB_VENDOR_HP, USB_PRODUCT_HP_49GPLUS, 0)},
 	{USB_VPI(USB_VENDOR_NOVATEL2, USB_PRODUCT_NOVATEL2_FLEXPACKGPS, 0)},
+	{USB_VPI(USB_VENDOR_INSIDEOUT, USB_PRODUCT_INSIDEOUT_WATCHPORTT, 0)},
 };
 
 DRIVER_MODULE(ugensa, uhub, ugensa_driver, ugensa_devclass, NULL, 0);
Index: sys/dev/usb/usbdevs
===
--- sys/dev/usb/usbdevs	(revision 302505)
+++ sys/dev/usb/usbdevs	(working copy)
@@ -2456,6 +2456,7 @@ product INITIO INIC_1610P	0x1e40	USB to SATA Bridg
 
 /* Inside Out Networks products */
 product INSIDEOUT EDGEPORT4	0x0001	EdgePort/4 serial ports
+product INSIDEOUT WATCHPORTT	0x0304	WatchPort/T 
 
 /* In-System products */
 product INSYSTEM F5U002		0x0002	Parallel printer
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"