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.

Regards

Marcel


_______________________________________________
connman mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/connman

Reply via email to