Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bluetooth nur als root?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
daKirsch
n00b
n00b


Joined: 20 Sep 2004
Posts: 8

PostPosted: Mon Sep 20, 2004 10:21 am    Post subject: Bluetooth nur als root? Reply with quote

Hallo erstmal!

Ich bin relativ neu in Linux, hab aber bisher nie ernsthaft Probleme gehabt. Mein Gentoo läuft mit dev-sources, hotplug und udev eigentlich prima. Ich kann alles benutzen was ich so will, aber bei der Bluetooth-Konfiguration komme ich nicht weiter.

Als root klappt alles prima und ich kann rfcomm verbindungen machen, mein t610 anpingen, services abfragen, xmms fernsteuern, usw. bloss wie bekomm ich die Erlaubnis für meine normalen Account?

Ich hab jetzt versucht die permissions für rfcomm* in /etc/udev/pemissions.d/ passend zu setzen, aber das scheint nicht zu helfen. Seltsam finde ich auch die Meldung nach dem emergen von bluez-utils, dass rfcomm devices unter /dev/bluetooth/* zu finden wären... meine sind unter /dev/rfcomm* und sie gehören root:root (es sei denn ich ändere das in /etc/udev).

Als als normaler user geht:

Code:
daniel@daniel ~ $ hcitool scan
Scanning ...
        00:0E:07:38:CD:D9       Daniels T610


Was dann nicht mehr geht ist (rfcomm.conf ist passend konfiguriert):

Code:
daniel@daniel ~ $ rfcomm bind 0
Can't create device: Operation not permitted


Wobei das als root prima geht. Sieht für mich (als Nap) so aus als könne rfcomm0 nicht erstellt werden...

Code:
daniel@daniel ~ $ ls /dev/ | grep rfcomm


... Nix da. Gut muss eben root ran:

Code:
daniel@daniel ~ $ su
Password:
daniel daniel # rfcomm bind 0
daniel daniel # rfcomm
rfcomm0: 00:0E:07:38:CD:D9 channel 1 clean
daniel daniel # l2ping 00:0E:07:38:CD:D9
Ping: 00:0E:07:38:CD:D9 from 00:04:61:81:0F:2A (data size 20) ...
0 bytes from 00:0E:07:38:CD:D9 id 200 time 53.92ms
0 bytes from 00:0E:07:38:CD:D9 id 201 time 30.25ms
0 bytes from 00:0E:07:38:CD:D9 id 202 time 41.23ms
0 bytes from 00:0E:07:38:CD:D9 id 203 time 39.21ms
4 sent, 4 received, 0% loss
daniel daniel # exit


Prima: Geht ja gut, aber dann:

Code:
daniel@daniel ~ $ l2ping 00:0E:07:38:CD:D9
Can't create socket.: Operation not permitted


Also ich glaube, wenn dieses Problem gelöst ist, dann bekomme ich auch alles andere hin, aber hier stecke ich irgendwie in einer Sackgasse :(
Back to top
View user's profile Send private message
henrynick
Apprentice
Apprentice


Joined: 28 Jun 2004
Posts: 203
Location: longitude: 14° 25' latitude: 51° 10'

PostPosted: Mon Sep 20, 2004 10:31 am    Post subject: Reply with quote

Hallo,

ich hab ja auch keine Ahnung, aber steht das Bluetooth als Device in der fstab? Wenn ja, kannst Du dort die Freigabe von
ro auf user setzen.
Dann sollte das gehen.
Aber wie gesagt - keine Ahnung ob das so richtig ist.
_________________
Gruß/greetings

HenryNick

--
go to work, send your kids to school
follow fashion, act normal
walk on the pavement, watch T.V.
save for your old age, obey the law
Repeat after me: I am free
Back to top
View user's profile Send private message
daKirsch
n00b
n00b


Joined: 20 Sep 2004
Posts: 8

PostPosted: Mon Sep 20, 2004 10:45 am    Post subject: Reply with quote

fstab ist doch für dateisysteme, oder kann man das noch anders benutzen? Also, was ich bisher denk ich verstanden hab, ist, dass mein Bluetooth-Adapter (hci0) sowas wie ne Netzwerkkarte darstellt. Der wird auch prima von hotplug erkannt sobald er drin ist. Das rfcomm ist ne Emulation einer seriellen Schnittstelle, so dass Programme die mit dem Handy reden wollen, überhaupt nix von Bluetooth verstehen müssen. Nur irgendwie darf ich als normaler Nutzer irgendwas da nicht benutzen. Da allerdings hcitool scan läuft, aber jegliche verbindungsaufnahme über rfcomm fehlschlägt, geh ich davon aus, dass da was versucht wird, was aus irgendwelchen Gründen nicht erlaubt ist...
Back to top
View user's profile Send private message
henrynick
Apprentice
Apprentice


Joined: 28 Jun 2004
Posts: 203
Location: longitude: 14° 25' latitude: 51° 10'

PostPosted: Mon Sep 20, 2004 10:57 am    Post subject: Reply with quote

:oops:
Sorry - ich war noch beim installieren und CD_ROM ist für mich in erster Linie ein Gerät! Geht so natürlich nicht- versuche es mal hier, ich habe es nur überflogen, aber zum Ende hin scheint ein Verweis auf das zu sein, eas dir weiterhelfen könnte:
[SYS]Gemountete Devices
https://forums.gentoo.org/viewtopic.php?t=105559&highlight=zugriff+ger%E4te
_________________
Gruß/greetings

HenryNick

--
go to work, send your kids to school
follow fashion, act normal
walk on the pavement, watch T.V.
save for your old age, obey the law
Repeat after me: I am free
Back to top
View user's profile Send private message
daKirsch
n00b
n00b


Joined: 20 Sep 2004
Posts: 8

PostPosted: Mon Sep 20, 2004 1:14 pm    Post subject: Reply with quote

Ich fange an selber dahinter zu kommen glaube ich... ich glaube es fehlen udev rules für bluetooth (an sich für rfcomm) ... die sollte das bluez-utils ebuild sinnvollerweise mitbringen... Fehler in meinem System oder fehler im ebuild?
Back to top
View user's profile Send private message
daKirsch
n00b
n00b


Joined: 20 Sep 2004
Posts: 8

PostPosted: Mon Sep 20, 2004 4:01 pm    Post subject: solved Reply with quote

Also falls es noch jemanden interessiert:

Keine Ahnung warum, aber die erforderlichen scripte für udev existieren nicht, also hab ich nun folgendes gemacht:

/etc/udev/rules.d/51-my.rules erstellt und da drin
Code:
KERNEL="rfcomm[0-9]*", NAME="bluetooth/rfcomm/%n", SYMLINK="%k phone"

/etc/udev/permissions.d/51-my.permissions und da drin
Code:
bluetooth/rfcomm/[0-9]*:root:dialout:0666


dann hab ich mir noch ein startupscript mit dem namen bindrfcomm in /etc/init.d/ erstellt
Code:
#!/sbin/runscript

depend() {
        after bluetooth
}

start() {
        ebegin "Binding all rfconn devices"
        rfcomm bind all
        eend 0
}

stop() {
        ebegin "Releasing all rfconn devices"
        rfconn release all
        eend 0
}


Nun musste ich meinen Standartnutzer nur noch zur Gruppe dialout hinzufügen.
Das hat alle meine Probleme gelöst.

Danke, dass mir niemand helfen konnte (wollte?), so konnte ich lernen wie man udev konfiguriert :P
Back to top
View user's profile Send private message
Nepomuk
n00b
n00b


Joined: 26 Jan 2004
Posts: 2
Location: Zurich, Switzerland

PostPosted: Thu Mar 03, 2005 10:25 am    Post subject: Re: solved Reply with quote

daKirsch wrote:

Danke, dass mir niemand helfen konnte (wollte?), so konnte ich lernen wie man udev konfiguriert :P

Danke, dass du trotzdem noch geschrieben hast wie du es gemacht hast, das hat nämlich mir geholfen als non-root mit bluetooth zu verbinden :)
ich frage mich ob das inzwischen (sind ja immerhin ein paar Monate vergangen) nicht automatisch passieren sollte, resp. ob ich was falsch gemacht habe..
_________________
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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