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

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

 



Thank you for answer.

I try to execute /bluez/test/test_network.
It also caused same problem.
The problem is that device is immediately "org.bluez.Device1 disconnect" after returning interface (bnep0) and signal ("org.bluez.network1 -> connected true"). 

<------------------------------ bluetooth daemon log -------------------------------->
bluetoothd[5041]: profiles/network/connection.c:connection_connect() id 4374
bluetoothd[5041]: src/adapter.c:connected_callback() hci0 device 12:23:34:45:4C:AB connected eir_len 7
bluetoothd[5041]: profiles/network/connection.c:bnep_conn_cb()
bluetoothd[5041]: bnep0 connected

Connected to 12:23:34:45:4C:AB service nap, interface bnep0
Press CTRL-C to disconnect

bluetoothd[5041]: src/adapter.c:dev_disconnected() Device 12:23:34:45:4C:AB disconnected, reason 3
bluetoothd[5041]: src/adapter.c:adapter_remove_connection()
bluetoothd[5041]: plugins/policy.c:disconnect_cb() reason 3
bluetoothd[5041]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 12:23:34:45:4C:AB type 0 status 0xe
bluetoothd[5041]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
bluetoothd[5041]: src/device.c:device_bonding_failed() status 14
bluetoothd[5041]: src/adapter.c:resume_discovery()
<------------------------------------------------------------------------------------------------------>


So, I try to execute /bluez/tools/bneptest. 
( ./bneptest -b bnep0 -n hci0  -c 12:23:34:45:4C:AB )
Then, I will command "dhclient bnep0". I can check the ping test well.

Why device is disconnected..?

Thank you:)
-HJ

------- Original Message -------
Sender : Luiz Augusto von Dentz<luiz.dentz@xxxxxxxxx>
Date : 2016-05-26 22:12 (GMT+09:00)
Title : Re: Why network PAN immediately disconnect to mobile phone after connecting?

Hi HJ,

On Thu, May 26, 2016 at 7:10 AM, 송형주 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ÿ淸º{.nÇ+돴윯돪†+%듚ÿ깁負¥Šwÿº{.nÇ+돴¥Š{깰¹nzÚ(¶â왲^n‡r⊆¦zË곷h솳鈺Ú&{àz요z받쀺+€Ê+zf"·hš닱~넮녬iÿÿï곴ÿ묎çz_溫æj:+v돣þ)山øm




[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