Agamnentzar / bluetooth-serial-port

multi-platform bluetooth serial port library for C++
Other
89 stars 27 forks source link

can not connect to any device! #6

Closed payymann closed 6 years ago

payymann commented 7 years ago

Hi, It seems that DeviceINQ::SdpSearch() always fails (it returns -1 for all devices) . I just ran test/main.cpp code and it lists all devices but with -1 for channels. So when I can't create a BTSerialPortBinding, because it needs positive channel id.

I have tested this on windows 7, VS 2015.

Agamnentzar commented 7 years ago

I'm just always passing 1 as channel ID, without using SdpSearch and it works ok for me. Not sure what's the issue with SdpSearch.

BluetoothConnection connection(bluetoothDevice.address, 1);
incebellipipo commented 7 years ago

Its not creating /dev/rfcommX

atomheartother commented 6 years ago

@Agamnentzar I also encountered this issue and was stuck on it quite a bit before reading this thread. At this point, wouldn't it be better just to document that SdpSearch is useless on windows, and to use 1 instead?

Agamnentzar commented 6 years ago

@atomheartother sorry for that, I never understood SdpSearch thing :P I added notes to Readme, with explanation.