Linux bluetooth development
 help / color / mirror / Atom feed
From: Aras Vaichas <arasv@magtech.com.au>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] DUND pre-pppd script
Date: Wed, 04 Jun 2008 17:08:31 +1000	[thread overview]
Message-ID: <48463F6F.6010500@magtech.com.au> (raw)
In-Reply-To: <d89ddf300805290539q2401bcx915d0b0756824409@mail.gmail.com>

Brad Midgley wrote:
> Aras
>
>   
>> I need to determine my ppp IP address pair before I run pppd.
>>     
>
> I ran into this when setting up a bluetooth AP for use with a couple
> of nokia devices. They are using dun not pan, and I wanted to assign
> different addresses to each device. I had to hardcode the ip addresses
> in the nokias' dialup config which wasn't very satisfying.
>
>   

Thanks for the replies and ideas. What I've done is this:

#!/bin/sh
IP_PAIR=`safeip -p`
pppd $1 $2 ${IP_PAIR} $3 $4 $5 $6 $7 $8 $9


safeip is a Python script I wrote which finds a private subnet of size 2
that is not in use anywhere on the system. Option -p returns the data
like so: IP1:IP2

I just pass this IP pair on to pppd as well as all the other information
that dund passes on from itself and the /etc/default/bluetooth file.

Works quite well regardless of the state of (almost) any other possible
network configuration. I can also connect from multiple devices and it
just dishes out a new IP pair every time.

my /etc/default/bluetooth file has:
DUND_OPTIONS="--listen --persist --channel 3 --msdun --pppd pppd_pre.sh
crtscts 115200 ms-dns 10.0.0.1

I haven't fixed the ms-dns entry yet, but that is easily done

Aras

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

      reply	other threads:[~2008-06-04  7:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29  3:04 [Bluez-users] DUND pre-pppd script arasv
2008-05-29 11:01 ` Raymond Ingles
2008-05-29 23:36   ` Aras Vaichas
2008-05-30  2:10     ` Brad Midgley
2008-05-30 15:51       ` Brad Midgley
2008-05-29 12:39 ` Brad Midgley
2008-06-04  7:08   ` Aras Vaichas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48463F6F.6010500@magtech.com.au \
    --to=arasv@magtech.com.au \
    --cc=bluez-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox