1 2 Previous Next 18 Replies Latest reply on Aug 15, 2017 2:15 AM by ctan94x_intel

    creating a new C project in Intel System Studio IoT Edition failed

    xiaobudian_123

      Hi everyone,

           I have a Grove* IoT Commercial Developer Kit which includes a intel NUC(DE3815TYKE)Intel® IoT Gateway Technology | Intel® Software

       

           when i create a new c project in Intel System Studio IoT Edition with the guide link:IoT  , I met some problems.

       

           I can't finish step 8,after about 5 minutes, the project still have not created successfully. so I close the  eclipse platform. when I lanch the eclipse platfore once again,I find the project I created a few minutes ago.However, there is an error:MRAA_INTEL_JOULE_EXPANSION undeclared. what I said just are shown in  the two pictures as follow.

       

         Is there somebody in the forum who has found this issue and know how to fix it?

           Thanks to every body.

       

           Bo You.

      Intel System Studio IoT Edition Creating a new C C++ project failed.jpg

      MRAA_INTEL_JOULE_EXPANSION undeclared.jpg

        • 1. Re: creating a new C project in Intel System Studio IoT Edition failed
          mohamedshaharris_intel

          Hi Xiao,

           

          We are in progress on debugging this issue.

          Please wait for our update.

           

          Regards,

          Intel Customer Support

          • 2. Re: creating a new C project in Intel System Studio IoT Edition failed
            mohamedshaharris_intel

            Hi Xiao,

             

            I have try it here. I am not able to replicate your issue.

            I use:

            Developer board Intel Galileo and also Intel Joule module.

            4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

            Eclipse Platform Version Mars.2 (4,5,2)

             

            Could you provide more detail on your side?

             

            Regards,

            Intel Customer Support

            • 3. Re: creating a new C project in Intel System Studio IoT Edition failed
              xiaobudian_123

              Hello,

                        The details of the hardware and software in my experiment are as follow:

                        hardware:

                                       The Intel NUC Kit, DE3815TYHE

                        software:

                                     The  OS of the Intel gateway: Intel IoT Gateway Software Suite, which is a free version gotten from https://shopiotmarketplace.com/iot/index.html#/details?pix=58 and the kernel of the operating system is wind river Linux 7.0.0.13.

                                       The OS of my host computer is ubuntu 16.04.    

                                       And install the Intel System Studio IoT Edition with this link:IoT

                        The picture below show the detail of the gateway.

              系统测试图.jpg

               

                         Besides,there is a strange phenomenon,I connect the gateway with a router,and the gateway get a LAN IP 192.168.1.*. On the command line terminal, I can ping www.baidu.com or other host with IP  192.168.1.* successfully with 0% lost. However, I input the IP address in the browser, logining with username root and password root, it show "not connected to network". I don't know whether the phenomenon is related to the problem I met when creating the C project in eclipse platform or not.

              QQ截图20170705093442.png

                   Looking forward to your reply.

               

                   Regards,

                   Bo You

               

               

               

                        

              • 4. Re: creating a new C project in Intel System Studio IoT Edition failed
                mohamedshaharris_intel

                Hi Bo You,

                 

                Could you try to Download Intel System Studio IoT from this link Intel® System Studio IoT Edition | IoT | Intel® Software ?

                Regarding the "not connected to network", that is other issue and not related to the C project in eclipse.

                 

                Regards,

                Intel Customer Support

                • 5. Re: creating a new C project in Intel System Studio IoT Edition failed
                  xiaobudian_123

                  Hi,

                       the Intel System Studio IoT Edition I download exactly from the link you mentioned. And the download file name is l_iss_iot_p_2016.4.008.tar.gz.

                       Is there anything wrong with this version?

                   

                       Regards,

                       Bo You

                  • 6. Re: creating a new C project in Intel System Studio IoT Edition failed
                    xiaobudian_123

                    Hi,

                         Now I can create the C project,I modify the example code with the guide IoT ,which just commenting out some code.And there is no more error:MRAA_INTEL_JOULE_EXPANSION undeclared.

                         Then I run the project code,I can't see the led blinking .There is a new error:MRAA couldn't initialize GPIO. The information in the console as follow:

                     

                     

                     

                    Last login: Fri Jul  7 09:20:02 2017 from 192.168.1.109

                    echo $PWD'>'

                    root@WR-IDP-42C1:~# echo $PWD'>'

                    /root>

                    root@WR-IDP-42C1:~# chmod 755 /tmp/On_Board_LED_Blink;/tmp/On_Board_LED_Blink ;e xit

                    MRAA couldn't initialize GPIO, exitinglogout

                     

                     

                     

                     

                         My project code is shown as follow:

                    /*

                    * Author: Jessica Gomez <jessica.gomez.hernandez@intel.com>

                    * Copyright (c) 2015 - 2016 Intel Corporation.

                    *

                    * Permission is hereby granted, free of charge, to any person obtaining

                    * a copy of this software and associated documentation files (the

                    * "Software"), to deal in the Software without restriction, including

                    * without limitation the rights to use, copy, modify, merge, publish,

                    * distribute, sublicense, and/or sell copies of the Software, and to

                    * permit persons to whom the Software is furnished to do so, subject to

                    * the following conditions:

                    *

                    * The above copyright notice and this permission notice shall be

                    * included in all copies or substantial portions of the Software.

                    *

                    * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

                    * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

                    * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND

                    * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE

                    * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION

                    * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION

                    * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

                    */

                     

                    #include <mraa.h>

                     

                    #include <stdio.h>

                    #include <unistd.h>

                     

                    int main()

                    {

                        // select onboard LED pin based on the platform type

                        // create a GPIO object from MRAA using it

                        mraa_platform_t platform = mraa_get_platform_type();

                        mraa_gpio_context d_pin = NULL;

                        d_pin = mraa_gpio_init(525);

                        /*switch (platform) {

                            case MRAA_INTEL_GALILEO_GEN1:

                                d_pin = mraa_gpio_init_raw(3);

                                break;

                            case MRAA_INTEL_GALILEO_GEN2:

                                d_pin = mraa_gpio_init(13);

                                break ;

                            case MRAA_INTEL_EDISON_FAB_C:

                                d_pin = mraa_gpio_init(13);

                                break;

                            //case MRAA_INTEL_JOULE_EXPANSION:

                            //    d_pin = mraa_gpio_init(100);

                            //    break;

                            default:

                                fprintf(stderr, "Unsupported platform, exiting");

                                return MRAA_ERROR_INVALID_PLATFORM;

                        }*/

                        if (d_pin == NULL) {

                            fprintf(stderr, "MRAA couldn't initialize GPIO, exiting");

                            return MRAA_ERROR_UNSPECIFIED;

                        }

                     

                        // set the pin as output

                        if (mraa_gpio_dir(d_pin, MRAA_GPIO_OUT) != MRAA_SUCCESS) {

                            fprintf(stderr, "Can't set digital pin as output, exiting");

                            return MRAA_ERROR_UNSPECIFIED;

                        };

                     

                        // loop forever toggling the on board LED every second

                        for (;;) {

                            mraa_gpio_write(d_pin, 0);

                            sleep(1);

                            mraa_gpio_write(d_pin, 1);

                            sleep(1);

                        }

                     

                        return MRAA_SUCCESS;

                    }

                     

                          The connection information is shown as the picture below.

                    2017-07-07 17-32-39屏幕截图.png

                        Can you give me some help?

                     

                         Regards,

                         Bo You

                    • 7. Re: creating a new C project in Intel System Studio IoT Edition failed
                      mohamedshaharris_intel

                      Hi Bo You,

                       

                      Could you list down the output for this command:

                       

                      $ ls /sys/class/gpio/

                       

                      I want to clarify the gpio list.

                       

                      Regards,

                      Intel Customer Support

                      • 8. Re: creating a new C project in Intel System Studio IoT Edition failed
                        xiaobudian_123

                        Hi,

                         

                        the result is as follow:

                         

                         

                        youbo@youbo-ThinkPad-T440p:~$ ssh root@192.168.1.126

                        Password:

                        Last login: Tue Jul 11 01:42:13 2017

                        root@WR-IDP-42C1:~# ls /sys/class/gpio/

                        export    gpiochip338  gpiochip382  gpiochip410  unexport

                        root@WR-IDP-42C1:~#

                         

                        Regards,

                        Bo You

                        • 9. Re: creating a new C project in Intel System Studio IoT Edition failed
                          xiaobudian_123

                          Hi mohamedshaharris_intel,

                               can you give me more help about this question?

                               the result of command "/sys/class/gpio" is as follow:

                              

                          exportgpiochip338  gpiochip382  gpiochip410  unexport

                              

                               I still does not sovle the problem by now:MRAA couldn't initialize GPIO, exitinglogout.

                           

                              Regards,

                               Bo You

                              

                           

                          • 10. Re: creating a new C project in Intel System Studio IoT Edition failed
                            mohamedshaharris_intel

                            Hi Bo You,

                             

                            Could you change the gpio for this line from your project code:

                             

                            The default line is:

                             

                            d_pin = mraa_gpio_init(525);

                             

                            Change to, refer the gpio you have.

                             

                            Example:

                             

                            d_pin = mraa_gpio_init(338);

                            or

                            d_pin = mraa_gpio_init(382);

                            or

                            d_pin = mraa_gpio_init(410);

                             

                            Could you tell me also the libmraa version you are using?

                             

                            Thanks,

                            Intel Customer Support

                            • 11. Re: creating a new C project in Intel System Studio IoT Edition failed
                              xiaobudian_123

                              Hi

                               

                               

                               

                              • Secondly,I print the result of function of mraa_platform_t platform = mraa_get_platform_type(); the result is 3,which means the platform is Intel NUC DE3815. it is defined in types.h. So mraa library recognise de3815 platform correctly.

                               

                              typedef enum {

                                  MRAA_INTEL_GALILEO_GEN1 = 0,    /**< The Generation 1 Galileo platform (RevD) */

                                  MRAA_INTEL_GALILEO_GEN2 = 1,    /**< The Generation 2 Galileo platform (RevG/H) */

                                  MRAA_INTEL_EDISON_FAB_C = 2,    /**< The Intel Edison (FAB C) */

                                  MRAA_INTEL_DE3815 = 3,          /**< The Intel DE3815 Baytrail NUC */

                                 ……

                              } mraa_platform_t;

                               

                               

                              • Thirdly, I studied the source code of mraa_gpio_init() function  implementation in gpio.c of mraa library, but I don't which cause the result to NULL.Because I can't debug step in the function mraa_gpio_init().

                               

                              • fourthly, I have took the experiment of connecting arduino 101 to computer,and running code with arduino IDE1.8.3.As a result, I can successfully blink the LED(pin 13). And I also used other digital and analog IO peripheral, the result is OK.However, when I plug on ardinuo 101 to Intel NUC DE3815,hoping the gateway to control the IO peripheral of ardinuo,I get the same error:gpio initialize failed.So I guess maybe there is something wrong with the mraa or firmata.

                               

                              About to the firmata,I upload Stanardfirmata to ardinuo 101.And I use the command in Intel NUC DE3815: find / -name "firmata*",the result is:

                              /usr/include/mraa/firmata.h

                              /usr/share/mraa/firmata101.ino.bin

                               

                              I really doubt whether Intel NUC DE3815 can work well with ardinuo 101.Can you give me some success code demo related to the gateway.Because most code example is suitable for Intel Edison or GALILEO.

                              At last, I still can not solve this problem,so I hope you can help me or contact other Intel engineer to help me.Thank you so much!

                               

                              Warm regards.

                              Bo You

                               

                               

                               

                              .

                              • 12. Re: creating a new C project in Intel System Studio IoT Edition failed
                                xiaobudian_123

                                Hi

                                • 13. Re: creating a new C project in Intel System Studio IoT Edition failed
                                  mohamedshaharris_intel

                                  Hi,

                                   

                                  May I know the MRAA package version you have installed?

                                  Could you list down the MRAA library present on your system?

                                  Could you give the output for command "rpm -qa | grep mraa?

                                   

                                  Thanks,

                                  Intel Customer Support

                                  • 14. Re: creating a new C project in Intel System Studio IoT Edition failed
                                    xiaobudian_123

                                    hi,

                                         the version of mraa is mraa-1.7.0

                                         the result of  find / -name mraa is:

                                    /usr/include/mraa

                                    /usr/share/mraa

                                    /usr/lib/node_modules/mraa

                                     

                                         the result of rpm -qa | grep mraa is:

                                    mraa-1.7.0-r0.0.corei7_64

                                     

                                    Regards,

                                    Bo You.

                                    1 2 Previous Next