Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Communicating with PPP over serail link: (7 Items)
   
Communicating with PPP over serail link  
I am working on PPC platform, I was able to run PPP using the follwoing io-net commnad, besides TCP/IP stck.

io-net -i 1 -p tcpip -p pppmgr

Now i want to communciate PPP over serail link, and dont have pppd facility in target.

Let me know the way to do the same with socket program , or else is there any way to capture packets after PPP stack and
 then transmit the same through serail link.

Ravi 
RE: Communicating with PPP over serail link  
You have to have pppd running on your target in order to have PPP link
(both link layer and network layer, i.e. ip) established and then do the
communication as usual. So you have to have pppd facility in target.

Thanks.
Weijie
  

-----Original Message-----
From: ravi varma [mailto:community-noreply@qnx.com] 
Sent: August 14, 2008 8:24 AM
To: general-networking
Subject: Communicating with PPP over serail link

I am working on PPC platform, I was able to run PPP using the follwoing
io-net commnad, besides TCP/IP stck.

io-net -i 1 -p tcpip -p pppmgr

Now i want to communciate PPP over serail link, and dont have pppd
facility in target.

Let me know the way to do the same with socket program , or else is
there any way to capture packets after PPP stack and then transmit the
same through serail link.

Ravi 


_______________________________________________
General
http://community.qnx.com/sf/go/post11781
Re: RE: Communicating with PPP over serail link  
What commands are reuiqred to add PPPD on to my build.

Ravi 


> You have to have pppd running on your target in order to have PPP link
> (both link layer and network layer, i.e. ip) established and then do the
> communication as usual. So you have to have pppd facility in target.
> 
> Thanks.
> Weijie
>   
> 
> -----Original Message-----
> From: ravi varma [mailto:community-noreply@qnx.com] 
> Sent: August 14, 2008 8:24 AM
> To: general-networking
> Subject: Communicating with PPP over serail link
> 
> I am working on PPC platform, I was able to run PPP using the follwoing
> io-net commnad, besides TCP/IP stck.


> 
> io-net -i 1 -p tcpip -p pppmgr
> 
> Now i want to communciate PPP over serail link, and dont have pppd
> facility in target.
> 
> Let me know the way to do the same with socket program , or else is
> there any way to capture packets after PPP stack and then transmit the
> same through serail link.
> 
> Ravi 
> 
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post11781


Re: RE: Communicating with PPP over serail link  
I got it running by adding pppd in my build file..thanks for giving clarity that pppd is must to run.

> What commands are reuiqred to add PPPD on to my build.
> 
> Ravi 
> 
> 
> > You have to have pppd running on your target in order to have PPP link
> > (both link layer and network layer, i.e. ip) established and then do the
> > communication as usual. So you have to have pppd facility in target.
> > 
> > Thanks.
> > Weijie
> >   
> > 
> > -----Original Message-----
> > From: ravi varma [mailto:community-noreply@qnx.com] 
> > Sent: August 14, 2008 8:24 AM
> > To: general-networking
> > Subject: Communicating with PPP over serail link
> > 
> > I am working on PPC platform, I was able to run PPP using the follwoing
> > io-net commnad, besides TCP/IP stck.
> 
> 
> > 
> > io-net -i 1 -p tcpip -p pppmgr
> > 
> > Now i want to communciate PPP over serail link, and dont have pppd
> > facility in target.
> > 
> > Let me know the way to do the same with socket program , or else is
> > there any way to capture packets after PPP stack and then transmit the
> > same through serail link.
> > 
> > Ravi 
> > 
> > 
> > _______________________________________________
> > General
> > http://community.qnx.com/sf/go/post11781
> 
> 


Re: RE: Communicating with PPP over serail link  
Hi 

I need to communicate between virtual PC and target through PPP over serail link, for that i invoked PPPD on both and 
was able to ping between them.

i used the commands :
pppd /dev/ser1 ip1:ip2    ---- from sever
pppd /dev/ser1 .....at client side 

after which ip are configured and i am able to ping. Now when i wnat to communciate through program i did following 

int fd; char buffer[2]="ab";
fd = open("/dev/ser2", O_RDWR | O_NOCTTY | O_NDELAY);
while(1)
{
		write(fd, buffer,2);
		sleep(1);
} ..... on the tranmission side and in a  similar fashion for receving on the reception side.

I am not receieving the data  (I am sure that program is working fine, as i tested the same with put invoking PPP)... 
what commands i need to used to open my serail port so taht data will be passed over PPP.

Ravi 




> I got it running by adding pppd in my build file..thanks for giving clarity 
> that pppd is must to run.
> 
> > What commands are reuiqred to add PPPD on to my build.
> > 
> > Ravi 
> > 
> > 
> > > You have to have pppd running on your target in order to have PPP link
> > > (both link layer and network layer, i.e. ip) established and then do the
> > > communication as usual. So you have to have pppd facility in target.
> > > 
> > > Thanks.
> > > Weijie
> > >   
> > > 
> > > -----Original Message-----
> > > From: ravi varma [mailto:community-noreply@qnx.com] 
> > > Sent: August 14, 2008 8:24 AM
> > > To: general-networking
> > > Subject: Communicating with PPP over serail link
> > > 
> > > I am working on PPC platform, I was able to run PPP using the follwoing
> > > io-net commnad, besides TCP/IP stck.
> > 
> > 
> > > 
> > > io-net -i 1 -p tcpip -p pppmgr
> > > 
> > > Now i want to communciate PPP over serail link, and dont have pppd
> > > facility in target.
> > > 
> > > Let me know the way to do the same with socket program , or else is
> > > there any way to capture packets after PPP stack and then transmit the
> > > same through serail link.
> > > 
> > > Ravi 
> > > 
> > > 
> > > _______________________________________________
> > > General
> > > http://community.qnx.com/sf/go/post11781
> > 
> > 
> 
> 


Re: RE: Communicating with PPP over serail link  
Can any one send me program for Transmitting/receing data PPP over serail port, do i need to do that through scoket 
program. Please read my earlier message for more information.

> Hi 
> 
> I need to communicate between virtual PC and target through PPP over serail 
> link, for that i invoked PPPD on both and was able to ping between them.
> 
> i used the commands :
> pppd /dev/ser1 ip1:ip2    ---- from sever
> pppd /dev/ser1 .....at client side 
> 
> after which ip are configured and i am able to ping. Now when i wnat to 
> communciate through program i did following 
> 
> int fd; char buffer[2]="ab";
> fd = open("/dev/ser2", O_RDWR | O_NOCTTY | O_NDELAY);
> while(1)
> {
> 		write(fd, buffer,2);
> 		sleep(1);
> } ..... on the tranmission side and in a  similar fashion for receving on the 
> reception side.
> 
> I am not receieving the data  (I am sure that program is working fine, as i 
> tested the same with put invoking PPP)... what commands i need to used to open
>  my serail port so taht data will be passed over PPP.
> 
> Ravi 
> 
> 
> 
> 
> > I got it running by adding pppd in my build file..thanks for giving clarity 
> 
> > that pppd is must to run.
> > 
> > > What commands are reuiqred to add PPPD on to my build.
> > > 
> > > Ravi 
> > > 
> > > 
> > > > You have to have pppd running on your target in order to have PPP link
> > > > (both link layer and network layer, i.e. ip) established and then do the
> 
> > > > communication as usual. So you have to have pppd facility in target.
> > > > 
> > > > Thanks.
> > > > Weijie
> > > >   
> > > > 
> > > > -----Original Message-----
> > > > From: ravi varma [mailto:community-noreply@qnx.com] 
> > > > Sent: August 14, 2008 8:24 AM
> > > > To: general-networking
> > > > Subject: Communicating with PPP over serail link
> > > > 
> > > > I am working on PPC platform, I was able to run PPP using the follwoing
> > > > io-net commnad, besides TCP/IP stck.
> > > 
> > > 
> > > > 
> > > > io-net -i 1 -p tcpip -p pppmgr
> > > > 
> > > > Now i want to communciate PPP over serail link, and dont have pppd
> > > > facility in target.
> > > > 
> > > > Let me know the way to do the same with socket program , or else is
> > > > there any way to capture packets after PPP stack and then transmit the
> > > > same through serail link.
> > > > 
> > > > Ravi 
> > > > 
> > > > 
> > > > _______________________________________________
> > > > General
> > > > http://community.qnx.com/sf/go/post11781
> > > 
> > > 
> > 
> > 
> 
> 


