Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I/O su seriale?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
CRV§ADER//KY
Guru
Guru


Joined: 30 Aug 2004
Posts: 405
Location: Torino

PostPosted: Thu Oct 07, 2004 5:30 pm    Post subject: I/O su seriale? Reply with quote

Come faccio a trasmettere dati sulla porta seriale RS232?

Ho attaccato un cavo null modem a 3 fili (testato) alla COM1 e alla COM2 del mio pc.

# stty -F /dev/ttyS0
speed 57600 baud; line = 0;
-brkint -imaxbel

# stty -F /dev/ttyS1
speed 57600 baud; line = 0;
-brkint -imaxbel

poi apro un secondo terminale e digito

# cat /dev/ttyS1


dal primo terminale, lancio

# cat > /dev/ttyS0
hello world
linea 2


questo è quel che vedo sul secondo terminale:

# cat /dev/ttyS1
h
l



come risolvo? l'obbiettivo finale è di riuscire a

1)mandare direttamente dei pacchetti .tar da un PC all'altro
2)stabilire una connessione TCP-IP

mi serve per uno scassatissimo portatile Pentium 100 che non dispone di altri dispositivi di I/O.

Grazie in anticipo
_________________
Kyrie, Ignis Divine, Eleison ~ Elfen Lied


Last edited by CRV§ADER//KY on Thu Oct 07, 2004 9:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
xxchris
n00b
n00b


Joined: 07 Oct 2004
Posts: 23

PostPosted: Thu Oct 07, 2004 7:49 pm    Post subject: Reply with quote

ti consiglio di dare un occhio a questo vecchio thread:
https://forums.gentoo.org/viewtopic.php?t=176684&postdays=0&postorder=asc&
ciao
_________________
while true...Gentoo
Back to top
View user's profile Send private message
CRV§ADER//KY
Guru
Guru


Joined: 30 Aug 2004
Posts: 405
Location: Torino

PostPosted: Thu Oct 07, 2004 8:35 pm    Post subject: Reply with quote

xxchris wrote:
ti consiglio di dare un occhio a questo vecchio thread:
https://forums.gentoo.org/viewtopic.php?t=176684&postdays=0&postorder=asc&
ciao


L'ho letto con molto interesse.... ma ne so quanto prima :(
Il problema è che a me NON funziona il test più semplice di tutti, ossia "echo hello > /dev/ttyS0"

# stty -F /dev/ttyS0 -a
speed 57600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
_________________
Kyrie, Ignis Divine, Eleison ~ Elfen Lied
Back to top
View user's profile Send private message
xxchris
n00b
n00b


Joined: 07 Oct 2004
Posts: 23

PostPosted: Thu Oct 07, 2004 8:39 pm    Post subject: Reply with quote

inizia ad abbassare la velocita... (ad es 9600)
ciao
_________________
while true...Gentoo
Back to top
View user's profile Send private message
CRV§ADER//KY
Guru
Guru


Joined: 30 Aug 2004
Posts: 405
Location: Torino

PostPosted: Thu Oct 07, 2004 8:42 pm    Post subject: Reply with quote

xxchris wrote:
inizia ad abbassare la velocita... (ad es 9600)
ciao


Ci ho già provato. E cmq il cavo che sto usando è ampiamente testato a 57600.
_________________
Kyrie, Ignis Divine, Eleison ~ Elfen Lied
Back to top
View user's profile Send private message
xxchris
n00b
n00b


Joined: 07 Oct 2004
Posts: 23

PostPosted: Thu Oct 07, 2004 9:00 pm    Post subject: Reply with quote

domanda semplice...
forse hai digitato male nel primo post...

TERMINALE1

echo "CIAO" > /dev/ttyS0

TERMINALE2

cat /dev/ttyS1

o non ho capito io... :)
_________________
while true...Gentoo
Back to top
View user's profile Send private message
CRV§ADER//KY
Guru
Guru


Joined: 30 Aug 2004
Posts: 405
Location: Torino

PostPosted: Thu Oct 07, 2004 9:04 pm    Post subject: Reply with quote

xxchris wrote:
domanda semplice...
forse hai digitato male nel primo post...

TERMINALE1

echo "CIAO" > /dev/ttyS0

TERMINALE2

cat /dev/ttyS1

o non ho capito io... :)


no, è giusto. sto provando con la COM1 e la COM2 dello stesso PC, con un cavo esterno che le collega.
_________________
Kyrie, Ignis Divine, Eleison ~ Elfen Lied
Back to top
View user's profile Send private message
CRV§ADER//KY
Guru
Guru


Joined: 30 Aug 2004
Posts: 405
Location: Torino

PostPosted: Thu Oct 07, 2004 9:07 pm    Post subject: Reply with quote

quel che è peggio è che non arriva sempre e soltanto la prima lettera: talvolta arriva la prima lettera; talvolta la prima lettera ripetuta 2-200 volte, talvolta nono arriva un bel niente.
_________________
Kyrie, Ignis Divine, Eleison ~ Elfen Lied
Back to top
View user's profile Send private message
xxchris
n00b
n00b


Joined: 07 Oct 2004
Posts: 23

PostPosted: Thu Oct 07, 2004 10:28 pm    Post subject: Reply with quote

mmm
ho riprovato poco fa e a me funzionava tutto.
Ho controllato con stty ed erano settate a 9600.

non hai un altro pc in giro con cui provare?
(si lo so...richiesta assurda :S)
_________________
while true...Gentoo
Back to top
View user's profile Send private message
CRV§ADER//KY
Guru
Guru


Joined: 30 Aug 2004
Posts: 405
Location: Torino

PostPosted: Thu Oct 07, 2004 10:35 pm    Post subject: Reply with quote

xxchris wrote:
mmm
ho riprovato poco fa e a me funzionava tutto.


mi posti l'output di

stty -F /dev/ttyS0 -a

per favore? thx
_________________
Kyrie, Ignis Divine, Eleison ~ Elfen Lied
Back to top
View user's profile Send private message
xxchris
n00b
n00b


Joined: 07 Oct 2004
Posts: 23

PostPosted: Thu Oct 07, 2004 10:47 pm    Post subject: Reply with quote

eccolo

Code:

lyra root # stty -F /dev/ttyS0 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany
-imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke



ciao
_________________
while true...Gentoo
Back to top
View user's profile Send private message
CRV§ADER//KY
Guru
Guru


Joined: 30 Aug 2004
Posts: 405
Location: Torino

PostPosted: Mon Oct 11, 2004 4:33 pm    Post subject: Reply with quote

xxchris wrote:
eccolo
ciao


aaargh! ma è identico al mio!

*va a sbattere la testa contro il muro non sapendo più che pesci pigliare*
_________________
Kyrie, Ignis Divine, Eleison ~ Elfen Lied
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum