11 Replies Latest reply on Jan 25, 2017 3:48 PM by Intel Corporation

    Unable to upload large Node app to my Edison

    andr01dm

      Hello.

       

      Using the XDK I've coded a number of small test apps and have no issues with uploading them to, and running them on, my Edison.

       

      My latest app uses the Watson Developer Cloud, but I'm unable to upload it.  The upload starts ok, but take a long time and the XDK disconnects from the Edison part way through.  After I go through reconnecting, if I can get it to reconnect, the XDK does not respond at all when I click on the 'upload' button.  Closing and re-starting the XDK does clear the connection issue, but then I'm back to square one with trying to upload my app, having it disconnect part way through, etc., etc.

       

      I've checked via a serial connection (PuTTY) that the Edison still has the same IPv4 address and is running.  (Note: I do have to shut down USB0 before I can get the XDK to connect at all.)

       

      Is there a way to make the XDK's wifi connection to the Edison more stable?

       

      Is there a way to upload my app using a serial connection instead of the wifi?

       

      Am I missing something that I should be doing to get the upload to work?

       

      Thank you.

        • 1. Re: Unable to upload large Node app to my Edison
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello andr01dm,

          Thank you for interest in the Intel® Edison Breakout Board.

          There is an alternative method, called using Ethernet over USB, it is used when you are in an unstable network. It is compatible with XDK and you can connect to your board to upload your apps. A guide to setup your Ethernet over USB connection can be found here https://software.intel.com/en-us/connecting-to-intel-edison-board-using-ethernet-over-usb

          Regards,
          Andres

          • 2. Re: Unable to upload large Node app to my Edison
            andr01dm

            Thank you, Andres.

             

            Do you know if this method requires the use of the Arduino base for the Edison?  I'm using a Sparkfun Base Block.  I've tried the commands in Ubuntu, but "sudo ifconfig usb0 192.168.2.2" responds with:

             

            SIOCSIFADDR: No such device

            usb0: ERROR while getting interface flags: No such device

             

            When I run "ifconfig" on it's own there is no usb0 device in Ubuntu.

            • 3. Re: Unable to upload large Node app to my Edison
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hello andr01dm,

              The method suggested is compatible with your Sparkfun Base Block, it shouldn’t alter the 

              It seems that the reason the command “sudo ifconfig usb0 192.168.2.2” responds No such device is because you are shutting down usb0 before connecting to the XDK. 

              Since you shouldn’t have to shut down usb0 in order to connect to the XDK, that’s an issue that may have to be taken care of before trying other troubleshooting. This was a known issue, are you sure you are using the latest versions? Please check the following links to make sure your software is up to date:
              https://software.intel.com/en-us/intel-xdk
              https://software.intel.com/en-us/flashing-firmware-on-your-intel-edison-board-linux

              Could you please try the method suggested without shutting down usb0 (or after downloading the latest versions)?

              I’ll be waiting for your response.

              Regards,
              Andres

              • 4. Re: Unable to upload large Node app to my Edison
                andr01dm

                Hi Andres.

                 

                I'm using XDK version 3759, which is the latest version for download on Intel's site.  The Yocto version on my Edison is from the current "iot-devkit-prof-dev-image-edison-20160606-patch" download, also on the Intel website.  But with these I am unable to connect the XDK to my Edison unless I first shut down 'usb0' on the Edison.  On the first connection attempt, if usb0 is still running, I get "Error on ssh connection: Error: Timed out while waiting for handshake" after which the XDK is no longer able to see the Edison at all; refreshing the device list causes it to disappear.  Even re-starting the XDK, it can no longer see the Edison.  Shutting down usb0 on the Edison fixes the problem and I'm able to connect to it over wifi from the XDK.

                 

                I have a couple of questions about the instructions for setting up a serial connection for the XDK to use:  The command "sudo ifconfig usb0 192.168.2.2", is this supposed to be run on the Linux computer that I'm trying to connect to the Edison, or on the Edison.  The instructions aren't clear on this.  Also, why should I now be able to "ping your board on address 192.168.2.15", where did 192.168.2.15 come from, isn't the ifconfig command using 192.168.2.2?

                 

                Thank you.

                • 5. Re: Unable to upload large Node app to my Edison
                  Intel Corporation
                  This message was posted on behalf of Intel Corporation

                  Hello andr01dm,

                  The command sudo ifconfig usb0 192.168.2.2 is supposed to be runned on your Linux computer.

                  The 192.168.2.2 is a private IP address used on local networks, while 192.169.2.15 is the default IP address, and it has to be changed if your Edison has another one (use the command configure_edison –showWiFiIP to show what IP address your Edison has).

                  Regarding the usb0 issue, please check the following thread, it seems that some members experienced the same issue because the XDK daemon is not running:
                  https://communities.intel.com/thread/56292 

                  I hope you find the previous information useful.

                  Please let me know the outcome of the previous suggestions.

                  Regards,
                  Andres

                  • 6. Re: Unable to upload large Node app to my Edison
                    andr01dm

                    Hello.

                     

                    I tried following the instructions for Windows, and was able to connect over USB serial without any issues.  With the Sparkfun Base Block it requires using the 'OTG' socket, instead of 'Console'.  I'm able to connect to and upload my app to the Edison using the XDK and it is much, much faster.

                     

                    Unfortunately 'node-gyp' does not appear to work on Windows, meaning my Edison application will not build once it's uploaded to the device.

                     

                    I've re-tried setting up the serial over USB connection in Ubuntu, but even using the 'OTG' port on the Base Block does not create a 'usb0' interface.  When I plug it in and run 'ifconfig' to view the interfaces, the Edison appears as:

                     

                    enp0s20u2 Link encap:Ethernet  HWaddr 5a:24:3f:74:21:79 

                              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                              RX packets:205 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:120 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:15734 (15.7 KB)  TX bytes:26921 (26.9 KB)

                     

                    ...rather than as 'usb0'.  So the 'sudo ifconfig usb0 192.168.2.2' command return the error:

                     

                    SIOCSIFADDR: No such device

                    usb0: ERROR while getting interface flags: No such device

                    • 7. Re: Unable to upload large Node app to my Edison
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      Hello andr01dm,

                      Can you please check if the XDK daemon is running? That may help us determine if that issue is responsible for the “No such device” error. Here is the link to the thread https://communities.intel.com/thread/56292.

                      I’ll be waiting for your response. 

                      Regards,
                      Andres

                      • 8. Re: Unable to upload large Node app to my Edison
                        andr01dm

                        Hi Andres.

                         

                        Sorry, I forgot to include that in my last response.  I assumed the XDK Daemon must be running as I have successfully uploaded and run various applications on my Edison already.  However here is the output of the command to check the status:

                         

                        root@myEdison_One:~# systemctl status xdk-daemon -l

                        ● xdk-daemon.service - Intel_XDK_Daemon

                           Loaded: loaded (/lib/systemd/system/xdk-daemon.service; enabled)

                           Active: active (running) since Tue 2017-01-17 03:07:21 UTC; 29s ago

                        Main PID: 291 (xdk-daemon)

                           CGroup: /system.slice/xdk-daemon.service

                                   ├─291 /bin/sh /opt/xdk-daemon/xdk-daemon

                                   ├─295 /usr/bin/node /opt/xdk-daemon/main.js

                                   └─349 /usr/bin/node /opt/xdk-daemon/current/appDaemon.js

                         

                         

                        Jan 17 03:07:21 myEdison_One systemd[1]: Started Intel_XDK_Daemon.

                        Jan 17 03:07:21 myEdison_One xdk-daemon[291]: /node_app_slot exists and is a symbolic link.

                        Jan 17 03:07:25 myEdison_One xdk-daemon[291]: Current daemon started

                        Jan 17 03:07:26 myEdison_One xdk-daemon[291]: Loading /opt/xdk-daemon/config.json last modified: Tue Jan 17 2017 03:08:33 GMT+0000 (UTC)

                        Jan 17 03:07:26 myEdison_One xdk-daemon[291]: starting on baseport = 58888

                        Jan 17 03:07:26 myEdison_One xdk-daemon[291]: MDNS Broadcast Sent:58888

                         

                        It does appear to be running, although it is showing the wrong date.

                        • 9. Re: Unable to upload large Node app to my Edison
                          Intel Corporation
                          This message was posted on behalf of Intel Corporation

                          Hello andr01dm,

                          In a previous post you mentioned that you were able to connect over USB serial without any issues when you followed the instructions for Windows. But that “unfortunately ‘node-gyp’ does not appear to work on Windows”. Please check this link that discusses the installation of node-gyp on Windows: https://github.com/nodejs/node-gyp/blob/master/README.md. I know the process may seem complex, but if you were able to upload your app “much, much faster”, perhaps you should give it a try.

                          Thank you for the information provided, it seems that your XDK Daemon is running, nevertheless, could you please reinstall the XDK Daemon following the steps provided in this thread https://communities.intel.com/message/427706#427706?

                          I’ll be waiting for your response.

                          Regards,
                          Andres

                          • 10. Re: Unable to upload large Node app to my Edison
                            andr01dm

                            Hello Andres.

                             

                            I had used the Option 1 method for setting up node-gyp, and that did not work for me.  So I uninstalled the windows-build-tools and tried Option 2 instead.  It appears to be working now! \o/  I'm able to quickly upload the app to my Edison using serial to USB and the build process completes.  (My app has errors, but that's a different issue.)

                             

                            I also tried the steps for re-installing the XDK daemon, but ran into an error.  In step 2 it says to install something called the AlexT repository, which I have never heard of before and have no idea what it is for.  So I skipped that, went on to the uninstall the daemon step, and found that the install daemon step would not work:

                             

                            root@myEdison_One:~# opkg remove xdk-daemon

                            Removing package xdk-daemon from root...

                            rm '/etc/systemd/system/multi-user.target.wants/xdk-daemon.service'

                            root@myEdison_One:~# opkg install xdk-daemon

                            Unknown package 'xdk-daemon'.

                            Collected errors:

                            * opkg_install_cmd: Cannot install package xdk-daemon.

                             

                            I imagine that the AlexT repo is required for this to work.  I attempted to use the XDK to re-install the daemon but it would not connect to my Edison.  I re-flashed using the Intel Edison Setup app, went through configuring Yocto again, and was able to connect over serial USB to install the daemon and libraries.  Everything seems to be good now.

                             

                            Thank you very much for your assistance.

                            • 11. Re: Unable to upload large Node app to my Edison
                              Intel Corporation
                              This message was posted on behalf of Intel Corporation

                              Hello andr01dm,

                              Thank you very much for sharing your experience with the community, we really appreciate it.

                              Regards,
                              Andres