Getting started with A13 and Zigbee PIR (Help Needed)

Started by nickola, July 01, 2014, 01:56:01 PM

Previous topic - Next topic

nickola

Hello!

Today I am very excited to join the Olimex community and start learning new things. I just got my А13 WIFI delivered, as well as a SD card with Debian and MOD-ZIGBEE-PIR. I would like to apologize in advance, if my questions sound lame - I am a system administrator with excellent knowledge of Linux, however this is my first journey in the world of devices assembly and programming. I know that I have a lot to learn, so please do not mock me :)

I have successfully set everything up to a state where I can start experimenting with the board using SSH. At the GitHub repository, there is a great example for connecting MOD-ZIGBEE-PIR and reading data from it, but I am unable to make it properly. I have tried searching, however I was not able to find the right answer (probably not looking where I should?).

When I try to make it, I am getting the following:

root@a13-OLinuXino:/home/nickola/zigbee# make
gcc -c -Wall main.c
main.c: In function 'main':
main.c:120:4: warning: passing argument 2 of 'fputs' from incompatible pointer type [enabled by default]
/usr/include/stdio.h:682:12: note: expected 'struct FILE * __restrict__' but argument is of type 'char *'
main.c:120:4: error: too many arguments to function 'fputs'
make: *** [main.o] Error 1

I am referring to this example from GitHub:

https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/MOD-ZIGBEE

Can you give me some hints (or a solution) to this problem, as well as give me a brief overview of what the learning curve should be - where do I start. I have great will to learn new things, but I will need some guidance where do I begin. Your help will be much appreciated!

JohnS

Looks like a corrupt file.  Email support and ask for a fix.

John

nickola

Thank you for your input. Can you guide me how to contact Olimex's support? I thought this forum is serving for this purpose.

JohnS

I'd try their home page, maybe they have a Contact Us or whatever

John

vinifr

Quote from: nickola on July 01, 2014, 01:56:01 PM
Hello!

Today I am very excited to join the Olimex community and start learning new things. I just got my А13 WIFI delivered, as well as a SD card with Debian and MOD-ZIGBEE-PIR. I would like to apologize in advance, if my questions sound lame - I am a system administrator with excellent knowledge of Linux, however this is my first journey in the world of devices assembly and programming. I know that I have a lot to learn, so please do not mock me :)

I have successfully set everything up to a state where I can start experimenting with the board using SSH. At the GitHub repository, there is a great example for connecting MOD-ZIGBEE-PIR and reading data from it, but I am unable to make it properly. I have tried searching, however I was not able to find the right answer (probably not looking where I should?).

When I try to make it, I am getting the following:

root@a13-OLinuXino:/home/nickola/zigbee# make
gcc -c -Wall main.c
main.c: In function 'main':
main.c:120:4: warning: passing argument 2 of 'fputs' from incompatible pointer type [enabled by default]
/usr/include/stdio.h:682:12: note: expected 'struct FILE * __restrict__' but argument is of type 'char *'
main.c:120:4: error: too many arguments to function 'fputs'
make: *** [main.o] Error 1

I am referring to this example from GitHub:

https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/MOD-ZIGBEE

Can you give me some hints (or a solution) to this problem, as well as give me a brief overview of what the learning curve should be - where do I start. I have great will to learn new things, but I will need some guidance where do I begin. Your help will be much appreciated!

Well, you could replace fputs() by printf() and should works. The problem there is that the function is being used wrongly: the correct use is int fputs( const char * str, FILE * stream );