How to disable authentication when using bluetooth on Linux?

chen chong
2008-10-07T06:55:30Z

Hi, all

When pushing a file to bluetooth mobile phone from a Linux PC, how to
disable bluetooth authentication mechanism (in kernel or user level ?
), so that the phone won't prompt a window ask for PIN code?

I'm a freshman on bluez, now I'm trying to write an application on
Linux PC, to send files to mobile phones with OBEX. The PC has a USB
bluetooth stick to communication with the phone.

Now I have successfully sent a file to phone using the following commands:
1. "hcitool scan" and "sdptool browse"
2. "passkey-agent --default 1234" and "ussp-push --dev 0
BTADDR@CHANNEL desk.jpg desk.jpg"

but the phone ask for a PIN code at the start.

To get rid of this, I had tried to comment out
"start_security_manager()" in bluez-utils-3.7/hcid/main.c, and
recompile it, then restart the bluetooth service. But PIN code was
still prompted, and after if I input some characters, the command
"ussp-push --dev 0 --debug BTADDR@CHANNEL desk.jpg desk.jpg", failed
with the following error:

root@debian:~/bluetooth# pushing file desk.jpg