Unable to connect to PAN bluetooth access point












1















I'm currently trying to implement a PAN connection over bluetooth between two boards.



The first board is a Raspberry Pi Zero and the second a custom one based on Atmel Sama5d2.

Boards are respectively running Linux 4.9.75+ and Linux 4.9.30 and using BlueZ v5.43 and BlueZ v5.46.



I'm able to connect to my phone's tethered bluetooth connection with both boards using bt-panscript.



Here is the trace of a connection to my phone's tethered connection



# bt-pan --debug client 60:45:CB:2F:C6:4C --wait
DEBUG:root:Using local device (addr: B8:27:EB:20:54:45): /org/bluez/hci0
DEBUG:root:Using remote device (addr: 60:45:CB:2F:C6:4C): /org/bluez/hci0/dev_60_45_CB_2F_C6_4C
DEBUG:root:Connected to network (dev_remote: /org/bluez/hci0/dev_60_45_CB_2F_C6_4C, addr: 60:45:CB:2F:C6:4C) uuid 'nap' with iface: bnep0


Here is what I have done so far (using rpi as client and custom board as server) :



Boards are paired



Server side



[bluetooth]# paired-devices
Device B8:27:EB:20:54:45 raspberrypi[/code]


Client side



[bluetooth]# paired-devices
Device 00:16:A4:0A:15:13 BlueZ 5.46


Setup bridge interface on server side



#brctl addbr bnep0
#brctl setfd bnep0 0
#brctl stp bnep0 off
#ip addr add 10.5.0.5/255.255.0.0 dev bnep0
#ip link set bnep0 up


Launch bt-pan script as server on server side



#bt-pan --debug server bnep0
DEBUG:root:Using local device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0
DEBUG:root:Registered uuid 'nap' with bridge/dev: bnep0 / 00:16:A4:0A:15:13


Launch bt-pan script as client on client side



# bt-pan --debug client 00:16:A4:0A:15:13 --wait
DEBUG:root:Using local device (addr: B8:27:EB:20:54:45): /org/bluez/hci0
DEBUG:root:Using remote device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0/dev_00_16_A4_0A_15_13
Traceback (most recent call last):
File "/usr/bin/bt-pan", line 238, in <module>
if __name__ == '__main__': sys.exit(main())
File "/usr/bin/bt-pan", line 210, in main
try: iface = net.Connect(opts.uuid)
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "s" on interface "org.bluez.Network1" doesn't exist


From what I understand, it seems that my bluetooth device doesn't export the method Connect for interface org.bluez.Network1



Does anybody knows why the network profile is not supported?

Is there a workaround to solve this error ?










