Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Apr 2005 17:48:43 -0400
From:      David Gilbert <dgilbert@dclg.ca>
To:        ticso@cicely.de
Cc:        David Gilbert <dgilbert@dclg.ca>
Subject:   Re: Tricky USB device.
Message-ID:  <16984.19899.604657.135854@canoe.dclg.ca>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "Bernd" == Bernd Walter <ticso@cicely12.cicely.de> 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================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16984.19899.604657.135854>