Skip to contentSkip to conversation

(Newbie) Echo server and transferring raw data

Bluez-devel john smith 2 participants 2 messages Aug 11, 2004 Bluetooth drivers

lore
Share & tools
lore

john smith

author
#0 lore raw

Hi there,

I'm pretty new to Bluez and network programming and I'd appreciate if I anybody could give me some pointers on passing raw data between two hosts.

I've been playing about with hcitools and l2ping and I've got a pand connection happening between two pc's.

As an exercise I'd just like to send some data between the server and client and maybe build up my own simple application protocol.

My question is ( and I applogise if this sounds dumb), is there an easy way to do this? I've been looking at the l2ping code and I'm thinking about experimenting with this. Or is it possible to take an Echo program written to use IP sockets and simply substitute in things like 'socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_L2CAP)' where appropriate.

I've been browsing the Howto's but I've only found info on comms between mobile phone's, or sharing internet connections.

thanks for reading,

John

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger

-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi John,

Quoted 6 lines

I'm pretty new to Bluez and network programming and I'd appreciate if I anybody could give me some pointers on passing raw data between two hosts.

I've been playing about with hcitools and l2ping and I've got a pand connection happening between two pc's.

Quoted 8 lines

As an exercise I'd just like to send some data between the server and client and maybe build up my own simple application protocol.

My question is ( and I applogise if this sounds dumb), is there an easy way to do this? I've been looking at the l2ping code and I'm thinking about experimenting with this. Or is it possible to take an Echo program written to use IP sockets and simply substitute in things like 'socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_L2CAP)' where appropriate.

take a look at the source code of l2test and rctest. If you want to port a TCP application then use RFCOMM as layer, because you will need a stream socket.

Regards

Marcel

-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel