[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

el blues del bluez



 Hola.

 Fa temps que tinc un portàtil sense bluetooth però amb USB i un adaptador
 bluetooth per USB (Conceptronic 1177). També tinc un telèfon mòbil 
 Siemens SP65 (Siemens va fer pressió per a les patents de programari, 
 però Nokia, Ericsson i d'altres també, i Siemens porta T9 - patentat :( - 
 en català. mentre que molts altres no). 

 Mai he aconseguit enviar SMS des del protàtil (escriure al teclat del 
 SP65 és un conyàs, amb T9 i tot). He provat en gnokii però no l'he aconseguit
 fer anar. El que si que he aconseguit és escriure un simple fitxer en UTF-8
 i enviar-lo per obexftp (via Bluetooth) al mòbil. Quan el mòbil el rep el
 puc enviar via SMS o sia queigualment m'estalvio d'escriure. Això ho he anat
 fent com una vegada al mes oencara no des de fa força mesos. 

 Però d'ençà de l'ultima actualització del Debian inestable que no hi ha 
 manera. Cada cop que provo de fer 

 obexftp -b  00:01:E3:54:80:5C -B 5 -p fitxer.txt

 em surt un missatge com ara

 Browsing 00:01:E3:54:80:5C ...
 Channel: 5
 Connecting...failed: connect
 Still trying to connect
 Connecting...failed: connect
 Still trying to connect
 Connecting...failed: connect
 Still trying to connect

 i al mateix temps el mòbil em demana un PIN. 

 Crec recordar que el PIN me'l va demanar la primera vegada
 que ho vaig configurar, vaig posar el mateix al portàtil i 
 al mòbil i el que és segur és que 
 després no me'l va preguntar mai més. 

 Però d'ençà d'ahir (o sia des del primer intent després de 
 l'actualització de sid recent), que me'l torna a demanar, 
 i no me n'accepta cap. Al mòbil surt una pantalleta per 
 entrar el PIN, i ni posant-li el que tinc a 

 /etc/bluetooth/passkeys/default
 ni el que hi ha a 
 /etc/bluetooth/pin
 ni el de 
 /etc/bluetooth/hcid.conf
 ni un en blanc ni un d'aleatori 
 no em deixa connectar

 He posat el portàtil als dispositius confiables del mòbil, 
 he anul·lat la seguretat dle bluetooth al portàtil, 
 he fet /etc/init.d/bluetooth restart i /etc/init.d/dbus-1 restart
 i no séquantes coses més, però no hi ha manera.

 El bluez-pin no em funciona, sembla que està obsolet, i 
 el  /usr/lib/bluetooth/add-passkey --default 
 em diu 
 Can't register passkey agent
 Passkey agent already exists

 Però al /var/log/syslog surt 

 Aug  6 16:50:19 localhost hcid[20778]: Bluetooth HCI daemon
 Aug  6 16:50:19 localhost hcid[20778]: Register path:/org/bluez fallback:1
 Aug  6 16:50:19 localhost sdpd[20781]: Bluetooth SDP daemon
 Aug  6 16:50:19 localhost hcid[20778]: Device hci0 has been added
 Aug  6 16:50:19 localhost hcid[20778]: Can't write inquiry mode for hci0: Input/output error (5)
 Aug  6 16:50:19 localhost hcid[20778]: Register path:/org/bluez/hci0 fallback:0

 Però no sé què he de fer per permetre que escrigui el inquiry mode
 (segons el changelog sembla que això ja no ho hauria de fer, la versió 3.1 
 de bluez-utils). Em sebla que això abans (quan funcionava la transferència per
 obexftp) no sortia.

 En sabeu res ? Sabeu què puc fer per recuperar la funcionalitat del obexftp sobre bluetooth
 que tenia abans ? 

 dpkg -l  "*bluez*"
 Desitjat=Desconegut(u)/Instal·la(i)/Elimina(r)/Neteja(p)/Atura(h)
 | Estat=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
 |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Estat,Err: majúsc.=dolent)
 ||/ Nom            Versió         Descripció
 +++-==============-==============-============================================
 pn  bluez-cups     <cap>          (no hi ha cap descripció disponible)
 un  bluez-firmware <cap>          (no hi ha cap descripció disponible)
 ii  bluez-hcidump  1.31-1         Analyses Bluetooth HCI packets
 un  bluez-pan      <cap>          (no hi ha cap descripció disponible)
 pn  bluez-pcmcia-s <cap>          (no hi ha cap descripció disponible)
 ii  bluez-pin      0.30-2.1       Bluetooth PIN helper with D-BUS support
 un  bluez-sdp      <cap>          (no hi ha cap descripció disponible)
 ii  bluez-utils    3.1-3.1        Bluetooth tools and daemons
 pn  kernel-patch-2 <cap>          (no hi ha cap descripció disponible)
 pn  kernel-patch-2 <cap>          (no hi ha cap descripció disponible)


a /etc/bluetooth/hcid.conf posa:
#
# 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;
        security none;

	# 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 "1234";
}

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

	# Local device class
	class 0x3e0100;

	# 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;
}

i a 
/etc/dbus-1/system.d/bluez-hcid.conf
posa 
<!-- This configuration file specifies the required security policies
     for BlueZ hcid to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd";>
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
  </policy>

  <policy at_console="true">
    <allow send_destination="org.bluez.Adapter"/>
    <allow receive_sender="org.bluez.Adapter"/>

    <allow send_path="/org/bluez/Adapter"/>

    <allow send_destination="org.bluez.Manager"/>
    <allow receive_sender="org.bluez.Manager"/>

    <allow send_path="/org/bluez/Manager"/>

    <allow send_destination="org.bluez.Security"/>
    <allow receive_sender="org.bluez.Security"/>
  </policy>

</busconfig>

Gràcies per qualsevol suggerència.

-- 
Xavi Drudis Ferran
xdrudis@tinet.cat



Reply to: