This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Protocol Stack

Hi!

can any one explain me what is mean of protocol stack?

Regards

Parents Reply Children
  • First -- can you buy the code you need? There are companies that do nothing but sell code for popular protocol stacks.

    Really common protocols (say, TCP/IP) you can often get for free. Consider whether the GPL is an issue for your project.

    If you have to write it from scratch, then you're going to need the specifications for the protocols in question. (I don't think you've yet mentioned exactly which ones you need.) Since standards are often written in a fairly hard-to-understand manner, you might also want a book that describes the protocols in question.

    Protocols generally are defined in layers, which tend to make natural points for breaking up your code into modules and functions. Implementations for big iron often use threads or processes for each layer, but I think for an 8051 it would be better to keep it simple, and just make function calls.

  • How could i generate the specifications, i only have two 8051 based boards and two RF(433MHz) Trancievers?

    All the information what i have is that ,i have to communicate 13 nodes(RF Transciever) with a computer for Data acquitation(Collection) and Control.

    Regards

  • Is it confidential or a business secret?

  • Do you mean to say the protocol is not specified as a requirement, but that you are free to choose any protocol that you like?

  • Or even that you intend to design your own protocol??

  • " i only have two 8051 based boards ... i have to communicate 13 nodes"

    How do you intend to support 13 nodes with only 2 boards?

    Do you mean the 13 nodes are all connected to one board, which aggregates the data and transmits it to the other?
    Or what?

  • Thanks for your immediate resoponse!

    Yes ,i have to develop it from scratch.

    i can choose any protocol.

    at the moment i am experimenting with two boards only(master and node),final design will have ,13 nodes communicating to a single master and then the master will communicate with the host computer and process the accquire data.

  • Master node is responsible for accquring/communicating data from nodes,while host computer is responsible for processing of data

  • "i have to develop it from scratch"

    Do you mean:

    (1). You have chosen an existing protocol specification, and want to implement it from scratch?

    (2). You are not using any existing protocol - you want to both design the protocol and implement it yourself from scratch?


    Given that this thread started with the question, "what is a protocol stack", I think (1) is somewhat ambitious and (2) is probably out of the question - especially for an RF protocol!

  • in my case option 2 is the right answer!

    "(2). You are not using any existing protocol - you want to both design the protocol and implement it yourself from scratch?"

  • And, as I said before, given that you needed to ask the question, "what is a protocol stack", I think you are biting off far more than you can chew!

    Even integrating a ready-made implementation into your own design is generally a non-trivial task - doing the whole thing from scratch with no prior experience is either extreme self-confidence or sheer folly!

    Good luck!

  • well, based on the sparse information he has provided so far, I think he does NOT need a protocol stack, just a protocol.

    Erik

  • Are all these nodes using a single RF channel? That is, that channel is a shared medium, so that you need some sort of media access control protocol to arbitrate access to the RF? Or do you have independent channels from each node to the master (which would need some sort of multi-channel transceiver to listen to all the channels at once)?

    For shared media, if you don't need high channel utilization, I'd recommend CSMA (assuming your receiver can supply the "busy" signal). If not, Aloha. That is, make sure all messages are acknowledge, and just transmit whenever they arrive. If you don't get an ack, retransmit.

    For addressing (logical link control), I'd consider just using the Ethernet frame format. Possibly changing the size of the addresses, as 48 bits is a lot for this application, and there's no interaction with an Ethernet. But you'll need the minimum concepts of that protocol: source and destination addresses, frame length, protocol type, and CRC.

    You might also consider RFC1549 (asynchronous HDLC) if you want a complete data link layer. PPP could also come in handy if your radio gear has special command sequences embedded in the data stream that you have to escape.

  • in my case option 2 is the right answer!

    "(2). You are not using any existing protocol - you want to both design the protocol and implement it yourself from scratch?"