Re: RE: Communicating with PPP over serail link  
If you've successfully set up pppd (which you have since you
can ping) you need to use sockets.  If you just want to send
raw data you don't need any networking at all and can use
open("/dev/ser1", ...).  I'd suggest sockets since you've
come this far.

There's lot of socket programing resources out there; for
example:

http://beej.us/guide/bgnet/

-seanb

On Tue, Aug 19, 2008 at 05:47:23AM -0400, ravi varma wrote:
> Can any one send me program for Transmitting/receing data PPP over serail port, do i need to do that through scoket 
program. Please read my earlier message for more information.
> 
> > Hi 
> > 
> > I need to communicate between virtual PC and target through PPP over serail 
> > link, for that i invoked PPPD on both and was able to ping between them.
> > 
> > i used the commands :
> > pppd /dev/ser1 ip1:ip2    ---- from sever
> > pppd /dev/ser1 .....at client side 
> > 
> > after which ip are configured and i am able to ping. Now when i wnat to 
> > communciate through program i did following 
> > 
> > int fd; char buffer[2]="ab";
> > fd = open("/dev/ser2", O_RDWR | O_NOCTTY | O_NDELAY);
> > while(1)
> > {
> > 		write(fd, buffer,2);
> > 		sleep(1);
> > } ..... on the tranmission side and in a  similar fashion for receving on the 
> > reception side.
> > 
> > I am not receieving the data  (I am sure that program is working fine, as i 
> > tested the same with put invoking PPP)... what commands i need to used to open
> >  my serail port so taht data will be passed over PPP.
> > 
> > Ravi 
> > 
> > 
> > 
> > 
> > > I got it running by adding pppd in my build file..thanks for giving clarity 
> > 
> > > that pppd is must to run.
> > > 
> > > > What commands are reuiqred to add PPPD on to my build.
> > > > 
> > > > Ravi 
> > > > 
> > > > 
> > > > > You have to have pppd running on your target in order to have PPP link
> > > > > (both link layer and network layer, i.e. ip) established and then do the
> > 
> > > > > communication as usual. So you have to have pppd facility in target.
> > > > > 
> > > > > Thanks.
> > > > > Weijie
> > > > >   
> > > > > 
> > > > > -----Original Message-----
> > > > > From: ravi varma [mailto:community-noreply@qnx.com] 
> > > > > Sent: August 14, 2008 8:24 AM
> > > > > To: general-networking
> > > > > Subject: Communicating with PPP over serail link
> > > > > 
> > > > > I am working on PPC platform, I was able to run PPP using the follwoing
> > > > > io-net commnad, besides TCP/IP stck.
> > > > 
> > > > 
> > > > > 
> > > > > io-net -i 1 -p tcpip -p pppmgr
> > > > > 
> > > > > Now i want to communciate PPP over serail link, and dont have pppd
> > > > > facility in target.
> > > > > 
> > > > > Let me know the way to do the same with socket program , or else is
> > > > > there any way to capture packets after PPP stack and then transmit the
> > > > > same through serail link.
> > > > > 
> > > > > Ravi 
> > > > > 
> > > > > 
> > > > > _______________________________________________
> > > > > General
> > > > > http://community.qnx.com/sf/go/post11781
> > > > 
> > > > 
> > > 
> > > 
>...