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"