Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help required #2

Open
cache91 opened this issue Jan 24, 2014 · 14 comments
Open

Help required #2

cache91 opened this issue Jan 24, 2014 · 14 comments

Comments

@cache91
Copy link

cache91 commented Jan 24, 2014

Hey I am a newbie to microcoap. I wanted to implement this microcap code in arduino uno with ethernet shield. I have a few queries.

  1. The .ino code implements a CoAP server on arduino right ?
  2. Does it use all the files , i.e., the endpoints.c and main-posix.c files to during complilation ?
  3. How does the whole code funtion ?

I know this is not the correct place to post this. Apologies for the same.

@tobyjaffey
Copy link
Contributor

  1. Yes.
  2. All of the files except for main-posix.c - this is an implementation of main() for POSIX (linux/osx, etc)

Open the extra c files in tabs before compiling.
http://arduino.cc/en/Hacking/BuildProcess

@cache91
Copy link
Author

cache91 commented Jan 27, 2014

@tobyjaffey :Hey , it is throwing out the error of multiple declaration when I try compiling. Here is the screenshot of it.
arduino_error

@tobyjaffey
Copy link
Contributor

Try removing main_posix.c

@cache91
Copy link
Author

cache91 commented Jan 27, 2014

@tobyjaffey : Hey sorry to keep on bothering and nagging you. I have a problem ( once again ). I hope this is and will be final issue. Here is the problem:

  1. When i compile and run the program , it is working fine. IT gets compiled and I then open the serial monitor. Actually it should print the IP address. But instead what happens is that it prints random charecters ( like tose boxes). Sometimes it never prints anything and just scrolls the blank screen. Sometimes neither. I tried checking whether it is the problem with the shield by running a test program to print the IP address. It worked perfectly and so is the Arduino Web server example program. I don't seem to understand why it is acting so strange.

For ur info I am using a Arduino Mega328p in a Xbee PRO board with a USB converter board. (since the Xbee PRO board does not have a USB output).

@tobyjaffey
Copy link
Contributor

In microcoap.ino, we set the serial baud rate to 9600, check that this is the same as your test program.

@cache91
Copy link
Author

cache91 commented Jan 27, 2014

Yes yes. I did set the baud rate to 9600 as always. Also it is not prining any statements mentioned in the setup protion of the code.

@tobyjaffey
Copy link
Contributor

I suggest that you start from your working code and merge in mine until you find the cause of the fault.

@cache91
Copy link
Author

cache91 commented Jan 28, 2014

@tobyjaffey : Thanks a lot for your inputs. !! Fixed the problem. The problem was not on the baud rate, but it was a memory issue. The board that I had did not have enough RAM and hence the code did not run as expected and gave unpredicatable reuslts. Reduced the sizes of some variables and it did the trick. Still have some tweaking to do , to make the code fit into the board.

But anyway thanks a lot for answering to my issues !!!

@renzoe
Copy link

renzoe commented Jan 28, 2014

I've been following the issue. Thanks for this micro implementation of coap.
@cache91 Im also interesting on this runnin on an arduino uno (haven't tested it yet), would it be possible for you to can you fork this repo with the relevant modifications you made?. If I have some time here maybe I can also help you to make it fit into a Arduino Uno.

@cache91
Copy link
Author

cache91 commented Jan 28, 2014

@renzoe : Hi-5 !! Initially i tried to run the code as such. It just displayed a blank screen in the Serial monitor and did not print anything. So after commenting out a few sections the code was running. Yes i shall fork this repo ! U can look into it. I am using ATmega 328p which is very similar to the UNO board.

@cache91
Copy link
Author

cache91 commented Jan 28, 2014

@renzoe : Did a fork..! U can check it out now !

@renzoe
Copy link

renzoe commented Jan 28, 2014

@cache91 thank you! Ill check it!

@jimmy-123
Copy link

hello,i downloaded the microcoap zip file and i import it on the arduino (uno with ethernet shield) , but when i open the example and compile it i got a lot of errors , for example: "error: 'coap_rw_buffer_t' does not name a type" ; i didn't understand what it means im new with arduino.
and another favor plz could anyone explain to me this example, what it is going to do?

@dsyech
Copy link

dsyech commented Mar 16, 2017

Hi.. I try to modify this code for ESP8266, but find some errors. Do you have any reference to edit this..? thank you...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants