[uClinux-dev] Pseudo Terminal Question / GSM Multiplexer

Daniel Haensse haensse at swissembedded.com
Tue Aug 9 01:00:46 EDT 2005


Dear list,

A GSM multiplexer is a piece of software which offers multiple communication 
channels to a GSM modem (e.g. PPPD connection and check of radio quality at 
the same time) which normally has only one physical serial port.

I modified the original version of Tuukka Karvonen (GPL) to work with uclinux 
and pseudoterminals. The GSMMUX software is running in user space.

My Question: Pseudo terminals are paired as master slave devices. The GSMMUX 
software opens a master device and waits for the slave (e.g. pppd) to connect 
to it. If the slave sends some data I can check that event with the piece of 
code below and translate it to the GSM Multiplexer protocol. 

Now I would also like to check changes of the RTS / CTS lines open / close 
events from the slave device and send these events translated to the GSM 
Modem. 

Is this supported by pseudo terminals and also implemented in uclib? 
How can I do, any reference?

Best regards

Dani

FD_ZERO(&rfds);
FD_SET(serial_fd, &rfds); // Modem physical port
for (i = 0; i < numOfPorts; i++)
{ // Slave devices
	FD_SET(pty_fd[i], &rfds);
	FD_SET(pty_fd[i], &expfds);
}
		
// timeout after 1 second of inactivity		
timeout.tv_sec = 1;
timeout.tv_usec = 0;

// wait for data
if ((sel = select(maxfd + 1, &rfds, NULL, &expfds, &timeout)) > 0)

-- 
swissEmbedded GmbH
Daniel Haensse, Dipl. El. Ing. ETH
Zuercherstrasse 12, 5400 Baden, Switzerland
Phone ++41562100158
Fax: ++41562100157
Mobile: ++41763207732
Email: haensse at swissembedded.com



More information about the uClinux-dev mailing list