From owner-freebsd-usb@FreeBSD.ORG Mon Mar 9 11:32:50 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 895EA106566B for ; Mon, 9 Mar 2009 11:32:50 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swipnet.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id 1F9558FC18 for ; Mon, 9 Mar 2009 11:32:49 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=j+k/Ze5hWUCaCztCgEjzDQ==:17 a=9AB9cGMsO0weqp9aC-gA:9 a=BHioeUualayIYkJkaHlQuAZjmi8A:4 a=LY0hPdMaydYA:10 Received: from [81.191.55.181] (account mc467741@c2i.net HELO laptop) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1034502902; Mon, 09 Mar 2009 12:32:48 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Mon, 9 Mar 2009 12:35:17 +0100 User-Agent: KMail/1.9.7 References: <6721d4100903081516v19e46090if41d373b82b476c3@mail.gmail.com> In-Reply-To: <6721d4100903081516v19e46090if41d373b82b476c3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903091235.19268.hselasky@c2i.net> Cc: Subject: Re: 1wire sensor with ugen... X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2009 11:32:50 -0000 On Sunday 08 March 2009, Conall O'Brien wrote: > Hello, > > I've a 1wire USB device with a temperature sensor which I'm trying to set > up. My FreeBSD 7.x (RELENG_7) system detects it on boot and IDs it > correctly: > > ugen1: on uhub0 > > which results in /dev/ugen1 , /dev/ugen1.1 and /dev/ugen1.2 devices all > being created. > > > The sensor should be accessible as a straight serial device (9600 baud, > > etc), but my attempts using pyserial aren't working: > >>> s = serial.Serial('/dev/ugen1', 9600, timeout=1) > >>> s.read(10) > > Traceback (most recent call last): > File "", line 1, in > File "build/bdist.freebsd-7.1-STABLE-amd64/egg/serial/serialposix.py", > line 344, in read > serial.serialutil.SerialException: Port not open > > >>> s.isOpen() > > False > > > I don't have much experience working directly with ugen devices, so any > advice to get this working would be appreciated. > > > Thanks! Hi, Ugen devices do not support setting the baud rate ... You need to add your device to the "ugensa" driver or make it look like a generic "umodem" device. --HPS