Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bluez i konfiguracja PINu z konsoli (/etc/*)
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Instalacja i sprzęt
View previous topic :: View next topic  
Author Message
m1k0
Apprentice
Apprentice


Joined: 27 Dec 2006
Posts: 180
Location: Radom/Poland

PostPosted: Fri Mar 20, 2009 11:52 pm    Post subject: Bluez i konfiguracja PINu z konsoli (/etc/*) Reply with quote

Zagrzebałem się. Mam KDE 4 a tu nie ma obsługi bluetooth-a (albo jest koszmarnie zwalony)
Popróbowałem powalczyć z konsoli ale jakoś nie potrafię skonfigurować PIN-a
W tutku piszą o jakimś nie do znalezienia programie passkey-agent

Mam w miarę najnowsze oprogramowanie
Code:
[I] net-wireless/bluez
     Available versions:  {M}(~)4.21 {M}(~)4.28 {M}(~)4.32 {alsa cups debug doc examples gstreamer old-daemons test-programs usb}
     Installed versions:  4.32(16:30:58 20.03.2009)(alsa cups gstreamer usb -debug -doc -old-daemons -test-programs)             
     Homepage:            http://bluez.sourceforge.net/                                                                         
     Description:         Bluetooth Tools and System Daemons for Linux                                                           



net-wireless/kdebluetooth4 z svn-a nie buduje mi się :(
Ale kiedyś udało mi się to skompilować
Code:
[U] net-wireless/kdebluetooth4
     Available versions:     
        (4.1)   (~)0.2[1] ~0.3[1]
        (0)     (~)0.2[2]       
        (4.2)   (~)0.3-r1[3] (~)0.3-r9999[3]
        (live)  (**)9999!t[2]               
        {debug kdeprefix}                   
     Installed versions:  0.3-r9999(4.2)[3](00:29:03 05.03.2009)(-kdeprefix)
     Homepage:            http://bluetooth.kmobiletools.org/               
     Description:         KDE Bluetooth Framework                           


Code:
laptok ~ # ls -1 /etc/bluetooth/
audio.conf                     
gen_pin                         
hcid.conf                       
input.conf                     
main.conf                       
network.conf                   
rfcomm.conf                     
laptok ~ # cat /etc/bluetooth/*
# Configuration file for the audio service

# This section contains options which are not specific to any
# particular interface                                       
[General]                                                   

# Switch to master role for incoming connections (defaults to true)
#Master=true                                                       

# If we want to disable support for specific services
# Defaults to supporting all implemented services   
#Disable=Control,Source                             

# SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
# Defaults to HCI                                                           
#SCORouting=PCM                                                             

# Headset interface specific options (i.e. options which affect how the audio
# service interacts with remote headset devices)                             
[Headset]                                                                   

# Set to true to support HFP (in addition to HSP only which is the default)
# Defaults to false                                                       
HFP=false                                                                 

# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
MaxConnections=1                                                       

# Just an example of potential config options for the other interfaces
#[A2DP]                                                               
#SBCSources=1                                                         
#MPEG12Sources=0                                                     
#!/bin/bash                                                           
# http://wiki.bluez.org/wiki/FAQ                                     
echo PIN:6150                                                         
#                                                                     
# HCI daemon configuration file.                                     
#                                                                     

# HCId options
options {     
        # Automatically initialize new devices
        autoinit yes;                         

        # Security Manager mode
        #   none - Security manager disabled
        #   auto - Use local PIN for incoming connections
        #   user - Always ask user for a PIN             
        #                                               
        security auto;                                   

        # Pairing mode
        #   none  - Pairing disabled
        #   multi - Allow pairing with already paired devices
        #   once  - Pair once and deny successive attempts   
        pairing multi;                                       

        # Default PIN code for incoming connections
        passkey "6150";                           
}                                                 

# Default settings for HCI devices
device {                         
        # Local device name       
        #   %d - device id       
        #   %h - host name       
        #name "BlueZ (%d)";       
        name "laptok"             

#To use the kbtobexsrv service, some other devices might require a modified class number for your bluetooth adapter in /etc/bluetooth/hcid.conf.
#Currently the class is set to 0x0. We suggest you change this to something like 0x100000 instead and restart BlueZ's hcid. The service will be activated anyway.                                                                                                                                                   

        # Local device class
        class 0x000100;     

        # Default packet type
        #pkt_type DH1,DM1,HV1;

        # Inquiry and Page scan
        iscan enable; pscan enable;

        # Default link mode
        #   none   - no specific policy
        #   accept - always accept incoming connections
        #   master - become master on incoming connections,
        #            deny role switch on outgoing connections
        lm accept;                                           

        # Default link policy
        #   none    - no specific policy
        #   rswitch - allow role switch
        #   hold    - allow hold mode   
        #   sniff   - allow sniff mode 
        #   park    - allow park mode   
        lp rswitch,hold,sniff,park;     
}                                       
# Configuration file for the input service

# This section contains options which are not specific to any
# particular interface                                       
[General]                                                   

# Set idle timeout (in minutes) before the connection will
# be disconnect (defaults to 0 for no timeout)           
#IdleTimeout=30                                           
[General]                                                 

# List of plugins that should not be loaded on bluetoothd startup
#DisablePlugins = network,input                                 

# Default adaper name
# %h - substituted for hostname
# %d - substituted for adapter id
Name = %h-%d                     

# Default device class. Only the major and minor device class bits are
# considered.                                                         
Class = 0x000100                                                     

# How long to stay in discoverable mode before going back to non-discoverable
# The value is in seconds. Default is 180, i.e. 3 minutes.                   
# 0 = disable timer, i.e. stay discoverable forever                         
DiscoverableTimeout = 0                                                     

# How long to stay in pairable mode before going back to non-discoverable
# The value is in seconds. Default is 0.                                 
# 0 = disable timer, i.e. stay pairable forever                         
PairableTimeout = 0                                                     

# Use some other page timeout than the controller default one
# which is 16384 (10 seconds).                               
PageTimeout = 8192                                           

# Discover scheduler interval used in Adapter.DiscoverDevices
# The value is in seconds. Defaults is 0 to use controller scheduler.
DiscoverSchedulerInterval = 0                                       

# What value should be assumed for the adapter Powered property when
# SetProperty(Powered, ...) hasn't been called yet. Defaults to true
InitiallyPowered = true                                             

# Remember the previously stored Powered state when initializing adapters
RememberPowered = true                                                   

# Use vendor, product and version information for DID profile support.
# The values are separated by ":" and VID, PID and version.           
#DeviceID = 1234:5678:abcd                                           

# Do reverse service discovery for previously unknown devices that connect to
# us. This option is really only needed for qualification since the BITE tester
# doesn't like us doing reverse SDP for some test cases (though there could in
# theory be other useful purposes for this too). Defaults to true.             
ReverseServiceDiscovery = true                                                 
# Configuration file for the network service                                   

# This section contains options which are not specific to any
# particular interface                                       
[General]                                                   

# Disable link encryption: default=false
#DisableSecurity=true                   

[PANU Role]

# Network interface name for PANU for connections. default:bnep%d
# (up to 16 characters)                                         
#Interface=                                                     

# PAN user connection interface up script. default:none
Script=avahi-autoipd                                   

[GN Role]

# Network Interface name for Group Network server. default:pan0
#Interface=                                                   

# Group Network connection interface up script. default:none
Script=avahi-autoipd                                       

[NAP Role]

# Network Interface name for Network Access Point server. default:pan1
#Interface=

# Network Access Point connection interface up script. default:none
Script=dhclient
#
# RFCOMM configuration file.
#

#rfcomm0 {
#       # Automatically bind the device at startup
#       bind no;
#
#       # Bluetooth address of the device
#       device 11:22:33:44:55:66;
#
#       # RFCOMM channel for the connection
#       channel 1;
#
#       # Description of the connection
#       comment "Example Bluetooth device";
#}

rfcomm0 {
        bind no;
        device 00:1E:DC:DA:C0:8C;
        channel 1;
        comment "M1K0 Pulsar";
}


Ok, dość tych ustawień.

Code:
laptok ~ # obexftp  -l /
Scanning for (null) ...
Found: 00:1E:DC:DA:C0:8C
Browsing 00:1E:DC:DA:C0:8C ...
Connecting...failed: connect
Tried to connect for 1235ms
The user may have rejected the transfer: Connection refused


laptok nawiązuje połączenie z telefonem, wpisuję mu 6150 i połączenie zostaje zerwane
Patrzałęm na dbus-monitor, ale on jakiejkolwiek komunikacji nie pokazuje...
_________________
MSI GX-70
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Instalacja i sprzęt All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum