[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
 

Læse én karakter fra ttyS0



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.

Jeg skal hente denne ene karakter over i et script/program til senere
behandling. Men hvordan gør jeg det?

Skal jeg lave noget med en tail -n 1? Dette virker dog ikke helt.

Nogle links eller idéer modtages gerne.

Mvh Michael



 
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] *