7 Replies Latest reply on May 7, 2015 6:51 PM by CMata_Intel

    Serial Port problems

    ruben_vleuten

      Hi,

       

      At the moment I'm working on a project where I use the Edison with the Arduino breakout board. This Edison is connected to a Mac Mini and this project will run on itself. The goal is to have the Mac Mini run together with the Edison where they communicate via Serial. The whole setup should run from startup without any other action then switching the Mac Mini on. I have everything running, but sometimes when the Mac is starting up, it can not find/ identify the Edison Serial. In order to discover it I have to unplug and plug the USB cable again (from edison to MAc). Then the serial pops up and I can use it. But this action of plugging and unplugging is not desired. Now I have two questions.

       

      Is this a common problem (the fact that the serial port is not detected on boot/ start up of a Mac) and is there a way to fix this?

      Is there a way in the Arduino IDE to let the Edison reset itself soIi create by software the same effect as plugging the usb port out and in?

       

      Hope someone can help.

       

      cheers,


      Ruben

        • 1. Re: Serial Port problems
          CMata_Intel

          Hi ruben_vleuten

           

          I think the issue you are having is not with the Edison itself but with the initialization of the driver while the PC is booting and loading the drivers. Have you tried to re-install the drivers?  Have you check for Software updates in your PC?

           

          Regards;

          CMata

          • 2. Re: Serial Port problems
            ruben_vleuten

            I've updated the FTDI drivers and also updated the whole operating system to the latest version OSX 10.10.4. This was not solving the issue. So I hoped that the restart would be work around. So would it be possible to restart the Edison using code (in Arduino IDE)? Or do you have alternative suggestions?

             

            Cheers,

            R.

            • 3. Re: Serial Port problems
              CMata_Intel

              Hi ruben_vleuten

               

              You can restart the board using system("reboot") but you have to remember that when the board reboots will also load the sketch again so it will reboot again until you upload a different sketch to the board, I do not recommend this but is a way to reboot the board using the Arduino IDE. Trying this, may restart the boot infinitely.

              One thing we could try is disabling and enabling the ports in the PC maybe you can restart the services using the Terminal in your PC.

               

              Regards;

              CMata

              • 4. Re: Serial Port problems
                ruben_vleuten

                Hi CMata,

                 

                I'm still struggling with this Issue. I've found a workaround on the Mac side. I can find the port when I reset the Edison by pressing the SW1UI5 (RESET), button on the Edison Arduino shield. The problem is that this kills all the IO ports.

                 

                The sketch seems to be running fine, but the IO's simply stop working. They start only when I totally unplug the board (so take of all power) and then plug it in. Then it reboots fine.

                 

                I've read some other people having the same problem (), so I was wondering if there is a fix already to make sure the ports keep working?

                 

                Cheers,

                 

                R.

                • 5. Re: Serial Port problems
                  CMata_Intel

                  Hi ruben_vleuten

                   

                  What do you mean with the IO's stop working? How are you testing this?

                  You can try running this on your board:

                  root@edison:~# echo 1 > /sys/module/intel_mid/parameters/force_cold_boot
                  

                  MRAA stopped working

                   

                  Regards

                  CMata

                  • 6. Re: Serial Port problems
                    ruben_vleuten

                    I'm not programming using python, but I use the Arduino IDE. It might be there is a bug there. Like I explained before the I/O-ports stop working as soon as I use the Reset switch:

                     

                    I wrote a sketch that will control a series of LED-strips and sensors. It all works fine up to the point I reset the module using the Physical switch (SW1U15). The module resets and the program still runs (serial works), but all I/O stops responding. I wrote alternative sketches and even a simple blink is producing the same issue.

                     

                    As soon as I plug/ unplug the Edison afterwards it all works like normal again. So it seems like there is something happening (or not happening) on bootup after reset using the SW1U15-switch. I'm not sure if this is purely an Arduino IDE problem. I have no experience programming the Edison using python.

                    • 7. Re: Serial Port problems
                      CMata_Intel

                      Hi ruben_vleuten

                       

                      A cold boot will help you with this. Let's try this, create a new session for using the terminal console, you can use Putty.

                      Then enter the following line:

                      root@edison:~# echo 1 > /sys/module/intel_mid/parameters/force_cold_boot  
                      

                      After this, upload the blink sketch  and when the LED starts blinking press the  SW1U15. When the board stop booting you should be able to see the LED blinking agains, the same should happen with the other GPIOs you are using.

                       

                      Regards;

                      CMata