From owner-freebsd-usb@FreeBSD.ORG Mon Dec 28 01:01:09 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 8463D1065672 for ; Mon, 28 Dec 2009 01:01:09 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from bgo1smout1.broadpark.no (bgo1smout1.broadpark.no [217.13.4.94]) by mx1.freebsd.org (Postfix) with ESMTP id 4130E8FC0A for ; Mon, 28 Dec 2009 01:01:08 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII Received: from bgo1sminn1.broadpark.no ([217.13.4.93]) by bgo1smout1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0KVC00KS885LO560@bgo1smout1.broadpark.no> for freebsd-usb@freebsd.org; Mon, 28 Dec 2009 02:00:57 +0100 (CET) Received: from kg-v2.kg4.no ([80.203.92.186]) by bgo1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with SMTP id <0KVC004UL85LU4N0@bgo1sminn1.broadpark.no> for freebsd-usb@freebsd.org; Mon, 28 Dec 2009 02:00:57 +0100 (CET) Date: Mon, 28 Dec 2009 02:00:56 +0100 From: Torfinn Ingolfsen To: freebsd-usb@freebsd.org Message-id: <20091228020056.9d2df2d3.torfinn.ingolfsen@broadpark.no> In-reply-to: <200911032256.58552.hselasky@c2i.net> References: <20090414235727.38d16ee1.torfinn.ingolfsen@broadpark.no> <200911012209.37403.hselasky@c2i.net> <20091103222703.0e8ea0eb.torfinn.ingolfsen@broadpark.no> <200911032256.58552.hselasky@c2i.net> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.5; amd64-portbld-freebsd7.2) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Subject: Re: usb thermometer - TEMPer - FreeBSD 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, 28 Dec 2009 01:01:09 -0000 On Tue, 03 Nov 2009 22:56:57 +0100 Hans Petter Selasky wrote: > On Tuesday 03 November 2009 22:27:03 Torfinn Ingolfsen wrote: > > But where is ucom0? > > root@kg-t2# ls -l /dev/uc* > > ls: /dev/uc*: No such file or directory > > root@kg-t2# ls -l /dev/ucom0 > > ls: /dev/ucom0: No such file or directory > > root@kg-t2# ls -l /dev/ucom0 > > /dev/cuaU0 Ok, I have done some more testing with the TEMPer. I have kldloaded uchcom. root@testhost-1# uname -a FreeBSD testhost-1.kg4.no 8.0-STABLE FreeBSD 8.0-STABLE #0: Sat Dec 12 23:49:41 CET 2009 root@testhost-1.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64 In /var/log/messages: Dec 27 23:07:43 testhost-1 kernel: ugen1.2: at usbus1 Dec 27 23:07:43 testhost-1 kernel: ucom0: on usbus1 Dec 27 23:07:43 testhost-1 kernel: ucom0: CH340 detected I took TEMPer.c[1] from Tollef Fog Heen's site, changed the device from /dev/ttyUSB0 to /dev/ttyU0 and compiled with gcc -lm -o TEMPer2 TEMPer2.c and tested it: root@testhost-1# ./TEMPer2 Init starting Init done ^Croot@testhost-1# It hangs after "Init done" until I break out of it with Ctrl-C. This is strange, the same code works fine un Linux: tingo@kg-home:~$ uname -a Linux kg-home 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:01:29 UTC 2009 i686 GNU/Linux tingo@kg-home:~$ ~/work/temper/TEMPer Init starting Init done Getting temperature done 0001100010000000. 24.500000 Getting temperature done 0001100010000000. 24.500000 Getting temperature done 0001100010000000. 24.500000 Getting temperature done 0001100100000000. 25.000000 Getting temperature done 0001100010000000. 24.500000 Getting temperature done 0001100000000000. 24.000000 Getting temperature done 0001100000000000. 24.000000 Getting temperature done 0001100010000000. 24.500000 Getting temperature done 0001100010000000. 24.500000 Getting temperature done 0001100100000000. 25.000000 ^C I wonder if it is the driver in FreeBSD or something different in the tty initialization? Anyway, I have made a FreeBSD[2] and a Linux[3] page with all the details. References: 1) http://err.no/src/TEMPer.c 2) http://sites.google.com/site/tingox/temper_freebsd 3) http://sites.google.com/site/tingox/temper_xubuntu -- Regards, Torfinn Ingolfsen