Unetstack C API with Unetsim simulator












0














I am trying to run the C API for Unetstack. I have been trying to run the test code here.



I am running 3-node-network.groovy from the unetsim-1.4 sample code in my terminal to use as my modem network. I am using unetsim-1.4a for linux for my simulator.



This is how I call the test code:



make IP="127.0.0.1" ADDR=1 test


The test code is able to open the modem, but is not able to send packets through.
This is the error I end up getting:



Packet transmission: FAILED
Packet transmission: FAILED

Segmentation fault (core dumped)


and I do not see any received packets on my simulator shell.



When I run the 3-node-network.groovy simulation with the Python API, everything works fine, and I can see packets being received on my simulator shell.



How should I set up the environment to run the Unetstack C API test code to transmit and receive through a simulated modem network on unetsim?










share|improve this question



























    0














    I am trying to run the C API for Unetstack. I have been trying to run the test code here.



    I am running 3-node-network.groovy from the unetsim-1.4 sample code in my terminal to use as my modem network. I am using unetsim-1.4a for linux for my simulator.



    This is how I call the test code:



    make IP="127.0.0.1" ADDR=1 test


    The test code is able to open the modem, but is not able to send packets through.
    This is the error I end up getting:



    Packet transmission: FAILED
    Packet transmission: FAILED

    Segmentation fault (core dumped)


    and I do not see any received packets on my simulator shell.



    When I run the 3-node-network.groovy simulation with the Python API, everything works fine, and I can see packets being received on my simulator shell.



    How should I set up the environment to run the Unetstack C API test code to transmit and receive through a simulated modem network on unetsim?










    share|improve this question

























      0












      0








      0







      I am trying to run the C API for Unetstack. I have been trying to run the test code here.



      I am running 3-node-network.groovy from the unetsim-1.4 sample code in my terminal to use as my modem network. I am using unetsim-1.4a for linux for my simulator.



      This is how I call the test code:



      make IP="127.0.0.1" ADDR=1 test


      The test code is able to open the modem, but is not able to send packets through.
      This is the error I end up getting:



      Packet transmission: FAILED
      Packet transmission: FAILED

      Segmentation fault (core dumped)


      and I do not see any received packets on my simulator shell.



      When I run the 3-node-network.groovy simulation with the Python API, everything works fine, and I can see packets being received on my simulator shell.



      How should I set up the environment to run the Unetstack C API test code to transmit and receive through a simulated modem network on unetsim?










      share|improve this question













      I am trying to run the C API for Unetstack. I have been trying to run the test code here.



      I am running 3-node-network.groovy from the unetsim-1.4 sample code in my terminal to use as my modem network. I am using unetsim-1.4a for linux for my simulator.



      This is how I call the test code:



      make IP="127.0.0.1" ADDR=1 test


      The test code is able to open the modem, but is not able to send packets through.
      This is the error I end up getting:



      Packet transmission: FAILED
      Packet transmission: FAILED

      Segmentation fault (core dumped)


      and I do not see any received packets on my simulator shell.



      When I run the 3-node-network.groovy simulation with the Python API, everything works fine, and I can see packets being received on my simulator shell.



      How should I set up the environment to run the Unetstack C API test code to transmit and receive through a simulated modem network on unetsim?







      unetstack






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 12 at 1:56









      user10638240

      1




      1
























          1 Answer
          1






          active

          oldest

          votes


















          2














          Follow the steps below to set up the environment to test basic modem operations using UnetStack C API with simulated modem network on unetsim :





          1. Run 3-node-network.groovy from unetsim-1.4 sample code which creates a simulation environment with 3 nodes deployed as shown below for example:



            bin/unet samples/rt/3-node-network.groovy



          2. Change the port number from 1100 to 1101 at this line in the code in your unet-contrib local repository.


          3. Set the destination address to 2 at this line.


          4. Set the carrier frequency to 25000 Hz at this line.


          5. Navigate to this folder in your unet-contrib local repository and perform the following steps:

            make c
            c/examples localhost



          You should be able to see successful transmissions from node 1 and corresponding receptions on node 2.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53255098%2funetstack-c-api-with-unetsim-simulator%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Follow the steps below to set up the environment to test basic modem operations using UnetStack C API with simulated modem network on unetsim :





            1. Run 3-node-network.groovy from unetsim-1.4 sample code which creates a simulation environment with 3 nodes deployed as shown below for example:



              bin/unet samples/rt/3-node-network.groovy



            2. Change the port number from 1100 to 1101 at this line in the code in your unet-contrib local repository.


            3. Set the destination address to 2 at this line.


            4. Set the carrier frequency to 25000 Hz at this line.


            5. Navigate to this folder in your unet-contrib local repository and perform the following steps:

              make c
              c/examples localhost



            You should be able to see successful transmissions from node 1 and corresponding receptions on node 2.






            share|improve this answer




























              2














              Follow the steps below to set up the environment to test basic modem operations using UnetStack C API with simulated modem network on unetsim :





              1. Run 3-node-network.groovy from unetsim-1.4 sample code which creates a simulation environment with 3 nodes deployed as shown below for example:



                bin/unet samples/rt/3-node-network.groovy



              2. Change the port number from 1100 to 1101 at this line in the code in your unet-contrib local repository.


              3. Set the destination address to 2 at this line.


              4. Set the carrier frequency to 25000 Hz at this line.


              5. Navigate to this folder in your unet-contrib local repository and perform the following steps:

                make c
                c/examples localhost



              You should be able to see successful transmissions from node 1 and corresponding receptions on node 2.






              share|improve this answer


























                2












                2








                2






                Follow the steps below to set up the environment to test basic modem operations using UnetStack C API with simulated modem network on unetsim :





                1. Run 3-node-network.groovy from unetsim-1.4 sample code which creates a simulation environment with 3 nodes deployed as shown below for example:



                  bin/unet samples/rt/3-node-network.groovy



                2. Change the port number from 1100 to 1101 at this line in the code in your unet-contrib local repository.


                3. Set the destination address to 2 at this line.


                4. Set the carrier frequency to 25000 Hz at this line.


                5. Navigate to this folder in your unet-contrib local repository and perform the following steps:

                  make c
                  c/examples localhost



                You should be able to see successful transmissions from node 1 and corresponding receptions on node 2.






                share|improve this answer














                Follow the steps below to set up the environment to test basic modem operations using UnetStack C API with simulated modem network on unetsim :





                1. Run 3-node-network.groovy from unetsim-1.4 sample code which creates a simulation environment with 3 nodes deployed as shown below for example:



                  bin/unet samples/rt/3-node-network.groovy



                2. Change the port number from 1100 to 1101 at this line in the code in your unet-contrib local repository.


                3. Set the destination address to 2 at this line.


                4. Set the carrier frequency to 25000 Hz at this line.


                5. Navigate to this folder in your unet-contrib local repository and perform the following steps:

                  make c
                  c/examples localhost



                You should be able to see successful transmissions from node 1 and corresponding receptions on node 2.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 12 at 7:12









                V-rund Puro-hit

                3,93582043




                3,93582043










                answered Nov 12 at 7:07









                Prasad Anjangi

                212




                212






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53255098%2funetstack-c-api-with-unetsim-simulator%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Florida Star v. B. J. F.

                    Danny Elfman

                    Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues