Hi Cathy,
> >>>>>> The Connman is V0.5. I'm sure there are several bluetooth devices
> >>>>>> around by "hcitool scan". I tried to scan the bluetooth devices
> >>>>>> around by device.ProposeScan(), but failed to list any when call
> >>>>>> GetProperties() of Bluetooth Network interface.
> >>>>>>
> >>>>>> I want to confirm with you that is the proper way to detect
> >>>>>> bluetooth device around and set up PAN connection with other
> >>>>>> bluetooth device is similar to WiFi connection as below:
> >>>>>> 1. Scan and get bluetooth devices around (may show bdaddr to
> >>>>>> user)
> >>>>>
> >>>>> in the Bluetooth case you can't just do the scanning like this.
> >>>>> You have to setup the device via BlueZ first. Then it will list
> >>>>> it. So you would have to use CreateDevice or CreatePairedDevice
> >>>>> from BlueZ to make the device available to ConnMan. Either use
> >>>>> bluetooth-wizard or test-device from the BlueZ test scripts for
> >>>>> this.
> >>>>>
> >>>>
> >>>> So connman can enable/disable bluetooth device, get IP address for
> >>>> NAP and GN automatically, set static IP address for PAN, and show
> >>>> the connection status of bluetooth to user. Scan and connection to
> >>>> remote device should be done by bluez itself, right?
> >>>
> >>> scanning for remote device and setting them up has to be done by
> >>> BlueZ since that task is kinda complex.
> >>>
> >>> After that ConnMan can detect new PAN capable devices from BlueZ.
> >>> You can use ConnMan to connect these PAN devices (mostly NAP) and
> >>> run DHCP to retrieve and set IP configuration. Once it is
> >>> connected, then ConnMan will give you status about the connection
> >>> itself and the assigned IP details etc.
> >>
> >> I'm trying to set up PAN between two bluetooth devices with BlueZ
> >> 4.22.
> >> Method 1:
> >> 1. At server side, run "pand -n -s -M -r PANU"
> >> 2. At client side, run "pand -n -r PANU -c <server's bdaddr>", but
> >> get error information "pand[3757]: Connect to 00:0a:94:03:1f:bc
> >> failed. Connection refused(111)" Even input "0000" as PIN code when
> >> test-agentdialog pop up.
> >> Method 2:
> >> 1. Launch bluetooth-wizard in bluez-gnome-1.8 package, and run step
> >> by step
> >> 2. can get the final "successfully connect" dialogue.
> >> Method 3:
> >> 1. call "test-device create <server's bdaddr>" in bluez package
> >> 2. call "list-devices" can list the connected network
> >>
> >> I set IP address for bluetooth PAN interface by "ifconfig pan0
> >> 10.0.0.1", and set server's IP to 10.0.0.4, but fail to ping with
> >> each other.
> >> Call list-connections in connman's test folder, still fail to list
> >> any bluetooth PAN connections
> >
> > why are you messing around with pand and the pan0 bridge. Both is
> > plain wrong. The pan0 bridge is for incoming PAN connections. It has
> > nothing do with ConnMan. Also using pand is wrong. Don't mess around
> > with low-level stuff if you wanna test ConnMan. All Bluetooth
> > connections have to be established via ConnMan. Otherwise it is going
> > to ignore them.
> >
> > To make this simpler for you, I put {connect,disconnect}-network test
> > scripts into the repository. They take the Name property or path of a
> > network (from list-networks for example) as argument and will then try
> > to connect this network.
> >
> > I used MacOS connection sharing for testing, but for some reason it
> > refuses to hand out IP addresses via DHCP. Haven't had time to check
> > with one of my phones.
>
> I tried the bluetooth-wizard in bluez-gnome-1.8 to connect local bluetooth
> device with another one, and connected successfully. But when I run the
> script "./test/connect-network dev_00_xx_xx_xx_xx_xx", got the error
> information as below:
>
> Connecting: /hci0/dev_00_xx_xx_xx_xx_xx
> Traceback (most recent call last):
> File "./connect-network", line 43, in <module>
> network.Connect()
> File "var/lib/python-support/python2.5/dbus/proxies.py", line 140, in
> __call__
> ** keywords)
> File "var/lib/python-support/python2.5/dbus/connection.py", line 607, in
> call_blocking
> message, timeout)
> Dbus.exceptions.DBusException: org.moblin.connman.Error.Failed:
>
> When try test-device in bluez-4.22, got the same result.
> The dev_00_xx_xx_xx_xx_xx is the bluetooth dungle on my desktop.
>
> So still fail to connect to other bluetooth device, any comments?
if the remote device is not PAN capable, it will fail. Check the debug
output of ConnMan and also run "hcidump -X -V" to see what the Bluetooth
stack is actually doing.
Regards
Marcel
_______________________________________________
connman mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/connman