RE: serial0 on TINI 400

Mihaela Tarjoianu <mihaela_tarjoianu-/[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
Hello,

   I forgot to tell you that i had already stopped the
serial server.
   The problem was that I had to take off the DTR from
the serial cable when I connect it to serial0. Now
serial0 is working fine.
   Thanks for your answers to everyone.

Mihaela Tarjoianu



--- Jeremy Kongs <jeremy.kongs-6tN4nzCoH/[email protected]> wrote:
> What is the nature of your problem?
> 
> You may be having a problem successfully getting
> ownership of serial0 due to
> Slush.  Slush uses serial0 for its serial terminal
> server.  Slush will give
> up the port if it is requested but you need to allow
> ~5 seconds for this to
> happen.  Try changing        sP =
> (SerialPort)portId.open(interfaceName,
> 10);  to sP = (SerialPort)portId.open(interfaceName,
> 5000);  This should
> give Slush sufficient time to give up the port.
> 
> Jeremy
> 
> > -----Original Message-----
> > From: tini-admin-6tN4nzCoH/[email protected]
> [mailto:tini-admin-6tN4nzCoH/[email protected]]On Behalf Of
> > Mihaela Tarjoianu
> > Sent: Tuesday, March 02, 2004 9:03 AM
> > To: Tini List
> > Subject: [TINI]serial0 on TINI 400
> >
> >
> >
> > Hello,
> >
> >    I have some trouble with using serial0 on TINI
> 400.
> > I want to read what is comming on serial0.
> >    The following program is working perfect form
> > serial4, but not for serial0.
> >
> > portNum=0;
> > try
> >  {
> >    CommPortIdentifier portId =
> > CommPortIdentifier.getPortIdentifier("serial" +
> > portNum);
> >     try{
> >       sP = (SerialPort)portId.open(interfaceName,
> 10);
> >     }catch (PortInUseException e){
> >         System.out.println("Port in use");
> >         return;
> >     }
> >
> >     sP.setSerialPortParams(4800,
> >                            SerialPort.DATABITS_8,
> >                            SerialPort.STOPBITS_1,
> >                           
> SerialPort.PARITY_NONE);
> >
> >     sP.setFlowControlMode(sP.FLOWCONTROL_NONE);
> >
> >     modemInputStream = sP.getInputStream();
> >
> >     // Clear any old input data
> >     long available = modemInputStream.available();
> >     if (available > 0)
> > modemInputStream.skip(available);
> >  }
> >  catch (Exception e)
> >  {
> >    System.out.println(e.toString());
> >    return;
> >  }
> >
> >  System.out.println("Open serial"+portNum+"
> port");
> >
> > // reading
> >
> > while(true){
> >  try{
> >   int bytesAvailable=modemInputStream.available();
> >   if (bytesAvailable>0){
> >
> >      // Read available data
> >      byte[] readBuffer = new byte[bytesAvailable];
> >      int numBytes =
> modemInputStream.read(readBuffer,
> > 0, bytesAvailable);
> >      System.out.println(new String(readBuffer, 0,
> > numBytes));
> >
> >    }
> >  }catch(IOException ioe){ioe.printStackTrace();}
> >  }
> >
> >    Do you know what the problem migth be?
> >    Thanks for any sugestion.
> >
> > Mihaela
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Search - Find what you're looking for
> faster
> > http://search.yahoo.com
> > _______________________________________________
> > TINI mailing list
> > TINI-6tN4nzCoH/[email protected]
> > To UNSUBSCRIBE, edit your profile, or see list
> archives:
> > http://lists.dalsemi.com/mailman/listinfo/tini
> 


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com
_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.