Hi,
     well i finally managed to run the oscope application, and its now plotting.  
In my case default group ID used by the matlab code is not the default group in TinyOS. Check COMM.GROUP_ID in tools/matlab/comm/defineComm.m.
Also change the Group_ID in the defineTOSEnviornment.m. The group ID for matlab env and tinyos must be same.
Second thing was in the oscope.m there is a function oscilloscopeMessageReceived, this function should not be defined here, rather it should be a separate m file oscilloscopeMessageReceived.m in the same directory as ur oscope.m. when passing the name of this fuction to receive.m pass it like receive('oscilloscpeMessageReceived',OSCOPE.oscopeMsg )
Thanx to Phoebus  who send me this old code for oscilloscopeMessageReceived.m written for matlab 6.5 , it worked fine.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function oscopeMessageReceived(address, oscopeMsg, varargin)
global OSCOPE
if ~(isfield(OSCOPE,'plot') && ishandle(OSCOPE.plot))
    OSCOPE.plot = plot([0]);
    set(OSCOPE.plot,'XData', []);
    set(OSCOPE.plot,'YData', []);
end
xdata = get(OSCOPE.plot,'XData');
ydata = get(OSCOPE.plot,'YData');
set(OSCOPE.plot,'XData',[xdata oscopeMsg.get_lastSampleNumber-9:oscopeMsg.get_lastSampleNumber]);
set(OSCOPE.plot,'YData',[ydata oscopeMsg.get_data']);
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Everything is working fine now.
cheers!!
Manu


On 11/3/05, t3lab <[EMAIL PROTECTED]> wrote:
I'm trying to turn the oscope application with matlab but i've some problem:

i've matlab 6.5 on windows xp.

I've followed all the tynios tutorial about use of matlab with tinyos.

Now I run OscilloscopeRF application on two modules then I run SerialForwarder in tinyos. Then I open Matlab and run from workspace: oscope('init')

this is the result:

>> oscope('init')
Dropping packet with bad group ID:1A 01 08 47 FF FF FF FF 0A 71 01 00 C6 2A 01 00 0B 0B 13 0B 13 0B 03 0B 03 0B 02 0B 02 0B F7 0A FF 0A 13 0B
Dropping packet with bad group ID:1A 01 08 48 FF FF FF FF 0A 71 01 00 D0 2A 01 00 F7 0A 0A 0B 0B 0B 02 0B 12 0B 13 0B 0B 0B 13 0B FF 0A 02 0B
Dropping packet with bad group ID:1A 01 08 49 FF FF FF FF 0A 71 01 00 DA 2A 01 00 12 0B 02 0B F6 0A F7 0A 13 0B 02 0B F7 0A FF 0A 13 0B F6 0A
Dropping packet with bad group ID:1A 01 08 4A FF FF FF FF 0A 71 01 00 E4 2A 01 00 12 0B 01 0B 13 0B 13 0B 0B 0B F7 0A 12 0B FA 0A 0A 0B 0B 0B
Dropping packet with bad group ID:1A 01 08 4B FF FF FF FF 0A 71 01 00 EE 2A 01 00 F6 0A F6 0A FF 0A 13 0B F7 0A F7 0A 0B 0B F7 0A 0B 0B F6 0A
Dropping packet with bad group ID:1A 01 08 4C FF FF FF FF 0A 71 01 00 F8 2A 01 00 0B 0B 12 0B F7 0A F6 0A FF 0A 0B 0B 13 0B 13 0B 03 0B 03 0B
Dropping packet with bad group ID:1A 01 08 4D FF FF FF FF 0A 71 01 00 02 2B 01 00 F7 0A 13 0B 13 0B 16 0B 0B 0B F6 0A F3 0A FF 0A F7 0A F6 0A
Dropping packet with bad group ID:1A 01 08 4E FF FF FF FF 0A 71 01 00 0C 2B 01 00 02 0B 0B 0B F7 0A FF 0A 0A 0B 16 0B 13 0B 02 0B 0A 0B 13 0B
Dropping packet with bad group ID:1A 01 08 4F FF FF FF FF 0A 71 01 00 16 2B 01 00 0B 0B 0B 0B 13 0B 02 0B 0B 0B 02 0B 16 0B 0B 0B 0B 0B F9 0A

then i try to give start command:

and i've some error....

>> oscope('start')
??? Error using ==> strcmpi
Function 'strcmpi' is not defined for values of class 'function_handle'.

Error in ==> C:\MATLAB6p5\work\receive.m
On line 21  ==>   TF = strcmpi(COMM.globalFunction, functionName) & strcmpi(COMM.globalMessageName, message.getClass.toString.toCharArray');

Error in ==> C:\MATLAB6p5\work\oscope.m (start)
On line 53  ==> receive(@oscopeMessageReceived,OSCOPE.oscopeMsg);

Error in ==> C:\MATLAB6p5\work\oscope.m
On line 11  ==>   feval(varargin{1},varargin{2:end});

Group_id: is necessary use the same group_id that i've in tinyos application? but if I use the same when i give init command noone message is displayed and start command cause the same error.

what'is the problem?

thank's for any respons.

Luigi


_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



--
Luv Manu
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to