Two-way data transfer sample?

Topics: Bluetooth - Microsoft, Samples
Aug 30, 2012 at 4:10 AM

I'm trying to figure out how to transfer data both ways using this (or any other) library.  I'm able to connect and send data to my device from my PC but I can't figure out how to also receive data that is sent to the PC from the device.  Does anyone have an example?  The PC OS is Windows 7.

Developer
Aug 31, 2012 at 11:19 AM

[Tried to post this earlier but something went wrong].

Have a read of http://32feet.codeplex.com/documentation and possibly of http://www.alanjmcf.me.uk/comms/bluetooth/Bluetooth%20Profiles%20and%2032feet.NET.html

If your remote device uses SPP (Serial Port Profile) / RFCOMM then it's simply a case of using BluetoothClient or BluetoothListener and getting a NetworkSteam instance which one can read / write to (or wrap in StreamReader/StreamWriter etc). If the PC initiates the connection the use BluetoothClient, see http://32feet.codeplex.com/wikipage?title=General%20Bluetooth%20Data%20Connections