Hi Nicole, Make sure you define the AM type in the same .h file you also define the message format. In the file where you declare the SendNonceMsg (ie. where there is something like "typedef nx_struct SendNonceMsg") you should also have something of the form:
enum { // ... other constants AM_SENDNONCEMSG = x, // where x is your AM type // ... other constants } You can find more about this in the tutorial about Mote-PC serial communications (look at the section "MIG: generating packet objects"): http://docs.tinyos.net/index.php/Mote-PC_serial_communication_and_SerialForwarder Cheers, Urs Nicole Neureiter wrote: > Hello everybody, > > while compiling an running one of my programs I encountered the problem that > using mig to produce a message class for java set the AM Type to -1 also I > set > it otherwise. So I get the message "java.io.IOException: unknown AM type for > message SendNoncesMsg" which is ok, because it is not the right AM Type. But > how do I get it to use the right type I gave it? I have some other Message > types defined with wich I haven't got a problem. Any Ideas how I can solve > this > problem? > > Nicole Neureiter _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help