Networking Forums

Networking Forums > Computer Networking > Linux Networking > detect type of dial-in connection

Reply
Thread Tools Display Modes

detect type of dial-in connection

 
 
A.D. Vijverberg
Guest
Posts: n/a

 
      01-10-2005, 09:57 AM
Dear all,

First of all, I hope this is the correct newsgroup for my question. If not,
please tell me where I have to be.

At this moment I am working on a project to connect to a PLC from a PDA.
This PLC is capable of being controlled by a normal PC through a serial
connection or a dial-up connection. If the user uses a dial-up connection to
the PLC, the PLC handles everything from controlling the modem to the data
exchange. The application used on the PC to connect to the PLC does not
understand TCP/IP. And, it is not possible to modify the pc application to
support TCP/IP.

The PDA cannot use this serial connection. It must use TCP/IP. The PLC
itself does not contain the TCP/IP protocol. Therefore, a piece of hardware
is developed, running uClinux. This device is attached to the PLC and a
modem. When a connection is made to the modem (via PPPD on the uClinux
device), all incomming TCP/IP data is "converted" and transferred through
the serial port to the PLC and vice versa.

When the user uses this setup, it is no longer possible to connect to the
PLC from a computer with a modem at this moment. This is because the
software on the PC does not understand TCP/IP.

Because the PLC must be reachable from a PC with modem AND a PDA (but not at
the same time), I need a way to figure out if the incomming call is from a
PDA (and let PPPD handle the login process etc.) or from a PC with modem
(and let the PLC handle the connection). What I was thinking of, is if a PDA
connects, a PPP session is started. And, if a pc/modem connection comes in,
pppd should timeout after some time. If this happens, all incomming data
over the modem, should be redirected one-on-one to the PLC without any
modification/interferance of the hardware between the modem and PLC.

Is there a way under uClinux to achieve this? I have been searching for
solutions on the net for some days now, but without results. So, I hope
someone here can give some help. If more information is needed, please let
me know.

Kind regards,

Dyngeman Vijverberg


 
Reply With Quote
 
 
 
 
Coenraad Loubser
Guest
Posts: n/a

 
      01-13-2005, 07:40 AM
Shit man. TCP-IP is really straightforward! Just code a little wrapper that
wraps your raw data in ip packets.

Otherwise, why don't you just change the culinux code so that if it doenst
get a tcp header, it just feeds the incoming data through?

Where you dialling in from on the PC - just a plain terminal program?




 
Reply With Quote
 
A.D. Vijverberg
Guest
Posts: n/a

 
      01-14-2005, 07:49 AM
"Coenraad Loubser" <(E-Mail Removed)> wrote in message
news:cs5c2v$l7h$(E-Mail Removed)...
> Shit man. TCP-IP is really straightforward! Just code a little wrapper

that
> wraps your raw data in ip packets.
>
> Otherwise, why don't you just change the culinux code so that if it doenst
> get a tcp header, it just feeds the incoming data through?
>
> Where you dialling in from on the PC - just a plain terminal program?


Modifying the uClinux code, is something I prefer not to do. In this case it
means changing the PPPD sources (I suppose). Because the device running
uClinux is just a box with 2 serial interfaces (for the PLC and a modem) and
a power cable. Also it is not possible for the user to access the device.
There are no shells or whatsoever. It is just a device with a very small
linux kernel (2.4), pppd and a tcp-serial wrapper for the PDA. If I change
the sources of PPPD, it means that there is another point of failure between
the PDA and the PLC. Because of the setup of uClinux at this moment,
everything must work guaranteed for 100%, or, IF something goes wrong,
removing power and reconnecting power MUST ben enough to make the system
work again.

Not receiving a TCP header does not always mean a PC is dialing in.
Unfortunately, when network coverage of the GSM network used to dial in from
a PDA, is low (which is something that happens reguarly unfortunately), it
happens that packets send from the PDA do not reach the other side of the
line.

Changing the application used to control the PLC from a PC has my favour.
Now the application uses plain serial communication to communicate with the
PLC and has a graphical interface for presenting the data to the user. But,
changing this app. so it supports TCP/IP when connecting over a modem via
the uClinux device (one can also use this app. for connecting to the PLC
directly, in that case, a modem is connected directly to the PLC and the PLC
handles the serial connection), is something that is not possible in an easy
way because there are many versions of this app for the different
types/versions of PLC. The PDA application works with all types/versions
because it only provides access to basic functions available in all
types/versions. So, that means a lot of work. And, beside that, there are
more than 3000 customers using this app worldwide. All of them than have to
upgrade if they want to use the PDA solution.

Therefore the idea I had is let the chat script responsible for accepting
any incomming call on the uClinux device detect what kind of connection it
is, and depending on that, forward the call to PPPD or just forward the
incomming data to the PLC. But than, how do I detect if the line is dropped
when a connection not using TCP/IP is dropped so the chat script can be
restarted?

I also searched for something that reads the caller-id of an incomming
connection. Depending on that (mobile phone number -> PDA, other number ->
PC), handle the connection via TCP/IP or not. The problem with this is that
not every country supports caller-id and the system is different in many
countries, so I dont know if there is a generic way of handling this which
is necessary because of the international use of this device/applications. I
did not find anything about this, or, options to use this.

Kind regards,

Dyngeman Vijverberg


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux does not auto detect monitor type Wills Linux Networking 3 08-30-2007 02:40 AM
Wireless Encryption Type In Outbound Packets? Enforcing Wireless Connection Type south.loop.blogger@gmail.com Wireless Internet 0 05-30-2007 04:18 PM
how to detect TCP connection crash will_u_tellmemore Linux Networking 3 12-22-2006 08:30 PM
IE options - "never dial a connection" doesnt stick - returns to "Dial whenever a network connection is not present" techman41973@yahoo.com Wireless Internet 2 03-08-2006 08:08 PM
MN 700 won't detect internet connection Tglennt Broadband Hardware 1 03-03-2004 05:40 PM



1 2 3 4 5 6 7 8 9 10 11