Linux bluetooth development
 help / color / mirror / Atom feed
From: "Frédéric DALLEAU" <frederic.dalleau@palmsource.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] DUN Gateway
Date: Mon, 06 Nov 2006 18:01:45 +0100	[thread overview]
Message-ID: <454F6A79.40603@palmsource.com> (raw)
In-Reply-To: <002301c6ffd7$584905f0$9d0cc70a@dlh.st.com>

Hi,

I don't know if you can make dund work like this, however, the patch I =

just proposed can be used in a similar way :
See thread called "[Bluez-devel] rfcomm patch to startup an executable =

at connection"
If a modem is installed on a serial port, then a simple gateway =

application can be used between /dev/rfcomm0 and the modem.

1) Create SDP record:
sdptool add --channel 20 DUN

2) setup your serial port
stty -F /dev/ttyS0 115200 ...

3) Start the rfcomm utility in watch mode:
rfcomm --raw watch 0 20 gateway_app {} /dev/ttyS0
Note: the {} will be replaced by /dev/rfcomm0.

4) Setup your DUN data terminal and connect.
Upon connection, rfcomm launches a gateway_app process.

It's up to you to write the gateway ;) Something like this should be enough:

int f1 =3D open(argv[1]);
int f2 =3D open(argv[2]);
while(!error)
{
int fd =3D poll(f1, f2)
if(fd=3D=3D1)
    read(f1); write(f2);
else if(fd=3D=3D2)
    read(f2); write(f1);
else error;
}
close(f1);
close(f2);

Maybe a shell command already exists

Hope this helps!
Fr=E9d=E9ric


Mayank BATRA a =E9crit :
> Hi Marcel,
>
> There is an option --dialup -u (Pretend to be a dialup/telephone) in the =
dund daemon. But I see that this option only registers a DIALUP_NET_SVCLASS=
_ID SDP record. It does nothing else apart from that. My requirement is tha=
t I want to make dund work as a DUN Gateway. Thus, it should read AT comman=
ds sent from the DUN Terminal and send back responses to it.
> Is there some way through which I can make dund do so?
>
> Best Regards,
>
> Mayank
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job ea=
sier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>   =



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2006-11-06 17:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-04  6:06 [Bluez-devel] DUN Gateway Mayank BATRA
2006-11-06 17:01 ` Frédéric DALLEAU [this message]
2006-11-07  3:46   ` Mayank BATRA
2006-11-07  6:41   ` Mayank BATRA

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=454F6A79.40603@palmsource.com \
    --to=frederic.dalleau@palmsource.com \
    --cc=bluez-devel@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