Summary: | [es] update: bluetooth-guide.xml (1.10) -> (1.11) | ||
---|---|---|---|
Product: | Doc Translations | Reporter: | Chema Alonso Josa (RETIRED) <nimiux> |
Component: | [ES] | Assignee: | John Christian Stoddart (RETIRED) <chiguire> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bugs.gentoo, dinvlad, nimiux |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | bluetooth-guide.xml.patch |
Description
Chema Alonso Josa (RETIRED)
![]() Created attachment 198614 [details, diff]
bluetooth-guide.xml.patch
(In reply to comment #0) > updated bluetooth guide, emergency fixes, bug 266690. we now no longer have a > chapter on setting up a PAN, since nobody knows how the hell to do this. > Here's the guide from on how to easily set up PAN: --------- The solution is quite simple: you have to emerge net-misc/dhcp After installation of dhcp, you just have to write a correct dhcpd.conf file. For example, #dhcpd.conf ddns-update-style none; authoritative; default-lease-time 600; max-lease-time 7200; subnet 192.168.3.0 netmask 255.255.255.0 { range 192.168.3.2 192.168.3.2; # ip which should be lent to clients (in my case 1 ip for 1 phone) option domain-name-servers 192.168.1.1; #your dns server(s) (see /etc/resolv.conf) option routers 192.168.3.1; } Then just type ifconfig bnep0 192.168.3.1 , i.e. the ip of the access point installed on the current machine (a bluetooth dongle in my case). At last, fire up the dhcp3-server: /etc/init.d/dhcpd start In several seconds you should be able to ping 192.168.3.2 or whatever IPs you chose for you devices :) To be able to access the Internet via another interface on the current machine (e.g. eth0), you can use iptables. Consult an according manual. In the simplest case you could use the following script: iptables -F iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward Now you should be able to access the Internet via computer on your mobile (provided you installed bluetooth profile as ISP on it :) ). This bug is to update the Spanish bluetooth guide due to recent changes in the English one: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/bluetooth-guide.xml?rev=1.16&view=markup If you have some ideas to write the PAN part of the guide, I think you should file a Documentation bug. Cheers! Sorry, I forgot to mention: this way only works when you want to set up PAN between your computer and a mobile phone. That's because you HAVE to query for connection from the phone, then the device bnep0 will appear on the computer. This works even without "old-daemons" USE flag for net-wireless/bluez. Unfortunately, in case of PAN between two computers, I couldn't test it (don't have a second bluetooth dongle :)) But it seems you have to enable "old-daemons" and then use the guide from http://www.linuxquestions.org/questions/linux-networking-3/bluez-4.x-pan-access-point-on-gentoo-733183/ It seems the crucial point that prevented the author of that post from setting up PAN is that you SHOULD RUN DHCP SERVER. (few additions to comments #2 & #4) 1) first and foremost before all settings you should enable page & inquiry scan on all devices, which under linux is now done by hciconfig hci0 piscan #etc. for hci1,2,... 2) Of course, to automate the configuration of the "master" device (which hands out IP addresses), you can ln -s /etc/init.d/net.lo /etc/init.d/net.bnep0 # or pan0 in case of two computers (?) and add the following in /etc/conf.d/net : config_bnep0="192.168.3.1/24" postup(){ if [ "${IFACE}" = "bnep0" ]; then /etc/init.d/dhcpd start fi } May be it's improper to start one init script from another, but works:). Of course, if you already use dhcp for another network, then you can just use rc-update add dhcpd ; but if you don't, then you can't add it to rc since it will fail when discovers that interface with the IP 192.168.3.1 (as in the primer) doesn't exist. 3) for those who want to connect to computers this way, apart from the way discribed on linuxquestions (see above), i.e. hciconfig hci0 lm master,accept hciconfig hci1 lm slave,accept ... ifconfig pan0 192.168.3.1 netmask 255.255.255.0 up /etc/init.d/dhpcd start ifconfig pan1 up ... you can also try the old pand-way (with USE="old-daemons") pand -s -M -r NAP # on the "master" device pand -c MA:ST:ER:AD:DR:ES -d NAP -n And last, but may be not least:) is that before the connection you should pair the devices. The current version (as of bluez-4.x) of pairing agent is simple-agent (In reply to comment #6) > And last, but may be not least:) is that before the connection you should pair > the devices. The current version (as of bluez-4.x) of pairing agent is > simple-agent > Please, read comment #3. I have written an article on http://en.gentoo-wiki.com/wiki/Set_up_a_bluetooth_NAP to at least cover the NAP (Server) part. I took me a whole weekend to figure out, so I hope this will save you some time. (In reply to comment #8) Thank you. Please, consider the "Edit:" part, which describes a much simpler way to do pairing. An alternative way to connect the phone to the Internet is to avoid using a bridge and instead to use iptables. Listo, gracias Chema/nimiux. |