Community
cancel
Showing results for 
Search instead for 
Did you mean: 
KDavi5
Beginner
1,844 Views

mraa UART functionality

Jump to solution

I'm trying to use mraa::uart in C++ on my Edison. G++ says all of the functions I use with mraa::uart aren't defined. These are the steps I followed for installing mraa libraries:

mkdir mraa/build && cd $_

cmake .. -DBUILDSWIGNODE=OFF

make

make install

When I get to the make step there is no makefile and it fails. Other c++ files using mraa work, just not the uart ones. Attached is a screenshot of the errors received when trying to compile the program. Any help is greatly appreciated.

0 Kudos
1 Solution
KDavi5
Beginner
93 Views

Thanks Romonaga for your suggestions. It turned out that none of these errors were causing the problem. I was following a tutorial which required the use of the "cmake" command. Because I had an out-of-date version of Cmake, this step was not executing fully and thus the MRAA library was never being installed. Updating Cmake allowed the "cmake" command to run all the way through, actually installing MRAA and solving my problem.

View solution in original post

4 Replies
RRobe17
New Contributor I
93 Views

please examine the output from the compile. In many of the issues it is simply you passing the wrong type of variable to the function.

For example, you are passing a std::string where an int is required.

For example, you are passing a std::string where it wants a char array.

If if you are using a std::string and need to pass it as a chat array, simply do .c_str() on your std::string before passing it into the function.

As as to your problem with the int. You need to look at atoi. I suspect once you fix your bugs, you will have better luck compiling. Please fix bugs and report back if you still need help.

idata
Community Manager
93 Views

Hi Kirenny,

 

 

Let's try with the suggestions given by Romonaga, if this doesn't work I suggest you to contact EmutexLabs due that Ubilinux is their image and they could give you more suggestions regarding this.

 

Also, have you tried with the MRAA examples from https://github.com/intel-iot-devkit/mraa/tree/master/examples/c%2B%2B? or are you already using the UART example from there?

 

 

Regards,

 

Charlie

 

idata
Community Manager
93 Views

Hi Kyrenny,

 

 

Have you tried with Romonaga's suggestions?

 

Let us know if you have tried to contact EmutexLabs or if you tried with the MRAA examples.

 

 

Regards,

 

Charlie

 

KDavi5
Beginner
94 Views

Thanks Romonaga for your suggestions. It turned out that none of these errors were causing the problem. I was following a tutorial which required the use of the "cmake" command. Because I had an out-of-date version of Cmake, this step was not executing fully and thus the MRAA library was never being installed. Updating Cmake allowed the "cmake" command to run all the way through, actually installing MRAA and solving my problem.

View solution in original post

Reply