LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-21-2015, 05:54 AM   #1
VertLim
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Rep: Reputation: Disabled
Question ppp over 868MHz transceiver, HDLC frame timing


Hi all,

I am currently trying to use ppp(d) over an 868MHz wireless transceiver, with a serial communication interface. I already setup everything and the ppp connection and ping echo/replies work. Nevertheless, when I am sending too big data (e.g. pings with big "payload"), I naturally run into problems. Here is how the radio module works:

- Incoming data from the kernel is going through the serial interface to the module and is saved there in an internal transmit buffer of size 240 bytes as long as new data comes in. The radio transmission is started as soon as there is no more incoming data on the serial for more than 2ms.

- So I would like to assure that the HDLC frames are at most of size 240 bytes to avoid a buffer overflow. I think, I can achieve this by setting the MTU and MRU of my ppp connection to 231 (240 bytes - 9 bytes maximum size of a HDLC frame). Does this work in general, assuming that I have IP fragmentation, segmentation offload, etc. all turned off?

- Finally, is there an option to tell ppp to introduce a small break (2ms) after each HDLC frame? I didn't find any option for that. In the worst case, would it be "easily" possible to alter the sources and introduce a small sleep after every HDLC frame? Maybe someone could point me to the right lines of code?

Many thanks for your help!
Thomas
 
Old 08-21-2015, 02:23 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,860

Rep: Reputation: 162Reputation: 162
You can use flow control to let the sender to stop sending.
 
Old 08-22-2015, 01:10 PM   #3
VertLim
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hey,

I guess you mean (hardware/software) flow control on the serial link, right? Should be an option and in fact I am already using it. Nevertheless, my radio module sometimes does not like it, if it gets too much data and it signals, that it is not able to receive forever.

In addition, a flow-control-only solution would result in HDLC frame fragmentation. As a result, if one radio packet is lost, possibly multiple HDLC frames are lost. I would prefer to really pack one HDLC frame in one radio packet.

Is there really no solution for adding a small waiting time (2ms) between each HDLC frame? And what do you think about the MTU of 231 bytes for the ppp connection? I read that the minimal IPv4 MTU normally is 576 bytes. Is this only something you should follow, or is something really not working if you have an MTU of 231?

Again, many thanks!
Thomas
 
Old 08-25-2015, 03:59 AM   #4
VertLim
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
... does really noone have a solution for inserting a small break (2ms) between each HDLC frame?

Thomas
 
Old 08-25-2015, 02:43 PM   #5
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,860

Rep: Reputation: 162Reputation: 162
Yes, 231 MTU is small but it is Ok.
You might need develop something yourself.
 
  


Reply

Tags
mtu, pppd, serial


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
etablish one connection ppp between a client ppp and a server ppp camilla261086 Linux - Server 2 07-20-2010 07:09 AM
HDLC support in LINUX dar_beh_dar Linux - Networking 1 09-23-2009 08:59 AM
HDLC and a way to use Bonding mattdyke Linux - Networking 0 11-16-2006 08:54 AM
how to start timing and print the timing result on portions of java codes ?? alred Programming 2 05-15-2006 10:00 AM
Frame Relay and HDLC Sync card vvlada Linux - Networking 5 03-31-2001 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration