two streams through the serial port

R

Roberto Messora

I work with a PPC and an automotive device (a sort of a balck box) which has
embedded a GSM/GPRS modem and a GPS receiver. We decide to use a PPC with
only one serial port (we need a low cost solution), the external device is
capable to redirect modem and gps communication on the same serial port
(i'am talking about a serial port on the device). if we connect the two
serial port we can have a communication stream in which we can identificate
parts from modem and parts from gps.
my question is: can i manage the data stream in some way using the modem
part as an internet connection? I mean, if i separate the two streams
programmatically can i use the modem one as a normal internet connection?
Can I simulate programmatically a dedicate serial port (a dedicate modem)?
thanks
Roberto
 
C

Chris Tacke, eMVP

There are two issues here:

1. How do you intend to identify the data from each device coming through a
single port and prevent data collision? Multiplexing serial data when you
have no control over the connected device isn't easy.

2. CE doesn't allow overlapped communication, so two apps cannot attach to
the same serial port at the same time. This means your two processes would
have to attach and detach as needed, and again, if you're not the code
author, achieving this is difficult to impossible.
 
R

Roberto Messora

"Chris Tacke, eMVP" <[email protected]> ha scritto nel messaggio

Hi and thanks for answers
There are two issues here:

1. How do you intend to identify the data from each device coming through a
single port and prevent data collision? Multiplexing serial data when you
have no control over the connected device isn't easy.

the external device has a Rabbit CPU, the program which sends the two
streams to the same serial port, can encapsulate them into a token with an
header and a footer, i can read from the ppc serial port and understand
which token is the one i'm reading
2. CE doesn't allow overlapped communication, so two apps cannot attach to
the same serial port at the same time. This means your two processes would
have to attach and detach as needed, and again, if you're not the code
author, achieving this is difficult to impossible.

so, i was asking if is it possible to simulate a virtual serial port (one
for the modem and one for the gps, but the latter is not so important). i
could send programmatically to that virtual serial port only the modem
stream after I extract it from the real serial port stream.

thanks
Roberto
 
D

Dick Grier

Hi,

The simple answer is, "No." Internet comms requires the use of the TCP/IP
network stack. You cannot mix a non-network connection (the data associated
with GPS) and networked data.

Now, obviously, it isn't impossible -- just beyond the realm of
practicality. You "could" write your own network stack, implement a network
driver, and parse out the data into separate streams. However, such a
project (IMO, as an engineer) could never be justified. It would cost more
than you could ever save in hardware costs -- and the performance might be
abysmal.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 
R

Roberto Messora

Dick Grier said:
Hi,

The simple answer is, "No." Internet comms requires the use of the TCP/IP
network stack. You cannot mix a non-network connection (the data associated
with GPS) and networked data.

Now, obviously, it isn't impossible -- just beyond the realm of
practicality. You "could" write your own network stack, implement a network
driver, and parse out the data into separate streams. However, such a
project (IMO, as an engineer) could never be justified. It would cost more
than you could ever save in hardware costs -- and the performance might be
abysmal.

thanks, the ng opinion is important for me: now i have some information from
others than me.
Roberto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top