wifi p2p between ubuntu 14.04 and android












6















I attempted to make a wifi p2p connection between Ubuntu 14.04(kernel 3.13) and Android 4.4 Kitkat(Samsung Galaxy Note 2)



In Ubuntu

I use wpa_supplicant v2.1 which is built in to Ubuntu 14.04(/sbin/wpa_supplicant) and Netis WF2120 wifi dongle(rtl8192cu chipset).
Ubuntu is group owner.



The following is my execute sequence in Ubuntu.




  1. After Ubuntu was booted, I allocate an IP address(192.168.22.1) to wlan2 interface to use p2p(Netis wifi dongle).


  2. Run dhcpd wlan2 command


  3. Run wpa_cli command to connect wpa_supplicant, which runs in boot time (meaning I did not run wpa_supplicant myself)


  4. Run p2p_group_add command in wpa_cli prompt


  5. Generate new wps pin number using wps_pin any command



Then wait for Android peer connection




In Android




  1. Run built in wifi direct app and find peer, then find Ubuntu peer without problems.


  2. Connect to Ubuntu peer with pin number which is generated by the wps_pin any command



Then connect to Ubuntu without any issues.
I confirm that Android has received the IP address(192.168.22.100) from Ubuntu's dhcpd,
so ping test is also normal.



The problem is Ubuntu and Android are connected to each other, but then after a few seconds(within 10s), Android's wifi turns off automatically and wifi p2p is disconnected.



I think problem is in Ubuntu.



So I was ran wpa_supplicant directly with my config file.



ctrl_interface=/var/run/wpa_supplicant
device_name=testest
device_type=1-0050F204-1
p2p_go_intent=15


and then I ran this next command



wpa_supplicant -Dnl80211 -c <config file path> -i wlan2 -dt


But the result is the same.



Is there any problem in my configuration?
Or any other problem?










share|improve this question













migrated from stackoverflow.com Jun 10 '14 at 14:14


This question came from our site for professional and enthusiast programmers.














  • 1





    hardware/OS, not SW

    – KevinDTimm
    Jun 10 '14 at 12:48











  • Hi, this is a long shot, but do you have any update? I'm trying to basically do the same thing.

    – broody
    Oct 30 '15 at 5:35
















6















I attempted to make a wifi p2p connection between Ubuntu 14.04(kernel 3.13) and Android 4.4 Kitkat(Samsung Galaxy Note 2)



In Ubuntu

I use wpa_supplicant v2.1 which is built in to Ubuntu 14.04(/sbin/wpa_supplicant) and Netis WF2120 wifi dongle(rtl8192cu chipset).
Ubuntu is group owner.



The following is my execute sequence in Ubuntu.




  1. After Ubuntu was booted, I allocate an IP address(192.168.22.1) to wlan2 interface to use p2p(Netis wifi dongle).


  2. Run dhcpd wlan2 command


  3. Run wpa_cli command to connect wpa_supplicant, which runs in boot time (meaning I did not run wpa_supplicant myself)


  4. Run p2p_group_add command in wpa_cli prompt


  5. Generate new wps pin number using wps_pin any command



Then wait for Android peer connection




In Android




  1. Run built in wifi direct app and find peer, then find Ubuntu peer without problems.


  2. Connect to Ubuntu peer with pin number which is generated by the wps_pin any command



Then connect to Ubuntu without any issues.
I confirm that Android has received the IP address(192.168.22.100) from Ubuntu's dhcpd,
so ping test is also normal.



The problem is Ubuntu and Android are connected to each other, but then after a few seconds(within 10s), Android's wifi turns off automatically and wifi p2p is disconnected.



I think problem is in Ubuntu.



So I was ran wpa_supplicant directly with my config file.



ctrl_interface=/var/run/wpa_supplicant
device_name=testest
device_type=1-0050F204-1
p2p_go_intent=15


and then I ran this next command



wpa_supplicant -Dnl80211 -c <config file path> -i wlan2 -dt


But the result is the same.



Is there any problem in my configuration?
Or any other problem?










share|improve this question













migrated from stackoverflow.com Jun 10 '14 at 14:14


This question came from our site for professional and enthusiast programmers.














  • 1





    hardware/OS, not SW

    – KevinDTimm
    Jun 10 '14 at 12:48











  • Hi, this is a long shot, but do you have any update? I'm trying to basically do the same thing.

    – broody
    Oct 30 '15 at 5:35














6












6








6








I attempted to make a wifi p2p connection between Ubuntu 14.04(kernel 3.13) and Android 4.4 Kitkat(Samsung Galaxy Note 2)



In Ubuntu

