[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Læse én karakter fra ttyS0



Michael Bernhard Sørensen wrote:

> Hej derude.
> 
> Jeg forsøger at læse hvad der kommer ind på min serielle port.
> 
> På den serielle port har jeg et Z8 evaluation board, som jeg sender data
> til med kommandoen "echo xxx > /dev/ttyS0".
> 
> Svaret der kommer tilbage, er altid kun én karakter, læser jeg med
> kommandoen "cat /dev/ttyS0" og jeg får det tilbage som jeg forventer.
> 

Kanske
MITT_SVAR=$(cat /dev/ttyS0)

Skicka sedan in $MITT_SVAR där du vill ha det. Fast jag hade nog
tittat på ett annat scriptspåk an bash, tex tcl. Det kan mycket mer, 
framförallt när det gäller socket/serie kommunication

/Björn



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *