[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] Minicom skal køre en enkelt gang før mit eget program.



On Sat, 1 Jan 2005, Michael Bernhard Sørensen wrote:

> Jeg har et serielt spørgsmål.
> 
> Jeg har lavet et program til at snakke med min serielle port og det
> virker som sådan fint. Men inden at det kan bruges, SKAL jeg først
> køre minicom en enkelt gang inden at jeg kan få mit eget program til
> at virke med porten.

Jeg har sendt et link til det før.

Du skal enten bruge tcsetattr() eller ioctl().
http://schou.dk/linux/usbio24/usbio24a.c
		ioctl(fd, TCGETS, &term);
		term_orig = term;
		term.c_lflag &= ~( ICANON | ISIG | ECHO );
		term.c_iflag &= ~( ICRNL );
		term.c_oflag &= ~( ONLCR );
		ioctl(fd, TCSETS, &term);
eller noget i den retning.

> Det lugter jo af manglende portopsætning,

Og det er det også.

Har du programmet setserial, så brug det til at se hvilke parametre 
minicom sætter.

Ellers prøv denne før og efter kørsel af minicom:
http://schou.dk/linux/c/tcattr.c

/hans
-- 
Hamletsgade 4 - 201, DK-2200 København N, Phone: +45 3582 9079
Schou Industries ApS      http://schou.dk/    CVR: 26 13 44 39
--------------------------------------------------------------
Since we now have a free kernel that works, namely Linux, it's
no longer essential to develop the Hurd.
				-- Richard Matthew Stallman


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 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] *