jerzykiller Napisano Luty 1, 2007 Zgłoszenie Share Napisano Luty 1, 2007 Witam. Kupiłem dzisiaj D-Link'a DBT-122 i mam problemy z zainstalowaniem go pod fedorą core 6. Ściągnęłem: bluez-gnome bluez-libs bluez-utils. Kierował będę się tym poradnikiem: http://www.gentoo.org/doc/pl/bluetooth-guide.xml To fragmen konfiguracji kernala, który jak sądzę odpowiada za bluetootha: # OTsaaaBluetooth device drivers # CONFIG_BT_HCIUSB=m CONFIG_BT_HCIUSB_SCO=y CONFIG_BT_HCIUART=m CONFIG_BT_HCIUART_H4=y CONFIG_BT_HCIUART_BCSP=y CONFIG_BT_HCIBCM203X=m CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m CONFIG_BT_HCIDTL1=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBLUECARD=m CONFIG_BT_HCIBTUART=m CONFIG_BT_HCIVHCI=m CONFIG_IEEE80211=m # CONFIG_IEEE80211_DEBUG is not set CONFIG_IEEE80211_CRYPT_WEP=m CONFIG_IEEE80211_CRYPT_CCMP=m CONFIG_IEEE80211_CRYPT_TKIP=m CONFIG_IEEE80211_SOFTMAC=m CONFIG_IEEE80211_SOFTMAC_DEBUG=y CONFIG_TUX=m Sprawdzanie urządzeń bluetooth: [root@localhost ~]# cat /proc/bus/usb/devices | grep -e^[TPD] | grep -e Cls=e0 - B1 -A1 T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2001 ProdID=f111 Rev= 0.01 [root@localhost ~]# lsusb Bus 005 Device 001: ID 0000:0000 Bus 002 Device 002: ID 2001:f111 D-Link Corp. [hex] ... Teraz konfiguracja BlueZ i łącznie w pary PIN'ów. [root@localhost ~]# /etc/init.d/bluetooth start Uruchamianie usług Bluetooth: [ OK ] [root@localhost ~]# hciconfig hci0: Type: USB BD Address: 00:13:46:00:47:68 ACL MTU: 377:10 SCO MTU: 16:0 UP RUNNING PSCAN RX bytes:28632 acl:389 sco:0 events:984 errors:0 TX bytes:11904 acl:345 sco:0 commands:393 errors:0 Następnie plik /etc/bluetooth/hcid.conf trzeba zmienić. Standardowo wygląda tak: [root@localhost ~]# cat /etc/bluetooth/hcid.conf # # 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 user; # 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 "BlueZ"; } # Default settings for HCI devices device { # Local device name # %d - device id # %h - host name name "%h-%d"; # Local device class class 0x120104; # 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; } Wyedytowaniu go weług tutoriala wygląda tak: [root@localhost ~]# cat /etc/bluetooth/hcid.conf # # 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; pin_helper /etc/bluetooth/pin/helper; } # Default settings for HCI devices device { # Local device name # %d - device id # %h - host name name "siemens %h-%d"; # Local device class class 0x120104; # 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; } W poradniku można zauważyć: Uwaga: Możemy wybierać spośród różnych pomocników pin, zależnie od tego, którego chcemy używać. Dostępnymi pomocnikami pin są: /usr/lib/kdebluetooth/kbluepin (net-wireless/kdebluetooth), /usr/bin/bluepin lub /etc/bluetooth/pin-helper. Ściągnęłem kdebluetooth w rpm'ach i /usr/lib/kdebluetooth/kbluepin się pojawił. Teraz w /etc/bluetooth/pin trzeba zmienić PIN, ale ja nie mam tego pliku, więc chyba muszę go utworzyć. Zrobiłem: echo -n "123456" >> /etc/bluetooth/pin Żeby nie było znaku przełamania linii na końcu. Następnie restart usług: /etc/init.d/bluetooth restart <-- wykonane poprawnie. Kolejna sprawa to to, czy serwisy działają. [root@localhost ~]# ps -ae | grep hcid 30758 ? 00:00:00 hcid [root@localhost ~]# ps -ae | grep sdpd 30762 ? 00:00:00 sdpd Chyba działają... [root@localhost ~]# hciconfig -a hci0: Type: USB BD Address: 00:13:46:00:47:68 ACL MTU: 377:10 SCO MTU: 16:0 UP RUNNING PSCAN RX bytes:29323 acl:389 sco:0 events:1006 errors:0 TX bytes:12484 acl:345 sco:0 commands:412 errors:0 Features: 0xff 0xfe 0x0d 0x38 0x08 0x08 0x00 0x00 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH HOLD SNIFF PARK Link mode: SLAVE ACCEPT Name: 'siemens localhost.localdomain-0' Class: 0x120104 Service Classes: Networking, Object Transfer Device Class: Computer, Desktop workstation HCI Ver: 1.2 (0x2) HCI Rev: 0x0 LMP Ver: 1.2 (0x2) LMP Subver: 0x309 Manufacturer: Broadcom Corporation (15) Teraz: [root@localhost ~]# hcitool dev Devices: hci0 00:13:46:00:47:68 [root@localhost ~]# hcitool scan Scanning ... 00:01:E3:4E:F3:34 Jerzy [root@localhost ~]# hcitool inq Inquiring ... 00:01:E3:4E:F3:34 clock offset: 0x0018 class: 0x720204 [root@localhost ~]# l2ping 00:01:E3:4E:F3:34 Ping: 00:01:E3:4E:F3:34 from 00:13:46:00:47:68 (data size 44) ... 0 bytes from 00:01:E3:4E:F3:34 id 0 time 40.42ms 0 bytes from 00:01:E3:4E:F3:34 id 1 time 32.44ms 0 bytes from 00:01:E3:4E:F3:34 id 2 time 15.63ms 0 bytes from 00:01:E3:4E:F3:34 id 3 time 16.83ms 4 sent, 4 received, 0% loss Czyly na razie wszystko oprócz braku /etc/bluetooth/pin jest wporządku... Plik /etc/bluetooth/rfcomm.conf wygląda po edycji następująco: # # RFCOMM configuration file. # rfcomm0 { # # Automatically bind the device at startup bind yes; # # # Bluetooth address of the device device 00:01:E3:4E:F3:34; # # # RFCOMM channel for the connection channel 1; # # # Description of the connection comment "Example Bluetooth device"; } I teraz chcę się połączyć. [root@localhost ~]# rfcomm connect 0 Can't connect RFCOMM socket: Connection refused Linia z "Connection refused" wyskakuje dopiero po wpisaniu na telefonie hasła (123456). Szukałem w googlach dzisiaj cały dzień i nic nie znalazłem. Próbowałem instalować różne aplikacje do zarządzania telefonem, ale niestety każda wymaga podania hasła, które nie wiem czemu jest chyba błędne. Z góry dziękuję za pomoc. Btw. Przepraszam, że aż tak wiele wkleiłem kodów, ale chciałem, żeby było wszystko przejrzyste i użyteczne dla innych. Pozdrawiam. Odnośnik do komentarza Udostępnij na innych stronach More sharing options...
klimas7 Napisano Lipiec 16, 2007 Zgłoszenie Share Napisano Lipiec 16, 2007 :?: Wlasciwie to mam ten sam problem tylko walcze z bluetooth Tracera i nokia N70 i utkwiem w tym samym miejscu. Aczkolwiek kbluetooth dziala - prawie tzn wysylanie do telefonu jest OK (podaje sie haslo w tel a nastepnie w kblu... i dziala) na tomiasta w druga strone juznie bardzo. Ale walcze i szukam jak sie uda to dam znac. pz Odnośnik do komentarza Udostępnij na innych stronach More sharing options...
Rekomendowane odpowiedzi
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto
Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.
Zarejestruj nowe konto
Załóż nowe konto. To bardzo proste!
Zarejestruj sięZaloguj się
Posiadasz już konto? Zaloguj się poniżej.
Zaloguj się