Re: Why network PAN immediately disconnect to mobile phone after connecting?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi HJ,

On Thu, May 26, 2016 at 7:10 AM, 송형주 <hyungju.song@xxxxxxxxxxx> wrote:
> Hello,
> I wander the Network PAN api.
>
> I tested two cases to connect the bluetooth Network,
> Device A is paired Phone B. Phone is woring the NAP service.
>
> Test case 1 > I used the connmanctl.
>
> Paired the device A and phone by using the "bluetoothctl".
> Checking the pairedstatus is success.
>
> Then, I  call the dbus command to use command-line network manager api that is "  dbus-send --system --dest=net.connman --print-reply  /net/connman/service/bluetooth_000000000000_444444444444 net.connman.Service.Connect  "
>
> After sending the command, Device A is connected to Phone A.
> Bluetooth network connection is working well.
>

Next time use a pastebin like service or an attachment for HCI trace.

> Test case 2 > I used the bluez api.
>
> Paired the device A and phone by using the "bluetoothctl".
> Checking the pairedstatus is success.
>
> Then, I used to dbus command that is " dbus-send --system --dest=org.bluez --print-reply  /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx org.bluez.Network1.Connect string:"nap" ".
> After sending the command, i can receive  siganl  that network connect is true and return the bluetooth network interface "bnep0".
> But, immediately device is disconnected after connectiong network.
> Why network connection is not working when i used the bluez api.

It is actually quite simple, dbus-send disconnects from D-Bus once it
exit which will make bluetoothd to release the connection, if you want
the network to stay up you can use the following:

https://git.kernel.org/cgit/bluetooth/bluez.git/tree/test/test-network

-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux