From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 10 02:39:48 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02A4016A4CE for ; Sun, 10 Apr 2005 02:39:48 +0000 (GMT) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC3DA43D2D for ; Sun, 10 Apr 2005 02:39:47 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 0E91FD9AA; Sat, 9 Apr 2005 22:39:47 -0400 (EDT) Received: by canoe.dclg.ca (Postfix, from userid 101) id ED9A21A08CF; Sat, 9 Apr 2005 22:39:39 -0400 (EDT) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16984.37355.901544.774861@canoe.dclg.ca> Date: Sat, 9 Apr 2005 22:39:39 -0400 To: ticso@cicely.de In-Reply-To: <20050409215700.GL96690@cicely12.cicely.de> References: <16982.46075.115518.130213@canoe.dclg.ca> <4256B5EB.9080506@savvis.net> <16982.47024.135663.645297@canoe.dclg.ca> <20050408190514.GS96690@cicely12.cicely.de> <16983.465.572693.73195@canoe.dclg.ca> <20050408233301.GW96690@cicely12.cicely.de> <16984.17307.804041.502108@canoe.dclg.ca> <20050409212327.GI96690@cicely12.cicely.de> <16984.19899.604657.135854@canoe.dclg.ca> <20050409215700.GL96690@cicely12.cicely.de> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid cc: freebsd-hackers@freebsd.org cc: David Gilbert Subject: Re: Tricky USB device. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2005 02:39:48 -0000 >>>>> "Bernd" == Bernd Walter writes: Bernd> Sounds simple. Tried with lower case characters? Otherwise I Bernd> would say sniff a working driver - for windows there is at Bernd> least one good freeware USB sniffer avaiable. HA! Found the problem --- thank-you everyone. Aparently, this little device expects a 0x01 as the first byte of any command. Heh. Works now. So if you need dry contact I/O ... this seems to work for FreeBSD... /* Test the Ontrack ADU208 */ /* www.ontrak.net */ #include #include #include #include #include #include int main(int argc, char *argv[]) { int bytes, fd; char *s1 = "\001MK255", *s2 = "\001MK0", *s = s1, buf[256]; if((fd = open("/dev/ugen0.1", O_RDWR)) < 0) err(1, "Cannot open device"); while(1) { bytes = write(fd, s, strlen(s)); printf("wrote %d bytes %s\n", bytes, s); sleep(1); if(s == s1) s = s2; else s = s1; } return 0; } Dave. -- ============================================================================ |David Gilbert, Independent Contractor. | Two things can only be | |Mail: dave@daveg.ca | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================