[LUGOS] ppp skripta za GPRS preko bluetooth

Gregor Ibic gregor.ibic at intelicom.si
Fri Apr 29 15:43:56 CEST 2005


najprej moras uparit telefon in tvoj BT na masini,
to je ponavadi v /etc/bluetooth

v /etc/bluetooth sodijo
hcid.conf
pin
rfcomm.conf

poglej malo idje naprav in si pravilno nastavi

v /usr/bin sodi
bluepin2

to je pin med telefonom in masino, da ti ni treba rocno se prijavljat

v /etc/ppp/peers pa sodi
gprsbt*

pazi na ime AP na mobitelu, se pravi ce imas navaden inet, potem je to 
"internet" ce ne pa "internetpro"

skripta za klicanje

/#!/bin/sh/
/# najprej zazenemo /etc/rc.d/bluetooth start/

/# v /etc/bluetooth/hcid.conf mora biti auth in encrypt zakomentirano!/

/# nalozimo ppp modul/
modprobe ppp-generic

/# povezemo se z nokio/
rfcomm connect rfcomm0 00:02:EE:4B:3A:EA

/# poklicemo na net/
pppd call gprsbt


#++++++++++++++++++++++++++++++++++

najvecji catch je v tisti bluepin2 datoteki (no comment)

pa se ene par uric zezanja pa bo.


Lep pozdrav,

Gregor Ibic


--------------------------------------------------------------------
Gregor Ibic                                 gregor.ibic at intelicom.si
--------------------------------------------------------------------
Intelicom d.o.o.                                   Slovenija, Europe
Vojkovo nabrezje 30a, SI 6000 Koper            tel# +386 5 630 91 58
http://www.intelicom.si                        fax# +386 5 627 93 55
--------------------------------------------------------------------



Tadej Panjtar wrote:

>Pozdravljeni,
>
>Nekoga, ki mu je to že uspelo, bi prosil za ppp skripto oz. navodila.
>
>Vnaprej hvala, 
>  Tadej
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>lugos-list mailing list
>lugos-list at lugos.si
>http://liste2.lugos.si/cgi-bin/mailman/listinfo/lugos-list
>  
>
-------------- next part --------------
# File:
# gprs
#
# Description:
# Serial cable, IrDA, Bluetooth and USB pppd options for GPRS phones.

# Keep pppd attached to the terminal:
# Comment this to get daemon mode pppd
nodetach

# Debug info from pppd:
# Comment this off, if you don't need more info
debug

# Show password in debug messages
show-password

# Connect script:
# scripts to initialize the GPRS modem and start the connection,
# wvdial command is for Orange SPV while other phones should work with chat
connect /etc/ppp/peers/gprsbt-connect-chat
#connect "/usr/bin/wvdial --chat --config /etc/ppp/peers/gprs-wvdial.conf simobil"

# Disconnect script:
# AT commands used to 'hangup' the GPRS connection.
disconnect /etc/ppp/peers/gprsbt-disconnect-chat

# Serial device to which the GPRS phone is connected:
# /dev/ttyS0 for serial port (COM1 in Windows), 
# /dev/ircomm0 for IrDA,
# /dev/ttyUB0 for Bluetooth (Bluez with rfcomm running) and
# /dev/ttyUSB0 for USB
#/dev/ttyS0	# serial port one
#/dev/ttyS1	# serial port two
#/dev/ircomm0	# IrDA serial port one
/dev/bluetooth/rfcomm/0	# Bluetooth serial port one
#/dev/bluetooth/rfcomm/1	# Bluetooth serial port one
#/dev/ttyUSB0	# USB serial device, for example Orange SPV
#/dev/usb/tts/0

# Serial port line speed
115200	# fast enough
#57600	# perhaps usefull with IrDA

# Hardware flow control:
# Use hardware flow control with cable, Bluetooth and USB but not with IrDA.
#crtscts  # serial cable, Bluetooth and USB
nocrtscts # IrDA

# Ignore carrier detect signal from the modem:
local

# IP addresses:
# - accept peers idea of our local address and set address peer as 10.0.0.1 
# (any address would do, since IPCP gives 0.0.0.0 to it)
# - if you use the 10. network at home or something and pppd rejects it,
# change the address to something else 
#:10.0.0.1
:192.168.1.1

# pppd must not propose any IP address to the peer!
noipdefault

# Accept peers idea of our local address
ipcp-accept-local
ipcp-accept-remote

# Add the ppp interface as default route to the IP routing table
defaultroute

# DNS servers from the phone:
# some phones support this, some don't.
usepeerdns

# ppp compression:
# ppp compression may be used between the phone and the pppd, but the 
# serial connection is usually not the bottleneck in GPRS, so the 
# compression is useless (and with some phones need to disabled before 
# the LCP negotiations succeed).
novj
nobsdcomp
novjccomp
nopcomp
noaccomp

# The phone is not required to authenticate:
noauth

# Username and password:
# If username and password are required by the APN, put here the username 
# and put the username-password combination to the secrets file: 
# /etc/ppp/pap-secrets for PAP and /etc/ppp/chap-secrets for CHAP 
# authentication. See pppd man pages for details.
# Example, Radiolinja operator pap-secrets: 
# "rlnet"         *       "internet"	*
#user "simobil"
user "mobitel"

# Asyncmap:
# some phones may require this option.
#asyncmap 0xa0000

# No magic:
# some phones may require this option.
#nomagic

# Require PAP authentication:
# some phones may require this option.
#require-pap

lcp-echo-failure 0
-------------- next part --------------
#!/bin/sh
# 
# File: 
# gprs-connect-chat
#
# Description: 
# chat script to open Radiolinjas GPRS service with GPRS phones. If ppp 
# negotiation stalls, try restarting the phone. To try with other GPRS 
# operator setting, change the PDP contex setting. The settings work with 
# most Ericsson models, but Nokia 8310 and 30 do not support QoS parameters 
# with AT commands, so just delete those lines and it'll work.
#
# Set PDP context CID=1, protocol=IP, APN=internet:
# AT+CGDCONT=1,"IP","internet","",0,0
#
# Set CID=1 QoS requirements from the network, not supported by Nokia:
# AT+CGQREQ=1,0,0,0,0,0
#
# Set CID=1 minimum acceptable QoS parameters, not supported by Nokia:
# AT+CGQMIN=1,0,0,0,0,0
#
# 'Call' CID=1 (activate PDP context one, perform GPRS attach):
# ATD*99***1#
#
# Some phones like the Orange SPV (yes, the Microsoft Smartphone) use this 
# dial string to start GPRS connection:
# ATD*99#
#
# The actual chat script:
exec chat 						\
	TIMEOUT		5				\
	ECHO 		ON				\
	ABORT		'\nBUSY\r'			\
	ABORT		'\nERROR\r'			\
	ABORT		'\nNO ANSWER\r'			\
	ABORT		'\nNO CARRIER\r'		\
	ABORT		'\nNO DIALTONE\r'		\
	ABORT		'\nRINGING\r\n\r\nRINGING\r'	\
	''		\rAT				\
	TIMEOUT		12				\
	SAY		"Press CTRL-C to close the connection at any stage!"	\
	SAY		"\ndefining PDP context...\n"	\
	OK		ATH				\
	OK		ATE1				\
	OK		'AT+CGDCONT=1,"IP","internetpro","",0,0'	\
	OK		ATD*99#				\
	TIMEOUT		22				\
	SAY		"\nwaiting for connect...\n"	\
	CONNECT		""				\
	SAY		"\nConnected." \
	SAY		"\nIf the following ppp negotiations fail,\n"	\
	SAY		"try restarting the phone.\n"
		
-------------- next part --------------
#!/bin/sh
#
# File:
# gprs-disconnect-chat
#
# send break
exec /usr/sbin/chat -V -s -S	\
ABORT		"BUSY"		\
ABORT		"ERROR"		\
ABORT		"NO DIALTONE"	\
SAY		"\nSending break to the modem\n"	\
""		"\K"		\
""		"+++ATH"	\
SAY		"\nPDP context detached\n"
-------------- next part --------------
#
# HCI daemon configuration file.
#
# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $
#

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

	# Pairing mode
	#   none  - Pairing disabled
	#   multi - Allow pairing with already paired devices
	#   once  - Pair once and deny successive attempts
	pairing multi;

	# PIN helper
	#pin_helper /usr/bin/bluepin;
	pin_helper /usr/bin/bluepin2;

	# D-Bus PIN helper
	#dbus_pin_helper;
}

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

	# Local device class
	class 0x100;

	# 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,master;
	#
	#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 hold,sniff;
	#
	lp rswitch,hold,sniff,park;

	# Authentication and Encryption
        # brez avtentikacije dela preko mobitela
	auth enable;
	#encrypt enable;

	#auth enable;
	#encrypt enable;
}
-------------- next part --------------
1
-------------- next part --------------
#
# RFCOMM configuration file.
#
# $Id: rfcomm.conf,v 1.1 2002/10/07 05:58:18 maxk Exp $
#

rfcomm0 {
	# Automatically bind the device at startup
	bind no;

	# Bluetooth address of the device
	device 11:22:33:44:55:66;

	# RFCOMM channel for the connection
	channel	1;

	# Description of the connection
	comment "Example Bluetooth device";
}
-------------- next part --------------
#!/bin/sh
echo "PIN:1"


More information about the lugos-list mailing list