share|improve this question





























    1















    I'm currently trying to implement a PAN connection over bluetooth between two boards.



    The first board is a Raspberry Pi Zero and the second a custom one based on Atmel Sama5d2.

    Boards are respectively running Linux 4.9.75+ and Linux 4.9.30 and using BlueZ v5.43 and BlueZ v5.46.



    I'm able to connect to my phone's tethered bluetooth connection with both boards using bt-panscript.



    Here is the trace of a connection to my phone's tethered connection



    # bt-pan --debug client 60:45:CB:2F:C6:4C --wait
    DEBUG:root:Using local device (addr: B8:27:EB:20:54:45): /org/bluez/hci0
    DEBUG:root:Using remote device (addr: 60:45:CB:2F:C6:4C): /org/bluez/hci0/dev_60_45_CB_2F_C6_4C
    DEBUG:root:Connected to network (dev_remote: /org/bluez/hci0/dev_60_45_CB_2F_C6_4C, addr: 60:45:CB:2F:C6:4C) uuid 'nap' with iface: bnep0


    Here is what I have done so far (using rpi as client and custom board as server) :



    Boards are paired



    Server side



    [bluetooth]# paired-devices
    Device B8:27:EB:20:54:45 raspberrypi[/code]


    Client side



    [bluetooth]# paired-devices
    Device 00:16:A4:0A:15:13 BlueZ 5.46


    Setup bridge interface on server side



    #brctl addbr bnep0
    #brctl setfd bnep0 0
    #brctl stp bnep0 off
    #ip addr add 10.5.0.5/255.255.0.0 dev bnep0
    #ip link set bnep0 up


    Launch bt-pan script as server on server side



    #bt-pan --debug server bnep0
    DEBUG:root:Using local device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0
    DEBUG:root:Registered uuid 'nap' with bridge/dev: bnep0 / 00:16:A4:0A:15:13


    Launch bt-pan script as client on client side



    # bt-pan --debug client 00:16:A4:0A:15:13 --wait
    DEBUG:root:Using local device (addr: B8:27:EB:20:54:45): /org/bluez/hci0
    DEBUG:root:Using remote device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0/dev_00_16_A4_0A_15_13
    Traceback (most recent call last):
    File "/usr/bin/bt-pan", line 238, in <module>
    if __name__ == '__main__': sys.exit(main())
    File "/usr/bin/bt-pan", line 210, in main
    try: iface = net.Connect(opts.uuid)
    File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
    File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
    dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "s" on interface "org.bluez.Network1" doesn't exist


    From what I understand, it seems that my bluetooth device doesn't export the method Connect for interface org.bluez.Network1



    Does anybody knows why the network profile is not supported?

    Is there a workaround to solve this error ?










    share|improve this question



























      1












      1








      1


      1






      I'm currently trying to implement a PAN connection over bluetooth between two boards.



      The first board is a Raspberry Pi Zero and the second a custom one based on Atmel Sama5d2.

      Boards are respectively running Linux 4.9.75+ and Linux 4.9.30 and using BlueZ v5.43 and BlueZ v5.46.



      I'm able to connect to my phone's tethered bluetooth connection with both boards using bt-panscript.



      Here is the trace of a connection to my phone's tethered connection



      # bt-pan --debug client 60:45:CB:2F:C6:4C --wait
      DEBUG:root:Using local device (addr: B8:27:EB:20:54:45): /org/bluez/hci0
      DEBUG:root:Using remote device (addr: 60:45:CB:2F:C6:4C): /org/bluez/hci0/dev_60_45_CB_2F_C6_4C
      DEBUG:root:Connected to network (dev_remote: /org/bluez/hci0/dev_60_45_CB_2F_C6_4C, addr: 60:45:CB:2F:C6:4C) uuid 'nap' with iface: bnep0


      Here is what I have done so far (using rpi as client and custom board as server) :



      Boards are paired



      Server side



      [bluetooth]# paired-devices
      Device B8:27:EB:20:54:45 raspberrypi[/code]


      Client side



      [bluetooth]# paired-devices
      Device 00:16:A4:0A:15:13 BlueZ 5.46


      Setup bridge interface on server side



      #brctl addbr bnep0
      #brctl setfd bnep0 0
      #brctl stp bnep0 off
      #ip addr add 10.5.0.5/255.255.0.0 dev bnep0
      #ip link set bnep0 up


      Launch bt-pan script as server on server side



      #bt-pan --debug server bnep0
      DEBUG:root:Using local device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0
      DEBUG:root:Registered uuid 'nap' with bridge/dev: bnep0 / 00:16:A4:0A:15:13


      Launch bt-pan script as client on client side



      # bt-pan --debug client 00:16:A4:0A:15:13 --wait
      DEBUG:root:Using local device (addr: B8:27:EB:20:54:45): /org/bluez/hci0
      DEBUG:root:Using remote device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0/dev_00_16_A4_0A_15_13
      Traceback (most recent call last):
      File "/usr/bin/bt-pan", line 238, in <module>
      if __name__ == '__main__': sys.exit(main())
      File "/usr/bin/bt-pan", line 210, in main
      try: iface = net.Connect(opts.uuid)
      File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
      **keywords)
      File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
      message, timeout)
      dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "s" on interface "org.bluez.Network1" doesn't exist


      From what I understand, it seems that my bluetooth device doesn't export the method Connect for interface org.bluez.Network1



      Does anybody knows why the network profile is not supported?

      Is there a workaround to solve this error ?










      share|improve this question
















      I'm currently trying to implement a PAN connection over bluetooth between two boards.



      The first board is a Raspberry Pi Zero and the second a custom one based on Atmel Sama5d2.

      Boards are respectively running Linux 4.9.75+ and Linux 4.9.30 and using BlueZ v5.43 and BlueZ v5.46.



      I'm able to connect to my phone's tethered bluetooth connection with both boards using bt-panscript.



      Here is the trace of a connection to my phone's tethered connection



      # bt-pan --debug client 60:45:CB:2F:C6:4C --wait
      DEBUG:root:Using local device (addr: B8:27:EB:20:54:45): /org/bluez/hci0
      DEBUG:root:Using remote device (addr: 60:45:CB:2F:C6:4C): /org/bluez/hci0/dev_60_45_CB_2F_C6_4C
      DEBUG:root:Connected to network (dev_remote: /org/bluez/hci0/dev_60_45_CB_2F_C6_4C, addr: 60:45:CB:2F:C6:4C) uuid 'nap' with iface: bnep0


      Here is what I have done so far (using rpi as client and custom board as server) :



      Boards are paired



      Server side



      [bluetooth]# paired-devices
      Device B8:27:EB:20:54:45 raspberrypi[/code]


      Client side



      [bluetooth]# paired-devices
      Device 00:16:A4:0A:15:13 BlueZ 5.46


      Setup bridge interface on server side



      #brctl addbr bnep0
      #brctl setfd bnep0 0
      #brctl stp bnep0 off
      #ip addr add 10.5.0.5/255.255.0.0 dev bnep0
      #ip link set bnep0 up


      Launch bt-pan script as server on server side



      #bt-pan --debug server bnep0
      DEBUG:root:Using local device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0
      DEBUG:root:Registered uuid 'nap' with bridge/dev: bnep0 / 00:16:A4:0A:15:13


      Launch bt-pan script as client on client side



      # bt-pan --debug client 00:16:A4:0A:15:13 --wait
      DEBUG:root:Using local device (addr: B8:27:EB:20:54:45): /org/bluez/hci0
      DEBUG:root:Using remote device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0/dev_00_16_A4_0A_15_13
      Traceback (most recent call last):
      File "/usr/bin/bt-pan", line 238, in <module>
      if __name__ == '__main__': sys.exit(main())
      File "/usr/bin/bt-pan", line 210, in main
      try: iface = net.Connect(opts.uuid)
      File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
      **keywords)
      File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
      message, timeout)
      dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "s" on interface "org.bluez.Network1" doesn't exist


      From what I understand, it seems that my bluetooth device doesn't export the method Connect for interface org.bluez.Network1



      Does anybody knows why the network profile is not supported?

      Is there a workaround to solve this error ?







      linux networking bluetooth






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 5 '18 at 12:04







      Arkaik

















      asked Feb 14 '18 at 12:57









      ArkaikArkaik

      373421




      373421






















          2 Answers
          2






          active

          oldest

          votes


















          1














          I finally found out what the problem was.



          There were two issues about what I have done :



          1. I shall pair AFTER enabling PAN on server side



          The PAN profile is created by the bt-pan script so if the PAN profile didn't exist when pairing was done, the client is not aware that the remote device has a PAN profile resulting in an error saying there is no Connect method on the remote interface.



          2. Client shall be trusted on server side



          The server only accept connection of trusted devices. If the server launched the pairing, the client is automatically trusted, however, if the pairing was initiated by the client, the client is not in the list of trusted devices on server side so it will not be accepted on connection, resulting in a Input/Output error.



          The server can either trust the client after it launched the pairing or it can launch the pairing itself.






          share|improve this answer































            0














            we have set up the same bt-pan server on RPi. Connected android mobile to this bt-apn server for internet access. Android gets connected over bluetooth, reveives ip but fails to access internet. Can anybody help why this is happening?





            share








            New contributor




            Bhagyashri Sarda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "106"
              };
              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: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              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%2funix.stackexchange.com%2fquestions%2f424122%2funable-to-connect-to-pan-bluetooth-access-point%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









              1














              I finally found out what the problem was.



              There were two issues about what I have done :



              1. I shall pair AFTER enabling PAN on server side



              The PAN profile is created by the bt-pan script so if the PAN profile didn't exist when pairing was done, the client is not aware that the remote device has a PAN profile resulting in an error saying there is no Connect method on the remote interface.



              2. Client shall be trusted on server side



              The server only accept connection of trusted devices. If the server launched the pairing, the client is automatically trusted, however, if the pairing was initiated by the client, the client is not in the list of trusted devices on server side so it will not be accepted on connection, resulting in a Input/Output error.



              The server can either trust the client after it launched the pairing or it can launch the pairing itself.






              share|improve this answer




























                1














                I finally found out what the problem was.



                There were two issues about what I have done :



                1. I shall pair AFTER enabling PAN on server side



                The PAN profile is created by the bt-pan script so if the PAN profile didn't exist when pairing was done, the client is not aware that the remote device has a PAN profile resulting in an error saying there is no Connect method on the remote interface.



                2. Client shall be trusted on server side



                The server only accept connection of trusted devices. If the server launched the pairing, the client is automatically trusted, however, if the pairing was initiated by the client, the client is not in the list of trusted devices on server side so it will not be accepted on connection, resulting in a Input/Output error.



                The server can either trust the client after it launched the pairing or it can launch the pairing itself.






                share|improve this answer


























                  1












                  1








                  1







                  I finally found out what the problem was.



                  There were two issues about what I have done :



                  1. I shall pair AFTER enabling PAN on server side



                  The PAN profile is created by the bt-pan script so if the PAN profile didn't exist when pairing was done, the client is not aware that the remote device has a PAN profile resulting in an error saying there is no Connect method on the remote interface.



                  2. Client shall be trusted on server side



                  The server only accept connection of trusted devices. If the server launched the pairing, the client is automatically trusted, however, if the pairing was initiated by the client, the client is not in the list of trusted devices on server side so it will not be accepted on connection, resulting in a Input/Output error.



                  The server can either trust the client after it launched the pairing or it can launch the pairing itself.






                  share|improve this answer













                  I finally found out what the problem was.



                  There were two issues about what I have done :



                  1. I shall pair AFTER enabling PAN on server side



                  The PAN profile is created by the bt-pan script so if the PAN profile didn't exist when pairing was done, the client is not aware that the remote device has a PAN profile resulting in an error saying there is no Connect method on the remote interface.



                  2. Client shall be trusted on server side



                  The server only accept connection of trusted devices. If the server launched the pairing, the client is automatically trusted, however, if the pairing was initiated by the client, the client is not in the list of trusted devices on server side so it will not be accepted on connection, resulting in a Input/Output error.



                  The server can either trust the client after it launched the pairing or it can launch the pairing itself.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jun 6 '18 at 9:37









                  ArkaikArkaik

                  373421




                  373421

























                      0














                      we have set up the same bt-pan server on RPi. Connected android mobile to this bt-apn server for internet access. Android gets connected over bluetooth, reveives ip but fails to access internet. Can anybody help why this is happening?





                      share








                      New contributor




                      Bhagyashri Sarda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.

























                        0














                        we have set up the same bt-pan server on RPi. Connected android mobile to this bt-apn server for internet access. Android gets connected over bluetooth, reveives ip but fails to access internet. Can anybody help why this is happening?





                        share








                        New contributor




                        Bhagyashri Sarda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.























                          0












                          0








                          0







                          we have set up the same bt-pan server on RPi. Connected android mobile to this bt-apn server for internet access. Android gets connected over bluetooth, reveives ip but fails to access internet. Can anybody help why this is happening?





                          share








                          New contributor




                          Bhagyashri Sarda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.










                          we have set up the same bt-pan server on RPi. Connected android mobile to this bt-apn server for internet access. Android gets connected over bluetooth, reveives ip but fails to access internet. Can anybody help why this is happening?






                          share








                          New contributor




                          Bhagyashri Sarda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.








                          share


                          share






                          New contributor




                          Bhagyashri Sarda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered 7 mins ago









                          Bhagyashri SardaBhagyashri Sarda

                          1




                          1




                          New contributor




                          Bhagyashri Sarda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          Bhagyashri Sarda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          Bhagyashri Sarda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • 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%2funix.stackexchange.com%2fquestions%2f424122%2funable-to-connect-to-pan-bluetooth-access-point%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

                              サソリ

                              広島県道265号伴広島線

                              Setup Asymptote in Texstudio