Hi, For some reason on recent versions of Matlab you need to add a third argument to the PrintMsg function, here's the modified function:
function printMsg(address,message,varargin) disp(message) Luis Enrique Palafox Maestre ________________________________________ De: Hua Yue [mailto:[EMAIL PROTECTED] Enviado el: Friday, June 30, 2006 11:28 AM Para: [email protected] Asunto: [Tinyos-help] HELP: using MATLAB with TINYOS Hello, i'm really sorry to bother you guys again. I have been stuck on the same problem for the past couple of days. I tried to solve it myself but i don't think i'm getting anywhere. As of now i have MATLAB correctly configured to receive packets. But i'm having trouble displaying the data. This is what i have done so far: 1. I successfully configured matlab to receive packets according to the following article: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2005-October/01277 4.html First i have serial forwarder running, then in matlab i typed in the following commands: >> connect('[EMAIL PROTECTED]:9001') ans = Thread[Thread-12,5,main] which gives me no error message. 2. Then i initiated a java object that defines the packet structure with the following commands: >> omsg=net.tinyos.oscope.OscopeMsg omsg = Message <OscopeMsg> [sourceMoteID=0x0] [lastSampleNumber=0x0] [channel=0x0] [data=0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 ] 3. Finally i tried the following command, which is supposed to make matlab display the data: >> receive('printMsg',omsg) and got the following error message every second or so: ??? Error using ==> printMsg Too many input arguments. ??? Error using ==> printMsg Too many input arguments. ??? Error using ==> printMsg Too many input arguments. >> pause Also i got no error message when sending packets. It's just the receiving part that i'm having trouble with. This is the tutorial i'm following. As you can see, i didn't make much progress on my own. http://www.tinyos.net/tinyos-1.x/doc/tutorial/matlab.html Please let me know if you have any idea why this is happening. I'm desperately in need of help. I would greatly appreciate it if you can point me to the right direction. Thanks a lot. HUA. _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
