Code: clc clear all close all sp=serial('COM25');%assigns the object s the serial port object set(sp, 'InputBufferSize', 256);%number of bytes in inout buffer set(sp, 'FlowControl', 'hardware'); set(sp, 'BaudRate', 9600); set(sp, 'Parity', 'none'); set(sp, 'DataBits', 8); set(sp, 'StopBit', 1); set(sp, 'Timeout',10); disp(get(s,'Name')); prop(1)=(get(sp,'BaudRate')); prop(2)=(get(sp,'DataBits')); prop(3)=(get(sp, 'StopBit')); prop(4)=(get(sp, 'InputBufferSize')); disp('Port Setup Finished Successfully!' ,num2str(prop)); fopen(sp);%opens the serial port t=1; disp('Running'); x=0; while t.
A Bluetooth driver for my USB dongle and now I can create a Serial Port for my Bluetooth connection. Discover what MATLAB. Once the object is connected to the remote device with the fopen function, the status property is configured to open. The following functions can be used with the Bluetooth. Hello All, My last question helped me a lot and I've made some progress in establishing a connection. I've downloaded a Bluetooth driver for my USB dongle and now I can create a Serial Port for my Bluetooth connection.