From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 9 21:48:51 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 97FCA16A4CF for ; Sat, 9 Apr 2005 21:48:51 +0000 (GMT) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59D6843D1D for ; Sat, 9 Apr 2005 21:48:51 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id CA22DD982; Sat, 9 Apr 2005 17:48:50 -0400 (EDT) Received: by canoe.dclg.ca (Postfix, from userid 101) id A55F61A08A8; Sat, 9 Apr 2005 17:48:43 -0400 (EDT) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16984.19899.604657.135854@canoe.dclg.ca> Date: Sat, 9 Apr 2005 17:48:43 -0400 To: ticso@cicely.de In-Reply-To: <20050409212327.GI96690@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> 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: Sat, 09 Apr 2005 21:48:51 -0000 >>>>> "Bernd" == Bernd Walter writes: Bernd> Then the device is still working and just has nothing to send. Bernd> Would be helpfull to know something about the protocol used on Bernd> the endpoints. It's pretty simple. I'm sending (right now) MK255 and MK0 with 1 second sleeps in between. The device has 8 relays and I should be triggering them on and off (The MK command doesn't have output --- so I'm not looking for it). Here's a snippet from the manual: The relays may be SET ( ON ) or RESET ( OFF ) individually or as an 8 bit port. The relay commands include; SKn SETS ( ON ) relay specified by n ( n = 0-7 ) # of Bytes 3 Response NONE Example; SK2 ;closes contact K2 RKn RESETS ( OFF ) relay specified by n ( n= 0 - 7 ) # of Bytes 3 Response NONE Example; RK1 ;opens contact K1 MKddd Sets PORTK to decimal value ddd ( ddd= 0 to 255 ) ( K7-MSB, K0 = LSB ) # of Bytes 3 , 4 or 5 Response NONE Example; MK128 ;SETS K7, RESETS K0 - K6. RPKn Returns status of relay specified by n ( n= 0 - 7 ) # of Bytes 4 Response 1 byte ( 0 or 1 ) Example; RPK2 ;Relay K2 is closed. 1 ( response) PK Returns status of PORT K in decimal format. # of Bytes 2 Response 3 bytes ( 000 to 255 in decimal ) Example; PK ;K0 -K3 are SET ( ON ), K4-K7 are RESET ( OFF ). 015 ( response) 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================