I use wpa_supplicant v2.1 which is built in to Ubuntu 14.04(/sbin/wpa_supplicant) and Netis WF2120 wifi dongle(rtl8192cu chipset).
Ubuntu is group owner.



The following is my execute sequence in Ubuntu.




  1. After Ubuntu was booted, I allocate an IP address(192.168.22.1) to wlan2 interface to use p2p(Netis wifi dongle).


  2. Run dhcpd wlan2 command


  3. Run wpa_cli command to connect wpa_supplicant, which runs in boot time (meaning I did not run wpa_supplicant myself)


  4. Run p2p_group_add command in wpa_cli prompt


  5. Generate new wps pin number using wps_pin any command



Then wait for Android peer connection




In Android




  1. Run built in wifi direct app and find peer, then find Ubuntu peer without problems.


  2. Connect to Ubuntu peer with pin number which is generated by the wps_pin any command



Then connect to Ubuntu without any issues.
I confirm that Android has received the IP address(192.168.22.100) from Ubuntu's dhcpd,
so ping test is also normal.



The problem is Ubuntu and Android are connected to each other, but then after a few seconds(within 10s), Android's wifi turns off automatically and wifi p2p is disconnected.



I think problem is in Ubuntu.



So I was ran wpa_supplicant directly with my config file.



ctrl_interface=/var/run/wpa_supplicant
device_name=testest
device_type=1-0050F204-1
p2p_go_intent=15


and then I ran this next command



wpa_supplicant -Dnl80211 -c <config file path> -i wlan2 -dt


But the result is the same.



Is there any problem in my configuration?
Or any other problem?










share|improve this question














I attempted to make a wifi p2p connection between Ubuntu 14.04(kernel 3.13) and Android 4.4 Kitkat(Samsung Galaxy Note 2)



In Ubuntu

I use wpa_supplicant v2.1 which is built in to Ubuntu 14.04(/sbin/wpa_supplicant) and Netis WF2120 wifi dongle(rtl8192cu chipset).
Ubuntu is group owner.



The following is my execute sequence in Ubuntu.




  1. After Ubuntu was booted, I allocate an IP address(192.168.22.1) to wlan2 interface to use p2p(Netis wifi dongle).


  2. Run dhcpd wlan2 command


  3. Run wpa_cli command to connect wpa_supplicant, which runs in boot time (meaning I did not run wpa_supplicant myself)


  4. Run p2p_group_add command in wpa_cli prompt


  5. Generate new wps pin number using wps_pin any command



Then wait for Android peer connection




In Android




  1. Run built in wifi direct app and find peer, then find Ubuntu peer without problems.


  2. Connect to Ubuntu peer with pin number which is generated by the wps_pin any command



Then connect to Ubuntu without any issues.
I confirm that Android has received the IP address(192.168.22.100) from Ubuntu's dhcpd,
so ping test is also normal.



The problem is Ubuntu and Android are connected to each other, but then after a few seconds(within 10s), Android's wifi turns off automatically and wifi p2p is disconnected.



I think problem is in Ubuntu.



So I was ran wpa_supplicant directly with my config file.



ctrl_interface=/var/run/wpa_supplicant
device_name=testest
device_type=1-0050F204-1
p2p_go_intent=15


and then I ran this next command



wpa_supplicant -Dnl80211 -c <config file path> -i wlan2 -dt


But the result is the same.



Is there any problem in my configuration?
Or any other problem?







android linux ubuntu






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 10 '14 at 12:45







user3725258











migrated from stackoverflow.com Jun 10 '14 at 14:14


This question came from our site for professional and enthusiast programmers.









migrated from stackoverflow.com Jun 10 '14 at 14:14


This question came from our site for professional and enthusiast programmers.










  • 1





    hardware/OS, not SW

    – KevinDTimm
    Jun 10 '14 at 12:48











  • Hi, this is a long shot, but do you have any update? I'm trying to basically do the same thing.

    – broody
    Oct 30 '15 at 5:35














  • 1





    hardware/OS, not SW

    – KevinDTimm
    Jun 10 '14 at 12:48











  • Hi, this is a long shot, but do you have any update? I'm trying to basically do the same thing.

    – broody
    Oct 30 '15 at 5:35








1




1





hardware/OS, not SW

– KevinDTimm
Jun 10 '14 at 12:48





hardware/OS, not SW

– KevinDTimm
Jun 10 '14 at 12:48













Hi, this is a long shot, but do you have any update? I'm trying to basically do the same thing.

– broody
Oct 30 '15 at 5:35





Hi, this is a long shot, but do you have any update? I'm trying to basically do the same thing.

– broody
Oct 30 '15 at 5:35










2 Answers
2






