Before you start, make sure that:
- you can browse the Internet from your cellphone (take note of the connection profile you use)
- you have a working Bluetooth connection between your phone and the PC
- the devices are paired for connecting without asking for confirmation
- you have bluez-utils emerged with
USE="old-daemons"
Configure a RFCOMM connection with the phone:
- in
/etc/conf.d/bluetooth
setRFCOMM_ENABLE=true
- use
sdptool search DUN
to find the device's Bluetooth hardware address and the channel on which the cellphone listens for RFCOMM, the scan will take some time - in
/etc/bluetooth/rfcomm.conf
add a new connection with the address and channel you just found:
#
# RFCOMM configuration file.
#
rfcomm0 {
# Automatically bind the device at startup
bind yes;
# Bluetooth address of the device
device XX:XX:XX:XX:XX:XX;
# RFCOMM channel for the connection
channel 4;
# Description of the connection
comment "Cellphone GPRS/UMTS DUN";
}
- execute
/etc/init.d/bluetooth restart
, you should now have a/dev/rfcomm0
device available, andcat /dev/rfcomm0
should cause the PC to connect to the cellphone (cat will output nothing, just kill it withCrtl+C
when you verify the connection works).
Kernel requirements: besides what is needed for Bluetooth, enable all options under Device Drivers / Network device support / PPP (point-to-point protocol) support
. This only adds 16KB to the kernel size. Recompile, install, reboot with your new kernel (or if you really don't want to reboot, compile PPP as a module and modprobe it).
Emerge ppp with USE="dhcp"
. Create a network service with ln -s /etc/init.d/net /etc/init.d/net.ppp0
. Configure it by creating /etc/conf.d/net.ppp0
with the following contents:
### GPRS/EDGE/UMTS configuration ###
config_ppp0=( "ppp" )
link_ppp0="/dev/rfcomm0"
pppd_ppp0=(
"noauth"
"debug"
"local"
"defaultroute"
"usepeerdns"
"lcp-echo-interval 15"
"lcp-echo-failure 3"
"lock"
"115200"
"crtscts"
)
chat_ppp0="
ABORT BUSY
ABORT ERROR
ABORT 'NO ANSWER'
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT 'Invalid Login'
ABORT 'Login incorrect'
'' AT
TIMEOUT 5
OK 'ATH'
OK 'ATE1'
OK 'AT+CGDCONT=1,\"IP\",\"internet\"'
OK 'ATD*99#'
TIMEOUT 60
CONNECT ''
TIMEOUT 5
~--''
"
### end GPRS/EDGE/UMTS configuration ###
You'll need to replace "internet" with the name of the connection profile you use for your data transfer (this should be provided by your cellular operator - "internet" is what Plus GSM uses in Poland). Start the connection with /etc/init.d/net.ppp0 start
and everything should work.
Software used:
- sys-kernel/gentoo-sources-2.6.25-r7
- sys-apps/openrc-0.2.5
- sys-apps/baselayout-2.0.0
- net-wireless/bluez-libs -3.36
- net-wireless/bluez-utils-3.36 with USE="old-daemons"
- net-dialup/ppp-2.4.4-r15 with USE="dhcp"
Hardware used:
- Nokia N95 8GB
- HP Pavilion built-in Bluetooth adapter
How-To based on articles:
MyNetFaves : Public Faves Tagged Gentoo
ReplyDeleteMarked your site as gentoo at MyNetFaves!
Muszę przyznać, że wcześniej nie trafiłem na to narzędzie. Szkoda, że celuje tylko w Gnome, wydaje się być potężniejsze od kdebluetooth. No i ustawienia sieci wolę mieć raz wpisane „w system” niż je poprawiać z konta użytkownika, takie moje konsolowe zboczenie (o tyle uzasadnione, że z mojego komputera korzysta 5 osób).
ReplyDeleteOstatnio udało mi się zrobić to bluemanem „graficznie”
ReplyDeletePierwsza część jest dość standardowa (choć pewnie mógłbym ją wzbogacić o komentarz), natomiast chat_ppp0 to tak naprawdę włączony osobny plik konfiguracyjny. Wygląda rzeczywiście dość niezrozumiale, pewnie można by go zapisać osobno. Później sprawdzę jak to zrobić.
ReplyDeleteskolima; Do conf.d/net.
ReplyDeleteDo której części konkretnie?
ReplyDeleteHm, na pewno nie ma do tego ładniejszej składni?
ReplyDelete