Hello friends...
I have started with MATLAB for developing GUI but with little success.
During simulation whatever packets are sent in TinyOS these are
to be displayed in MATLAB.
So I am using Serialforwarder to interface between TinyOS and MATLAB.
However I am facing problems in writing the callback functions
for MATLAB's GUI.
For e.g. this is snippet of the code
obj1 = instrfind('Type', 'tcpip', 'RemoteHost', 'localhost',
'RemotePort', 9001, 'Tag', '');
% Create the tcpip object if it does not exist
% otherwise use the object that was found.
if isempty(obj1)
obj1 = tcpip('localhost', 9001);
else
fclose(obj1);
obj1 = obj1(1);
end
% Connect to instrument object, obj1.
fopen(obj1);
% Communicating with instrument object, obj1.
fprintf(obj1, '%s', 'T!');
data1 = fscanf(obj1, '%s', 2);
% Protocol development
fwrite(obj1, '1000'); % sending platform value
data2 = fread(obj1, 4); % reading platform value
data3 = fread(obj1, 5, 'uint8'); % reading header
data4 = fread(obj1, 2, 'uint16'); % reading sensor values; 20 bytes
But this code gives a timeout error during execution.
This is because of the lack of the knowledge of exact protocol followed.
Do you know where can I look for more information about this ?
Or Which other GUI could be used for simulation?
Waiting for your positive reply.
Wishes,
John
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help