public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Cigol C" <linuxppp@indiainfo.com>
To: cfowler@outpostsentinel.com, rwhite@casabyte.com
Cc: EdV@macrolink.com, "'Linux PPP'" <linuxppp@indiainfo.com>,
	linux-serial@vger.kernel.org,
	"'linux-kernel'" <linux-kernel@vger.kernel.org>
Subject: RE: RS485 communication
Date: Mon, 17 Mar 2003 11:11:52 +0530	[thread overview]
Message-ID: <20030317054152.7512.qmail@indiainfo.com> (raw)


Thannks for the info. Can i acheive IP over RS485 if i use SOCK_PACKET. I need some more info on this if u could provide that. If this option is set in the socket call will i have an option the choose the hardware interface.

----- Original Message ----- 
From: Chris Fowler 
Date: 15 Mar 2003 10:42:53 -0500 
To: Robert White 
Subject: RE: RS485 communication 

> I think using SOCK_PACKET an an ethernet chip may be the best choice. 
> You can use IP or you can use RWP (Rober White Protocol). 
> 
> 
> On Sat, 2003-03-15 at 03:07, Robert White wrote: 
> > Yes, that, but that is only part of it. 
> > 
> > The RS485 is a proper bus, so this custom program (or programs) will have to 
> > act as full bus arbiters and a kind of router. Each PPP daemon must receive 
> > ONLY the data that its peer daemon transmits. That means that each slave 
> > must know to ignore the data not destined for it. Further, the master, 
> > which would have multiple PPP instances running on it, will need to decide 
> > which of those instances get which of the receiving bytes. 
> > 
> > So just like an Ethernet transceiver puts a protocol frame around the data 
> > to get it to the destination, the transport program will have to put 
> > envelopes around the data. THEN the master transport program will tell each 
> > slave when and how many of its envelopes it may send. The only way that can 
> > work (because there is no "ring" you can't pass a "token") is for the master 
> > to ask each slave in turn: "Got anything to send?" 
> > 
> > This usually devolves to a sequence of "#1, say your piece", "#2 say your 
> > piece" etc. That is a very bad performance model. 
> > 
> > So every frame of data will need to be arbitrarily wide, meaning a length 
> > code, and will need an in-multiplexor address. 
> > 
> > So the master, for instance, will say "slave 1, go". The slave 1 will send 
> > a packet (not necessarily a PPP packet, as the multiplexor will have 
> > overhead data etc.) 
> > 
> > The master will look at the address and decide which local pty the data is 
> > for and send it there. (Think a simple byte pump here) 
> > 
> > When that pty has response data, and when the master says "slave 0 (e.g. me) 
> > go" it will frame a message that slave #1 will receive and put through to 
> > its local pty. Slave 1 also has the job of ignoring data for slaves 2 
> > through N and the Master (Slave 0). 
> > 
> > In short, he has to write a distributed application that pumps data into and 
> > out of a broadcast medium, and makes sure that each participant gets only 
> > the data intended for itself. (This is what both the Ethernet hardware 
> > layer, and the IP protocols do.) 
> > 
> > In communications you almost always put protocols inside of protocols to 
> > some significant depth. 
> > 
> > For instance, when you play Unreal Tournament 2003: 
> > Unreal Tournament's data is carried by UDP, 
> > The UDP is carried by IP, 
> > The IP is carried by the Ethernet hardware access layer (raw Ethernet), 
> > Those packets may go to your cable modem which either wraps the Ethernet 
> > hardware packets or decodes them and reencodes the IP into whatever it 
> > does. 
> > 
> > >From there, if your cable modem is doing PPPoE there are even more layers. 
> > 
> > This guy will only have to write a multiplexing layer, but it won't be fun. 
> > 
> > Then again, the Ethernet people have done all that, which is why it is 
> > cheaper and easier to just get the Ethernet hardware and use it. 
> > 
> > Rob. 
> > 
> > -----Original Message----- 
> > From: Chris Fowler [mailto:cfowler@outpostsentinel.com] 
> > Sent: Thursday, March 13, 2003 3:31 PM 
> > To: Robert White 
> > Cc: Ed Vance; 'Linux PPP'; linux-serial@vger.kernel.org; 'linux-kernel' 
> > Subject: RE: RS485 communication 
> > 
> > 
> > Are you saying that for him to to use PPPD that he will have to write a 
> > program that will run on a master and tell all the slave nodes when they 
> > can transmit their data. In this case it would be ppp data. Hopfully 
> > in block sizes that are at least the size of the MTU ppp is running. 
> > 
> > Chris 
> > 
> 
> 
> - 
> To unsubscribe from this list: send the line "unsubscribe linux-serial" in 
> the body of a message to majordomo@vger.kernel.org 
> More majordomo info at http://vger.kernel.org/majordomo-info.html 
-- 
______________________________________________
http://www.indiainfo.com
Now with POP3/SMTP access for only US$14.95/yr

Powered by Outblaze

             reply	other threads:[~2003-03-17  5:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-17  5:41 Cigol C [this message]
2003-03-20 23:09 ` RS485 communication Robert White
2003-03-20 23:17   ` Chris Fowler
2003-03-21  2:48     ` Robert White
     [not found] <20030324143723.11625.qmail@indiainfo.com>
2003-03-24 16:41 ` Joachim Franek
  -- strict thread matches above, loose matches on Subject: below --
2003-03-24 11:43 Cigol C
2003-03-25  3:23 ` Paul Mackerras
2003-03-13 16:56 RS485 communicatio Ed Vance
2003-03-13 22:54 ` RS485 communication Robert White
2003-03-13 23:30   ` Chris Fowler
2003-03-15  8:07     ` Robert White
2003-03-15 15:42       ` Chris Fowler
2003-03-15 12:46     ` David Woodhouse
2003-03-16  0:56       ` Alan Cox
2003-03-16 10:05         ` David Woodhouse
2003-03-16 10:35           ` Russell King
2003-03-16 10:51             ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030317054152.7512.qmail@indiainfo.com \
    --to=linuxppp@indiainfo.com \
    --cc=EdV@macrolink.com \
    --cc=cfowler@outpostsentinel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=rwhite@casabyte.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox