i am trying to connect Nokia C903 using Bluetooth for reading messages. can it be done? fscanf returns nothing.. .

1 view (last 30 days)
i want to read and write messages and transfer images using Bluetooth.i have connected my phones C903 and N73 one at a time with bluetooth and used the follwing code which gives an error. This is my code: b = Bluetooth('N73', 1)
Bluetooth Object : Bluetooth-N73:1
Communication Settings
RemoteName: N73
RemoteID: 00210863353B
Channel: 1
Terminator: 'LF'
Communication State
Status: closed
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 0
>> fopen(b)
>> fwrite(b,[2 0 1 155])
>> btResponse=fread(b,36)
Warning: Unsuccessful read: The specified amount of data was not returned within the Timeout period. btResponse = Empty matrix: 0-by-1
i also tried fscanf but it returns nothing...
>> fopen(b)
>> fprintf(b,[3 4 5 6])
>> idn=fscanf(b)
Warning: Unsuccessful read: A timeout occurred before the Terminator was reached. idn = ''
i searched for the problem but couldn't find anything.

Answers (1)

Walter Roberson
Walter Roberson on 11 Feb 2013
try
fwrite(b, uint8([2 0 1 155]))

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!