Pagina 1 di 2

kbluetooth: ci sono novità?

Inviato: ven 13 nov 2009, 14:28
da Burroughs
Perdonate il titolo alla Roberto Giacobbo, volevo chiedervi se qualcuno di voi è riuscito a far funzionare kbluetooth con le bluez4 sulla 13.0 o sulla -current (prevengo le giuste osservazioni di chi mi dirà che kbluetooth è compilabile solo su KDE 4.3.x: io uso una 13.0 con KDE 4.3.3).
Allora, sono riuscito a compilare le bluez4 (versione 4.56) così come il framework kbluetooth, che mi compare regolarmente sulla systray, ma più di questo non son riuscito a fare.
Lanciando un

Codice: Seleziona tutto

hcitool scan
mi si dice che non c'è nessun dispositivo collegato in quel momento al sistema.
Voi siete riusciti nell'impresa?

Burroughs.

Ps: ovviamente, se qualcuno è interessato, posso fornire ulteriori dettagli sulle procedure che ho seguito per cercare di far funzionare il tutto.

Re: kbluetooth: ci sono novità?

Inviato: ven 13 nov 2009, 14:30
da JohnnyMnemonic
Non riesco a rispondere concretamente alla tua domanda, almeno non ora non potendo riavviare sulla current per provare

Ma per vedere il tuo device bluetooth non dovresti usare

Codice: Seleziona tutto

hcitool dev
?

Re: kbluetooth: ci sono novità?

Inviato: ven 13 nov 2009, 15:47
da Burroughs
JohnnyMnemonic ha scritto:Non riesco a rispondere concretamente alla tua domanda, almeno non ora non potendo riavviare sulla current per provare

Ma per vedere il tuo device bluetooth non dovresti usare

Codice: Seleziona tutto

hcitool dev
Penso non cambi molto.
Nell'ordine do:

Codice: Seleziona tutto

root@mody:~# hcid
root@mody:~# hciconfig hci0 up
senza messaggi d'errore, e poi:

Codice: Seleziona tutto

root@mody:~# hcitool dev
Devices:
        hci0    00:00:00:00:00:00
root@mody:~# hcitool scan
Device is not available: No such device
Burroughs.

Re: kbluetooth: ci sono novità?

Inviato: ven 13 nov 2009, 17:58
da gigiobagiano
Hai mandato un "echo enable" verso il file relativo alla periferica bluetooth sotto /proc (o /sys)? A me creava lo stesso problema perchè rc.bluetooth all'avvio non si interessa se la periferica è attiva o meno (sono su un portatile...)

Re: kbluetooth: ci sono novità?

Inviato: ven 13 nov 2009, 19:12
da Burroughs
gigiobagiano ha scritto:Hai mandato un "echo enable" verso il file relativo alla periferica bluetooth sotto /proc (o /sys)? A me creava lo stesso problema perchè rc.bluetooth all'avvio non si interessa se la periferica è attiva o meno (sono su un portatile...)
L'unica cosa "potabile" da dare in pasto a echo mi è sembrata /sys/class/bluetooth, ma non ho ottenuto risultati.
Allora, memore di quanto avevo letto qui all'epoca, ho provato a sostituire il system.conf di dbus.
Che dire, son riuscito a fare il pairing ma kbluetooth non mi permette di scambiare file da/verso il cellulare anche perché, per il sistema, il mio cellulare continua a non esistere.
Googlando in giro, non è che abbia trovato molta documentazione su bluez4 e kbluetooth, o, per essere più precisi, c'è abbastanza sull'architettura dello stack, molto meno sull'implementazione.

Burroughs.

Re: kbluetooth: ci sono novità?

Inviato: ven 13 nov 2009, 19:15
da neongen
guarda che hcid in bluez4 non esiste più

da root devi avviare bluetoothd e basta (bluetoothd -n -d per vedere eventuali errori)
kdebluetooth4 l'ho ricompilato oggi e ancora non funge. o non riconosce la periferica oppure l'iconcina diventa blu si blocca.

Re: kbluetooth: ci sono novità?

Inviato: sab 14 nov 2009, 9:03
da Burroughs
neongen ha scritto:guarda che hcid in bluez4 non esiste più

da root devi avviare bluetoothd e basta (bluetoothd -n -d per vedere eventuali errori)
kdebluetooth4 l'ho ricompilato oggi e ancora non funge. o non riconosce la periferica oppure l'iconcina diventa blu si blocca.
Grazie per le informazioni, neongen! :)
Allora, se lancio il demone da riga di comando ottengo quest'output:

Codice: Seleziona tutto

root@mody:~# bluetoothd -n -d
bluetoothd[7667]: Bluetooth daemon 4.57
bluetoothd[7667]: Enabling debug information
bluetoothd[7667]: parsing main.conf
bluetoothd[7667]: discovto=0
bluetoothd[7667]: pairto=0
bluetoothd[7667]: pageto=8192
bluetoothd[7667]: name=%h-%d
bluetoothd[7667]: class=0x000100
bluetoothd[7667]: discov_interval=0
bluetoothd[7667]: Key file does not have key 'DeviceID'
bluetoothd[7667]: Unable to get on D-Bus
Ora, ci sono delle cose che non mi risultanto chiare di queste bluez4:
a) da dove vengono tratte le informazioni relative al pairing del dispositivo collegato o al suo indirizzo MAC?
Ho letto di un file /etc/bluetooth/main.conf ma non lo vedo installato nel mio sistema;
b) occorre disinstallare le vecchie bluez (bluez-hcidump, bluez-firmware etc.)?

Burroughs.

Re: kbluetooth: ci sono novità?

Inviato: sab 14 nov 2009, 12:34
da neongen
a) non saprei, ma per i file di configurazione avresti dovuto compilare con --enable-configfiles --enable-udevrules (così ti mette anche le regole udev e dbus)
b) io ho rimosso solo bluez-libs e bluez-utils

se vuoi ti passo lo slackbuild

Re: kbluetooth: ci sono novità?

Inviato: sab 14 nov 2009, 13:04
da Burroughs
neongen ha scritto:a) non saprei, ma per i file di configurazione avresti dovuto compilare con --enable-configfiles --enable-udevrules (così ti mette anche le regole udev e dbus)
b) io ho rimosso solo bluez-libs e bluez-utils

se vuoi ti passo lo slackbuild
Sarebbe più che gradito... :)
Ciao,

Burroughs.

Re: kbluetooth: ci sono novità?

Inviato: sab 14 nov 2009, 13:26
da neongen

Codice: Seleziona tutto

#!/bin/sh

# Heavily based on the Slackware 13.0 SlackBuild
# http://www.bluez.org
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


PKGNAM=bluez
VERSION=${VERSION:-4.57}
ARCH=${ARCH:-`arch`}
NUMJOBS=${NUMJOBS:-" -j2 "}
BUILD=${BUILD:-1ng}


CWD=$(pwd)
TMP=${TMP:-/tmp/tgz}
PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
mkdir -p $TMP $PKG

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
fi

cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.gz || exit 1
cd ${PKGNAM}-$VERSION

# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \; -o \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \;

# Configure:
CFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --mandir=/usr/man \
  --disable-static \
  --enable-gstreamer \
  --enable-alsa \
  --enable-usb \
  --enable-netlink \
  --enable-tools \
  --enable-bccmd \
  --enable-hid2hci \
  --enable-dfutool \
  --enable-hidd  \
  --enable-pand \
  --enable-dund \
  --enable-cups \
  --enable-test \
  --enable-udevrules \
  --enable-configfiles \
  --build=$ARCH-slackware-linux

# Build and install:
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1

# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

# Compress and link manpages, if any:
if [ -d $PKG/usr/man ]; then
  ( cd $PKG/usr/man
    for manpagedir in $(find . -type d -name "man*") ; do
      ( cd $manpagedir
        for eachpage in $( find . -type l -maxdepth 1) ; do
          ln -s $( readlink $eachpage ).gz $eachpage.gz
          rm $eachpage
        done
        gzip -9 *.*
      )
    done
  )
fi

# Compress info files, if any:
if [ -d $PKG/usr/info ]; then
  ( cd $PKG/usr/info
    rm -f dir
    gzip -9 *
  )
fi

# Add a documentation directory:
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \
  AUTHORS COPYING ChangeLog INSTALL NEWS README \
  $PKG/usr/doc/${PKGNAM}-$VERSION

mkdir -p $PKG/install
#zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
requiredbuilder -v -y -s $CWD $PKG
/sbin/makepkg -l y -c n $CWD/../${PKGNAM}-$VERSION-$ARCH-$BUILD.txz

if [ "$1" = "--cleanup" ]; then
 rm -rf $TMP
fi

Codice: Seleziona tutto

# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

     |-----handy-ruler------------------------------------------------------|
bluez: bluez (Bluetooth(TM) wireless libraries and utilities)
bluez:
bluez: The bluez package contains an implementation of the Bluetooth(TM)
bluez: wireless standards specifications for Linux.
bluez:
bluez: For more info, visit:  http://www.bluez.org
bluez:
bluez:
bluez:
bluez:
bluez:

Re: kbluetooth: ci sono novità?

Inviato: sab 14 nov 2009, 14:40
da Burroughs
Grazie, neongen! :D
Allora, dopo aver ricompilato e settato i principali file di configurazione, ottengo questo quando lancio il demone principale:

Codice: Seleziona tutto

root@mody:~# bluetoothd -n -d
bluetoothd[4881]: Bluetooth daemon 4.57
bluetoothd[4881]: Enabling debug information
bluetoothd[4881]: parsing main.conf         
bluetoothd[4881]: discovto=0                
bluetoothd[4881]: pairto=0                  
bluetoothd[4881]: pageto=8192               
bluetoothd[4881]: name=%h-%d                
bluetoothd[4881]: class=0x000100            
bluetoothd[4881]: discov_interval=0         
bluetoothd[4881]: Key file does not have key 'DeviceID'
bluetoothd[4881]: Starting SDP server                  
bluetoothd[4881]: Loading builtin plugins              
bluetoothd[4881]: Loading audio plugin                 
bluetoothd[4881]: Loading input plugin                 
bluetoothd[4881]: Loading serial plugin                
bluetoothd[4881]: Loading network plugin               
bluetoothd[4881]: Loading service plugin               
bluetoothd[4881]: Loading hciops plugin                
bluetoothd[4881]: Loading hal plugin                   
bluetoothd[4881]: Loading storage plugin               
bluetoothd[4881]: Loading plugins /usr/lib/bluetooth/plugins
bluetoothd[4881]: Can't load plugin /usr/lib/bluetooth/plugins/netlink.so: /usr/lib/bluetooth/plugins/netlink.so: undefined symbol: debug             
bluetoothd[4881]: register_interface: path /org/bluez/4881/any             
bluetoothd[4881]: Registered interface org.bluez.Service on path /org/bluez/4881/any                                                                  
bluetoothd[4881]: /etc/bluetooth/network.conf: Key file does not have key 'Disable'                                                                   
bluetoothd[4881]: /etc/bluetooth/network.conf: Key file does not have key 'DisableSecurity'                                                           
bluetoothd[4881]: /etc/bluetooth/network.conf: Key file does not have key 'Interface'
bluetoothd[4881]: /etc/bluetooth/network.conf: Key file does not have key 'Interface'
bluetoothd[4881]: /etc/bluetooth/network.conf: Key file does not have key 'Interface'
bluetoothd[4881]: Config options: InterfacePrefix=bnep%d, PANU_Script=(null), GN_Script=(null), NAP_Script=(null), GN_Interface=pan0, NAP_Interface=pan1, Security=true
bluetoothd[4881]: bridge pan0 created
bluetoothd[4881]: input.conf: Key file does not have key 'IdleTimeout'
bluetoothd[4881]: Unix socket created: 9
bluetoothd[4881]: audio.conf: Key file does not have key 'AutoConnect'
bluetoothd[4881]: audio.conf: Key file does not have key 'MaxConnected'
bluetoothd[4881]: Telephony plugin initialized
bluetoothd[4881]: HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes"
bluetoothd[4881]: Failed to open RFKILL control device
bluetoothd[4881]: Entering main loop
In più, suppongo che non serva a nulla avviare il subsystem Bluetooth con un

Codice: Seleziona tutto

/etc/rc.d/rc.bluetooth start
Burroughs.

Re: kbluetooth: ci sono novità?

Inviato: sab 14 nov 2009, 18:17
da neongen
puoi modificare il rc.bluetooth per avviare e stoppare bluetoothd :lol:

il sistema mi sembra apposto. prova hcitool dev e scan.
per il resto kdebluetooth4 ancora non funziona, blueman richiede gtk+2.16 :doubt: :doubt:

Re: kbluetooth: ci sono novità?

Inviato: dom 15 nov 2009, 9:26
da Burroughs
neongen ha scritto:puoi modificare il rc.bluetooth per avviare e stoppare bluetoothd :lol:

il sistema mi sembra apposto. prova hcitool dev e scan.
per il resto kdebluetooth4 ancora non funziona, blueman richiede gtk+2.16 :doubt: :doubt:
Allora, il massimo che sono riuscito a fare è stato far diventare azzurra l'iconcina di kbluetooth sulla systray.
A parte questo, però, non è possibile interagire con l'applicazione ed anche hcitool scan e hcitool dev continuano a non rilevare la periferica Bluetooth connessa.
Tu sei riuscito almeno ad avere un output positivo da hcitool scan?

Burroughs.

Re: kbluetooth: ci sono novità?

Inviato: dom 15 nov 2009, 15:19
da neongen
Burroughs ha scritto:Tu sei riuscito almeno ad avere un output positivo da hcitool scan?
certo, e pure trasferisco correttamente file con obex_test (ricompilato openobex). sono le interfacce grafiche che non vanno :cry:

Re: kbluetooth: ci sono novità?

Inviato: dom 15 nov 2009, 17:12
da Burroughs
neongen ha scritto:
Burroughs ha scritto:Tu sei riuscito almeno ad avere un output positivo da hcitool scan?
certo, e pure trasferisco correttamente file con obex_test (ricompilato openobex). sono le interfacce grafiche che non vanno :cry:
A me capita una cosa strana: kbluetooth da root funziona (e anche bene) mentre, da utente normale, al massimo diventa celeste.
Penso ci sia qualcosa che non va nella mia configurazione.
Ti chiedo un ultimo favore, neongen, sperando nella tua gentilezza: potresti mandarmi, anche via PM, un tarball contenente la tua directory /etc/bluetooth, cosa da rendermi conto se mi mancano dei file di configurazione o se quelli che ho sono stati impostati male?
Ti ringrazio anticipatamente,

Burroughs.