|
|
|
![]() |
|
Strumenti |
![]() |
#61 |
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
Con quello apri la porta...oltre a quello devi settare la modalità di comunicazione con SetCommState...
|
![]() |
![]() |
![]() |
#62 |
Senior Member
Iscritto dal: Nov 2001
Città: Trento
Messaggi: 7095
|
ho fatto anche quello...
ma alla fine in out me la apre, mentre si blocca mentre leggo. ciao ciao e grazie
__________________
MyPC: A7A266 - Thoro1800+@2000+ - SK6 - 512DDR - FX5200 128MB - SBLive!1024 - MAXTOR120GB - Liteon LTR52327S LDW-451S HTPC: Case uATX QTec - GA 7VM400M - Duron1600 - ALX800 - 256DDR - Radeon7000 - LiteOn166 - Pow by GeexBox 0.98.5 Utenti con cui ho trattato |
![]() |
![]() |
![]() |
#63 | |
Senior Member
Iscritto dal: Apr 2000
Città: Roma
Messaggi: 15625
|
Quote:
A me continua a sembrare un problema di impostazione errata della velocità...boh sbaglierò... Puoi postare il codice con cui setti le impostazioni della porta?
__________________
0: or %edi, %ecx; adc %eax, (%edx); popf; je 0b-22; pop %ebx; fadds 0x56(%ecx); lds 0x56(%ebx), %esp; mov %al, %al andeqs pc, r1, #147456; blpl 0xff8dd280; ldrgtb r4, [r6, #-472]; addgt r5, r8, r3, ror #12 |
|
![]() |
![]() |
![]() |
#64 |
Senior Member
Iscritto dal: Nov 2001
Città: Trento
Messaggi: 7095
|
ecco quello che faccio:
Codice:
// Get the default port setting information. GetCommState (m_hCom, &PortDCB); // Change the DCB structure settings. PortDCB.BaudRate = 9600; // Current baud // PortDCB.fBinary = TRUE; // Binary mode; no EOF check // PortDCB.fParity = TRUE; // Enable parity checking. // PortDCB.fOutxCtsFlow = FALSE; // No CTS output flow control // PortDCB.fOutxDsrFlow = FALSE; // No DSR output flow control // PortDCB.fDtrControl = DTR_CONTROL_ENABLE; // DTR flow control type // PortDCB.fDsrSensitivity = FALSE; // DSR sensitivity // PortDCB.fTXContinueOnXoff = TRUE; // XOFF continues Tx // PortDCB.fOutX = FALSE; // No XON/XOFF out flow control // PortDCB.fInX = FALSE; // No XON/XOFF in flow control // PortDCB.fErrorChar = FALSE; // Disable error replacement. // PortDCB.fNull = FALSE; // Disable null stripping. // PortDCB.fRtsControl = RTS_CONTROL_ENABLE; // RTS flow control // PortDCB.fAbortOnError = FALSE; // Do not abort reads/writes on // error. PortDCB.ByteSize = 8; // Number of bits/bytes, 4-8 PortDCB.Parity = NOPARITY; // 0-4=no,odd,even,mark,space PortDCB.StopBits = 0; // 0,1,2 = 1, 1.5, 2 // valori cambiati per farli diventare uguali a quelli dall' Hyper Terminal PortDCB.fOutxCtsFlow = 1; PortDCB.fTXContinueOnXoff = 1; PortDCB.fRtsControl = 2; PortDCB.fAbortOnError = 1; // unsigned long inBuff = 1200; // unsigned long outBuff = 1200; // SetupComm(m_hCom,inBuff,outBuff); // Configure the port according to the specifications of the DCB // structure. SetCommState(m_hCom,&PortDCB);
__________________
MyPC: A7A266 - Thoro1800+@2000+ - SK6 - 512DDR - FX5200 128MB - SBLive!1024 - MAXTOR120GB - Liteon LTR52327S LDW-451S HTPC: Case uATX QTec - GA 7VM400M - Duron1600 - ALX800 - 256DDR - Radeon7000 - LiteOn166 - Pow by GeexBox 0.98.5 Utenti con cui ho trattato |
![]() |
![]() |
![]() |
#65 |
Senior Member
Iscritto dal: Nov 2001
Città: Trento
Messaggi: 7095
|
qualche novita'?
__________________
MyPC: A7A266 - Thoro1800+@2000+ - SK6 - 512DDR - FX5200 128MB - SBLive!1024 - MAXTOR120GB - Liteon LTR52327S LDW-451S HTPC: Case uATX QTec - GA 7VM400M - Duron1600 - ALX800 - 256DDR - Radeon7000 - LiteOn166 - Pow by GeexBox 0.98.5 Utenti con cui ho trattato |
![]() |
![]() |
![]() |
#66 |
Senior Member
Iscritto dal: Apr 2000
Città: Roma
Messaggi: 15625
|
- Metti 1 bit di stop. Non ho trovato nessuno che usa 0 bit.
- prova anche con altre velocità (in particolare 38400, 57600, 115200).
__________________
0: or %edi, %ecx; adc %eax, (%edx); popf; je 0b-22; pop %ebx; fadds 0x56(%ecx); lds 0x56(%ebx), %esp; mov %al, %al andeqs pc, r1, #147456; blpl 0xff8dd280; ldrgtb r4, [r6, #-472]; addgt r5, r8, r3, ror #12 |
![]() |
![]() |
![]() |
#67 |
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
Infatti...
|
![]() |
![]() |
![]() |
#68 |
Senior Member
Iscritto dal: Nov 2001
Città: Trento
Messaggi: 7095
|
ok, provo a rimettere 1.
Sta mattina ho fatto un'altra prova. Senza collegare il cellulare ho avviato Hyper Terminal e ho aperto la COM1 (quella che mi server), poi ho chiuso, collegato il cellulare ed avviato il mio programma... tutto ok. Magari puo' essere utile per capire il problema. Approposito, ho anche provato ad installare i driver di un modem generico a 9600 kps. ciao ciao e g grazie per l'aiuto
__________________
MyPC: A7A266 - Thoro1800+@2000+ - SK6 - 512DDR - FX5200 128MB - SBLive!1024 - MAXTOR120GB - Liteon LTR52327S LDW-451S HTPC: Case uATX QTec - GA 7VM400M - Duron1600 - ALX800 - 256DDR - Radeon7000 - LiteOn166 - Pow by GeexBox 0.98.5 Utenti con cui ho trattato |
![]() |
![]() |
![]() |
#69 |
Senior Member
Iscritto dal: Nov 2001
Città: Trento
Messaggi: 7095
|
a provato a settare il bit di stop a 1, ma niente.
__________________
MyPC: A7A266 - Thoro1800+@2000+ - SK6 - 512DDR - FX5200 128MB - SBLive!1024 - MAXTOR120GB - Liteon LTR52327S LDW-451S HTPC: Case uATX QTec - GA 7VM400M - Duron1600 - ALX800 - 256DDR - Radeon7000 - LiteOn166 - Pow by GeexBox 0.98.5 Utenti con cui ho trattato |
![]() |
![]() |
![]() |
#70 |
Senior Member
Iscritto dal: Apr 2000
Città: Roma
Messaggi: 15625
|
Per curiosità, perché nel tuo esempio alcuni campi non li imposti?
Puoi vedere esattamente quali sono le impostazioni lasciate da HT, e ripeterle _esattamente_? E' l'ultima cosa logica che puoi provare, prima di dare capocciate qui => X ( ![]()
__________________
0: or %edi, %ecx; adc %eax, (%edx); popf; je 0b-22; pop %ebx; fadds 0x56(%ecx); lds 0x56(%ebx), %esp; mov %al, %al andeqs pc, r1, #147456; blpl 0xff8dd280; ldrgtb r4, [r6, #-472]; addgt r5, r8, r3, ror #12 |
![]() |
![]() |
![]() |
#71 |
Senior Member
Iscritto dal: Nov 2001
Città: Trento
Messaggi: 7095
|
ho impostato solo le cose che cambiavano.
Allora provo ad impostare tutti i valori, non si sa' mai che facciano casino... ciao ciao e grazie
__________________
MyPC: A7A266 - Thoro1800+@2000+ - SK6 - 512DDR - FX5200 128MB - SBLive!1024 - MAXTOR120GB - Liteon LTR52327S LDW-451S HTPC: Case uATX QTec - GA 7VM400M - Duron1600 - ALX800 - 256DDR - Radeon7000 - LiteOn166 - Pow by GeexBox 0.98.5 Utenti con cui ho trattato |
![]() |
![]() |
![]() |
#72 |
Senior Member
Iscritto dal: Apr 2000
Città: Roma
Messaggi: 15625
|
Sì in particolare fBinary; anche fDtrControl e fRtsControl possono essere importanti (dipende dalle linee che gestisce il cell).
Imposta _tutto_ esattamente come fa HT per essere sicuro.
__________________
0: or %edi, %ecx; adc %eax, (%edx); popf; je 0b-22; pop %ebx; fadds 0x56(%ecx); lds 0x56(%ebx), %esp; mov %al, %al andeqs pc, r1, #147456; blpl 0xff8dd280; ldrgtb r4, [r6, #-472]; addgt r5, r8, r3, ror #12 |
![]() |
![]() |
![]() |
#73 |
Senior Member
Iscritto dal: Nov 2001
Città: Trento
Messaggi: 7095
|
ho settato tutti i valori, ma niente!
Non e' che devo andare a modificare il timeout?
__________________
MyPC: A7A266 - Thoro1800+@2000+ - SK6 - 512DDR - FX5200 128MB - SBLive!1024 - MAXTOR120GB - Liteon LTR52327S LDW-451S HTPC: Case uATX QTec - GA 7VM400M - Duron1600 - ALX800 - 256DDR - Radeon7000 - LiteOn166 - Pow by GeexBox 0.98.5 Utenti con cui ho trattato |
![]() |
![]() |
![]() |
#74 | |
Senior Member
Iscritto dal: Nov 2001
Città: Trento
Messaggi: 7095
|
Quote:
i valori erano tutti a zero! ho risolto copiando quelli impostati dall'HyperTerminal ciao ciao e grazie a tutti per la collaborazione ![]()
__________________
MyPC: A7A266 - Thoro1800+@2000+ - SK6 - 512DDR - FX5200 128MB - SBLive!1024 - MAXTOR120GB - Liteon LTR52327S LDW-451S HTPC: Case uATX QTec - GA 7VM400M - Duron1600 - ALX800 - 256DDR - Radeon7000 - LiteOn166 - Pow by GeexBox 0.98.5 Utenti con cui ho trattato |
|
![]() |
![]() |
![]() |
#75 |
Senior Member
Iscritto dal: Nov 2001
Città: Trento
Messaggi: 7095
|
porso farvi un'altra domanda?
Il siemens M50 lo uso senza driver sulla COM, mentre il siemens c35 necessita dei driver per poter essere utilizzato con l'Hyper Terminal. cosa devo passargli come argomento all'apertura della seriale per dirgli di usare i driver installati? ciao caio e grazie ancora
__________________
MyPC: A7A266 - Thoro1800+@2000+ - SK6 - 512DDR - FX5200 128MB - SBLive!1024 - MAXTOR120GB - Liteon LTR52327S LDW-451S HTPC: Case uATX QTec - GA 7VM400M - Duron1600 - ALX800 - 256DDR - Radeon7000 - LiteOn166 - Pow by GeexBox 0.98.5 Utenti con cui ho trattato |
![]() |
![]() |
![]() |
#76 |
Senior Member
Iscritto dal: Apr 2000
Città: Roma
Messaggi: 15625
|
Probabilmente il driver del c35 registra una "com virtuale" (ad es. com3).
__________________
0: or %edi, %ecx; adc %eax, (%edx); popf; je 0b-22; pop %ebx; fadds 0x56(%ecx); lds 0x56(%ebx), %esp; mov %al, %al andeqs pc, r1, #147456; blpl 0xff8dd280; ldrgtb r4, [r6, #-472]; addgt r5, r8, r3, ror #12 |
![]() |
![]() |
![]() |
#77 |
Senior Member
Iscritto dal: Nov 2001
Città: Trento
Messaggi: 7095
|
no, e' sempre collegato su seriale, perche' con l'hyper terminal funziona solo se seleziono il modem e non la porta com.
ciao ciao e grazie
__________________
MyPC: A7A266 - Thoro1800+@2000+ - SK6 - 512DDR - FX5200 128MB - SBLive!1024 - MAXTOR120GB - Liteon LTR52327S LDW-451S HTPC: Case uATX QTec - GA 7VM400M - Duron1600 - ALX800 - 256DDR - Radeon7000 - LiteOn166 - Pow by GeexBox 0.98.5 Utenti con cui ho trattato |
![]() |
![]() |
![]() |
#78 |
Senior Member
Iscritto dal: Apr 2000
Città: Roma
Messaggi: 15625
|
Allora aprendo la stessa com dovrebbe funzionare ugualmente...
__________________
0: or %edi, %ecx; adc %eax, (%edx); popf; je 0b-22; pop %ebx; fadds 0x56(%ecx); lds 0x56(%ebx), %esp; mov %al, %al andeqs pc, r1, #147456; blpl 0xff8dd280; ldrgtb r4, [r6, #-472]; addgt r5, r8, r3, ror #12 |
![]() |
![]() |
![]() |
#79 |
Senior Member
Iscritto dal: Jan 2005
Città: A casa mia
Messaggi: 825
|
Poix posta il codice completo PLEASE !!!!!!!!!!!!!!!
|
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 22:05.