active

oldest

votes


















0














The group needs to be created as a persistent group so that your connection doesn't drop. You should be able to do that in the autonomous GO scenario with
p2p_group_add persistent.



In the negotiated GO scenario try:



p2p_connect <peer device address> <pbc|pin|PIN#|p2ps> [display|keypad|p2ps] persistent go_intent=15



See the wpa_supplicant README-P2P for further details:
https://w1.fi/cgit/hostap/plain/wpa_supplicant/README-P2P.






share|improve this answer































    -1














    ctrl_interface=/var/run/wpa_supplicant


    ANDRODID DOES NOT HAVE VAR folder !!



    I am not an expert but by looking at my widip2p.conf file i can tell you that you need to choose wlan0 or 1.
    to find it,



    iw list


    also verify that your driver supports p2p mode by using IW list.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      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%2fsuperuser.com%2fquestions%2f766950%2fwifi-p2p-between-ubuntu-14-04-and-android%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown
























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      The group needs to be created as a persistent group so that your connection doesn't drop. You should be able to do that in the autonomous GO scenario with
      p2p_group_add persistent.



      In the negotiated GO scenario try:



      p2p_connect <peer device address> <pbc|pin|PIN#|p2ps> [display|keypad|p2ps] persistent go_intent=15



      See the wpa_supplicant README-P2P for further details:
      https://w1.fi/cgit/hostap/plain/wpa_supplicant/README-P2P.






      share|improve this answer




























        0














        The group needs to be created as a persistent group so that your connection doesn't drop. You should be able to do that in the autonomous GO scenario with
        p2p_group_add persistent.



        In the negotiated GO scenario try:



        p2p_connect <peer device address> <pbc|pin|PIN#|p2ps> [display|keypad|p2ps] persistent go_intent=15



        See the wpa_supplicant README-P2P for further details:
        https://w1.fi/cgit/hostap/plain/wpa_supplicant/README-P2P.






        share|improve this answer


























          0












          0








          0







          The group needs to be created as a persistent group so that your connection doesn't drop. You should be able to do that in the autonomous GO scenario with
          p2p_group_add persistent.



          In the negotiated GO scenario try:



          p2p_connect <peer device address> <pbc|pin|PIN#|p2ps> [display|keypad|p2ps] persistent go_intent=15



          See the wpa_supplicant README-P2P for further details:
          https://w1.fi/cgit/hostap/plain/wpa_supplicant/README-P2P.






          share|improve this answer













          The group needs to be created as a persistent group so that your connection doesn't drop. You should be able to do that in the autonomous GO scenario with
          p2p_group_add persistent.



          In the negotiated GO scenario try:



          p2p_connect <peer device address> <pbc|pin|PIN#|p2ps> [display|keypad|p2ps] persistent go_intent=15



          See the wpa_supplicant README-P2P for further details:
          https://w1.fi/cgit/hostap/plain/wpa_supplicant/README-P2P.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 9 at 23:26









          MohyddinMohyddin

          12




          12

























              -1














              ctrl_interface=/var/run/wpa_supplicant


              ANDRODID DOES NOT HAVE VAR folder !!



              I am not an expert but by looking at my widip2p.conf file i can tell you that you need to choose wlan0 or 1.
              to find it,



              iw list


              also verify that your driver supports p2p mode by using IW list.






              share|improve this answer




























                -1














                ctrl_interface=/var/run/wpa_supplicant


                ANDRODID DOES NOT HAVE VAR folder !!



                I am not an expert but by looking at my widip2p.conf file i can tell you that you need to choose wlan0 or 1.
                to find it,



                iw list


                also verify that your driver supports p2p mode by using IW list.






                share|improve this answer


























                  -1












                  -1








                  -1







                  ctrl_interface=/var/run/wpa_supplicant


                  ANDRODID DOES NOT HAVE VAR folder !!



                  I am not an expert but by looking at my widip2p.conf file i can tell you that you need to choose wlan0 or 1.
                  to find it,



                  iw list


                  also verify that your driver supports p2p mode by using IW list.






                  share|improve this answer













                  ctrl_interface=/var/run/wpa_supplicant


                  ANDRODID DOES NOT HAVE VAR folder !!



                  I am not an expert but by looking at my widip2p.conf file i can tell you that you need to choose wlan0 or 1.
                  to find it,



                  iw list


                  also verify that your driver supports p2p mode by using IW list.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 17 '15 at 4:27









                  CyrusCyrus

                  1




                  1






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • 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%2fsuperuser.com%2fquestions%2f766950%2fwifi-p2p-between-ubuntu-14-04-and-android%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

                      flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                      Mangá

                       ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