Hi guys, what's up?
Yesterday I was trying to build up a simple encription algorithm that takes
a key and a message and do the xor operation bitwise. The problem is i am
new in Tinyos and in c programming as well. So, let me try to explain
better.
I have two keys, k1 and k2 declared like this:
This works for me on mica2:
void func()
{
uint8_t key1[10] = 1234543253; uint8_t key2[10] = 1234543323;
int i ;
uint8_t result[10];
for(i = 0; i 10; i++)
result[i] = key1[i] ^ key2[i];
}
You did name key1,2 differently (k1, k2) in your code snippet
but that should have given a syntax
Hi,
I'm new to nesC and TinyOS. I'm trying to send packet over the radio with
payload is a fixed-size string. When I used char[MAX_STR_LEN] in my message
structure, I received an error saying char[] is not a network type. So I
switched to uint8_t[MAX_STR_LEN].
However, in my module
You might want to brush up on your C pointers,
this is a reasonable resource:
http://en.wikibooks.org/wiki/C_Programming
Basically you need to copy your string into your buffer,
both errors you show are attempts at pointer assignment
which is a different beast. The string.h functions should
be