* [Bluez-devel] Serial server problems
@ 2007-11-15 2:25 Pooyan McSporran
2007-11-27 14:18 ` Claudio Takahasi
0 siblings, 1 reply; 6+ messages in thread
From: Pooyan McSporran @ 2007-11-15 2:25 UTC (permalink / raw)
To: bluez-devel
(I'm unclear on which list, either bluez-devel or bluez-users, this
query should be on. Let me know if I've sent to the wrong list.)
I'm trying to write an application using BlueZ which will:
- advertise a service, based on SPP (custom UUID, etc)
- listen for incoming connections for that service
- when an inbound connection is requested, create the connection
- send data to/from on the connection
I'm having problems trying to work out how to do this using the DBus
interface. I've browsed through the Wiki (http://wiki.bluez.org) but
all the examples that I've found seem to be from the client
perspective, not a server. (Correct me if I'm wrong.) The only
server example I found is for the network service, not the serial
service. Similarly, the 'test-serial' python script only implements a
client.
The approximate sequence of actions that I'm currently
(unsuccessfully!) using is:
- Determine the default adapter (DefaultAdapter())
- add the service (AddServiceRecordFromXML())
- activate the serial service (ActivateService ("serial"))
The service is then visible to remote devices (so far so good!)
- create a proxy (serial.Manager.CreateProxy (uuid, "/dev/rfcomm0"))
This is where I'm obviously missing some basic stuff, I'm not sure in
this area (with ports, proxies, etc). Any help that people might have
in this regard would be appreciated.
Thank you.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Bluez-devel] Serial server problems
2007-11-15 2:25 [Bluez-devel] Serial server problems Pooyan McSporran
@ 2007-11-27 14:18 ` Claudio Takahasi
2007-11-27 22:26 ` Pooyan McSporran
0 siblings, 1 reply; 6+ messages in thread
From: Claudio Takahasi @ 2007-11-27 14:18 UTC (permalink / raw)
To: BlueZ development
On Nov 14, 2007 11:25 PM, Pooyan McSporran <duckfreezone@gmail.com> wrote:
> (I'm unclear on which list, either bluez-devel or bluez-users, this
> query should be on. Let me know if I've sent to the wrong list.)
>
> I'm trying to write an application using BlueZ which will:
> - advertise a service, based on SPP (custom UUID, etc)
> - listen for incoming connections for that service
> - when an inbound connection is requested, create the connection
> - send data to/from on the connection
>
> I'm having problems trying to work out how to do this using the DBus
> interface. I've browsed through the Wiki (http://wiki.bluez.org) but
> all the examples that I've found seem to be from the client
> perspective, not a server. (Correct me if I'm wrong.) The only
> server example I found is for the network service, not the serial
> service. Similarly, the 'test-serial' python script only implements a
> client.
>
> The approximate sequence of actions that I'm currently
> (unsuccessfully!) using is:
> - Determine the default adapter (DefaultAdapter())
> - add the service (AddServiceRecordFromXML())
> - activate the serial service (ActivateService ("serial"))
>
> The service is then visible to remote devices (so far so good!)
>
> - create a proxy (serial.Manager.CreateProxy (uuid, "/dev/rfcomm0"))
>
> This is where I'm obviously missing some basic stuff, I'm not sure in
> this area (with ports, proxies, etc). Any help that people might have
> in this regard would be appreciated.
>
> Thank you.
Hi Pooyan,
The address is wrong. Here are some examples:
TTY proxy: "/dev/ttyS0"
Unix socket: "/tmp/gps-data"
Unix socket(abstract namespace): "x00/org/bluez/echo"
I will try update the BlueZ wiki with some unix socket proxy examples.
BR,
Claudio.
--
---------------------------------------------------------
Claudio Takahasi
Instituto Nokia de Tecnologia - INdT
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Bluez-devel] Serial server problems
2007-11-27 14:18 ` Claudio Takahasi
@ 2007-11-27 22:26 ` Pooyan McSporran
0 siblings, 0 replies; 6+ messages in thread
From: Pooyan McSporran @ 2007-11-27 22:26 UTC (permalink / raw)
To: BlueZ development
On 28/11/2007, Claudio Takahasi <cktakahasi@gmail.com> wrote:
>
> The address is wrong. Here are some examples:
> TTY proxy: "/dev/ttyS0"
> Unix socket: "/tmp/gps-data"
> Unix socket(abstract namespace): "x00/org/bluez/echo"
>
> I will try update the BlueZ wiki with some unix socket proxy examples.
Thanks, I'd appreciate that.
For now I'm using DBus to do everything else (eg setting the name of
the adapter, making it visible, advertising the service via SDP, etc),
but using sockets for the serial aspects, but in the longer term I'd
like to use DBus for everything, so that wiki information would be
helpful.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bluez-devel] Serial server problems
@ 2007-11-16 5:55 Pooyan McSporran
2007-11-26 6:38 ` Marcel Holtmann
0 siblings, 1 reply; 6+ messages in thread
From: Pooyan McSporran @ 2007-11-16 5:55 UTC (permalink / raw)
To: bluez-devel
(I'm unclear on which list, either bluez-devel or bluez-users, this
query should be on. Let me know if I've sent to the wrong list.
Also, I'm having some erratic email issues, so my apologies if this
appears twice.)
I'm trying to write an application using BlueZ which will:
- advertise a service, based on SPP (custom UUID, etc)
- listen for incoming connections for that service
- when an inbound connection is requested, create the connection
- send data to/from on the connection
I'm having problems trying to work out how to do this using the DBus
interface. I've browsed through the Wiki (http://wiki.bluez.org) but
all the examples that I've found seem to be from the client
perspective, not a server. (Correct me if I'm wrong.) The only
server example I found is for the network service, not the serial
service. Similarly, the 'test-serial' python script only implements a
client.
The approximate sequence of actions that I'm currently
(unsuccessfully!) using is:
- Determine the default adapter (DefaultAdapter())
- add the service (AddServiceRecordFromXML())
- activate the serial service (ActivateService ("serial"))
The service is then visible to remote devices (so far so good!)
- create a proxy (serial.Manager.CreateProxy (uuid, "/dev/rfcomm0"))
- Enable the proxy (proxy.Enable ())
This is where I'm obviously missing some basic stuff, I'm not sure in
this area (with ports, proxies, etc). In this scenario I end up with
'invalid address' on the CreateProxy() call. Looking at the API,
CreateProxy expects either a socket or a character device, but I'm
unsure what I should use here in my scenario. Should I be using
rfcomm0 in this manner, or some other approach? Any help would be
appreciated.
Thanks.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Bluez-devel] Serial server problems
2007-11-16 5:55 Pooyan McSporran
@ 2007-11-26 6:38 ` Marcel Holtmann
2007-11-26 21:59 ` Pooyan McSporran
0 siblings, 1 reply; 6+ messages in thread
From: Marcel Holtmann @ 2007-11-26 6:38 UTC (permalink / raw)
To: BlueZ development
Hi Pooyan,
> I'm trying to write an application using BlueZ which will:
> - advertise a service, based on SPP (custom UUID, etc)
> - listen for incoming connections for that service
> - when an inbound connection is requested, create the connection
> - send data to/from on the connection
simply use the RFCOMM socket interface and use D-Bus only for
registering the SDP record.
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez-devel] Serial server problems
2007-11-26 6:38 ` Marcel Holtmann
@ 2007-11-26 21:59 ` Pooyan McSporran
0 siblings, 0 replies; 6+ messages in thread
From: Pooyan McSporran @ 2007-11-26 21:59 UTC (permalink / raw)
To: BlueZ development
On 26/11/2007, Marcel Holtmann <marcel@holtmann.org> wrote:
>
> > I'm trying to write an application using BlueZ which will:
> > - advertise a service, based on SPP (custom UUID, etc)
> > - listen for incoming connections for that service
> > - when an inbound connection is requested, create the connection
> > - send data to/from on the connection
>
> simply use the RFCOMM socket interface and use D-Bus only for
> registering the SDP record.
Thanks for your help. I'm now using this approach and it is working well.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-11-27 22:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-15 2:25 [Bluez-devel] Serial server problems Pooyan McSporran
2007-11-27 14:18 ` Claudio Takahasi
2007-11-27 22:26 ` Pooyan McSporran
-- strict thread matches above, loose matches on Subject: below --
2007-11-16 5:55 Pooyan McSporran
2007-11-26 6:38 ` Marcel Holtmann
2007-11-26 21:59 ` Pooyan McSporran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox