[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [bluetooth-dev] Echo request
> -----Original Message-----
> From: David LIBAULT [mailto:firstname.lastname@example.org]
> Sent: Wednesday, August 02, 2000 5:04 PM
> To: Mattias Ågren; email@example.com
> Subject: Re: [bluetooth-dev] Echo request
> Thank you for your answer.
> Will the PSM problem be fixed before UPF-3 ?
Yes, hopefully ...
> There is a problem with the ping implementation.
> It is not necessary to have a L2CAP channel opened before
> isuing an echo
> request. But today, from a layer on top of l2cap, it is not
> possible to
> open a baseband connection without issuing a l2ca_connect_req.
> Do you think this is an important limitation to the stack ?
The ping function will have to open a baseband connection just as l2ca_connect_req would (if no previous baseband connections are found) and will have to shut it down when no more pings will be made (if not used by any other layers).
> Adding a function like "l2ca_ping_req" in the l2cap.c file
> doesn't look
> nice as it is not defined as a "service to upper layer" in
> the standard.
> What do you suggest ?
try something like
1. look for existing baseband connection using get_con(bd)
2. If found, create tx buffer and send req over that handle using
hci_send_data(tx) and sleep on a wait queue (see write_scan_enable for
example in hci.c)
3. Otherwize issue lp_connect_req to create baseband, then send it
4. When receiving response wake up the queue and return status to PING
5. When done issue lp_disconnect if no other layers are using the handle
hope this helps.
> Mattias Ågren wrote:
> > >
> > > After some time I found out that
> > > - The echo request is already implemented in the stack.
> > > - PSM 0x1231 is already taken into account in L2CAP when
> > > UNPLUG_TEST
> > > is defined and the test layer is registered with PSM = MAX_PSM-1.
> > >
> > > I would have appreciated a short email from someone at
> Axis telling me
> > > that.
> > > It would have saved me some time.
> > Hi David,
> > Sorry for the misunderstanding.... you asked if PING was
> implemented not echo request. Since there is no PING yet
> there is no indications up to higher layers when an echo
> request is received. Feel free to do it yourself and we'll be
> happy to add it in the stack.
> > Regarding the MAX_PSM and the unplug test stuff that was
> just a temporary fix and will be replaced by a 'real' PSM for
> the test layer. Each upper layers function pointer struct
> will be dynamically allocated when registered thus we could
> use any MAX_PSM we'd like without allocating a lot of unused
> memory (currently there are MAX_PSM struct allocated
> statically...thus the temp fix for PSM=0x1231:) ).
> > Brgds
> > Mattias
> > > -----Original Message-----
> > > From: David LIBAULT [mailto:firstname.lastname@example.org]
> > > Sent: Wednesday, August 02, 2000 4:01 PM
> > > To: email@example.com
> > > Subject: [bluetooth-dev] Echo request
> > >
> > >
> > > Hi,
> > >
> > > Does anyone know how an echo request is indicated to the
> > > upper layers ?
> > >
> > > Regards.
> > >