I'm trying to perform file transfers using bluetooth between a laptop running Ubuntu and my Windows laptop.
If I directly use the Windows and Ubuntu GUI functions, then files are transferred. I want to use the Matlab functions so that the data transfer is part of the data processing scripts.
I've enabled the SSP on the linux laptop (the command 'sudo sdptool add SP' returns 'Serial Port service registered'.
With the device showing disconnected in the Windows Settings -> Bluetooth & devices -> Devices page, I run the bluetoothlist command in Matlab and the device is listed as 'ready to connect' with a channel of 1
If I then run the bluetooth command using the device name or mac address and the channel number, the connection fails with an exception and the object isn't returned, but the linux machine shows it's now connected.
>> bluetoothlist
Name Address Channel Status
_______ ______________ _______ __________________
"xxxxxx" "nnnnnnnnnnnn" 1 "Ready to connect"
>> bt = bluetooth("nnnnnnnnnnnn", 1);
Unable to connect to device. Run bluetoothlist to check device status and channel number.
Running bluetoothlist again shows the channel and status as unknown.
I've stepped through the process and find the exception is raised in channel.m line 308
% Gain exclusive access of the device.
obj.ChannelImpl.open(options);
I can't step into this function to isolate the problem further.
I'm running Matlab 2024B (with latest updates) on Windows 11.
Any suggestions are gratefully appreciated.