Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
2,683 Views

Sketch won't work after usb cable disconnected.

Hi blynk! I have a problem.

I am using Intel Edison and Blynk Wifi. I have created a local server on my edison and connects it to my router then of course my smartphone too, so they're now in the same network. I am able to control on/off the relays connected to edison but only if I have not disconnected the usb cable to my laptop.

If I disconnected the usb after uploading the code, the sketch won't work, and my smartphone blynk app always tells me that "Intel Edison is not connected" something like that, but if I connect again the usb cable to my laptop then upload the code back, it will work again.

Do you have any idea to solve this? here's the code/sketchhttp://l.facebook.com/l.php?u=http://pastebin.com/2r9YmZXp&h=RAQGFObPvAQGGjjWNu4JHbb9os3Uqrvmi2bBGeX... http://pastebin.com/2r9YmZXp

thank you

17 Replies
Highlighted
Novice
23 Views

Are you able to ping to the edison during its "Intel Edison is not connected"? In other words, does it looses its IP address when you disconnect the usb cable?

0 Kudos
Highlighted
Employee
23 Views

Hi itsmealex56,

I believe that the issue you're describing is a known issue that happens with the latest Yocto image version. I recommend you to re-flash your Edison using the following image version: https://downloadcenter.intel.com/downloads/eula/24910/Intel-Edison-Software-Release-2-1?httpDown=htt... Intel Edison Software Release 2.1

The following thread describes a similar issue and re-flashing the Edison with the image version above fixed it:

Regards,

Diego

0 Kudos
Highlighted
Novice
23 Views

Hi, thank you for responding. I tried clicking the link you provided "Intel Edison Software release 2.1" but redirected to page not found. If you may please fix it? thank you. I am going to try it if it could really fix

0 Kudos
Highlighted
Novice
23 Views

Hi, thank you for responding, Yes I can ping the IP address of the intel edison.

0 Kudos
Highlighted
Novice
23 Views

Hi, this is an update. it seems that my intel edison is already in version 2.1 since I have flash it last January 22. But I'll still reflash it today.

0 Kudos
Highlighted
Employee
23 Views

Hi itsmealex56 ,

Try with this link: http://downloadmirror.intel.com/24910/eng/edison-image-ww18-15.zip http://downloadmirror.intel.com/24910/eng/edison-image-ww18-15.zip

On the other hand, the images could be 2.1, but the release versions are not the same. In order to know what version your Edison has, go to the Edison's terminal and run the following command: configure_edison --version. The output will let you know what your current version is. If I'm not mistaken, you should have the 159.devkit version (or just 159). The image I recommended you to flash is the 146.

Regards,

Diego

0 Kudos
Highlighted
Novice
23 Views

Hi, thank you for the response. I have reflash it to the firmware you have provided above. I have encountered a problem, whenever I type "java -version" always tell me something like there's no java command blah blah. How can I install java sdk? I tried apt-get and opkg but it doesn't install. I need Java sdk for the blynk server to run before I could upload the sketch and test it again if the same problem occurs. Thank you so much.

0 Kudos
Highlighted
Novice
23 Views

Hi, It seems I have found the culprit of my problem, one is the intel USB RNDIS in which after I disconnect the usb cable, the client can't connect to Intel edison which is the server. How can I disable the usb rndis from having dhcp as ethernet? Thank you.

0 Kudos
Highlighted
Employee
23 Views

Hi itsmealex56,

I flashed the Edison with the 146 image version and tested the following Blynk example code: https://github.com/blynkkk/blynk-library/blob/75a6e98fe25a75015b4477b5fafc82d3c688bf4d/examples/Boar... blynk-library/Intel_Edison_WiFi.ino at 75a6e98fe25a75015b4477b5fafc82d3c688bf4d · blynkkk/blynk-library · GitHub. It worked fine, so I'd like to know why you need Java for this. I was able to test the example just after flashing the Edison with the 146 version.

Regards,

Diego

0 Kudos
Highlighted
Novice
23 Views

Hi sorry for the late response. Blynk library is working fine. I have no problem with it, I need to use java for this http://docs.blynk.cc/# blynk-server-why-do-i-need-local-blynk-server Blynk Docs because I am creating a local blynk server on intel edison. To make it clear it goes like this.

But the problem is, after uploading the sketch to edison then disconnect the usb cable to the laptop, Blynk app in client tells me that intel edison is disconnected or offline.

but if I didn't disconnect the usb cable to my laptop after uploading the sketch, Blynk client could send data to turn on and off the relay. Which is why I am puzzled. I tried to list all the possible problems that causes this,

1. Sketch is not working after disconnecting the usb cable from laptop.

 

2. Even though the edison is connected to the wifi router, the client could ping it but app can't contact/communicate to the local server if usb cable is disconnected. I think because of the USB-Ethernet function of the Edison. But I tried to disable the Edison-Ethernet /LAN in windows but still no luck.

 

0 Kudos
Highlighted
Employee
23 Views

Hi itsmealex56,

Let me summarize what we have done so far. You re-flashed the Edison with the 146 image version; however you couldn't run the command java -version on Edison, right? Could you let me know if in the version 159.devkit you are able to run that command? Also, let me know what image version you are currently using: 146 or 159.devkit. You can run the command configure_edison --version for this.

I'm not an expert on Blynk, but from what I can see in the link you shared, Java 8 is required and it seems that it has to be installed in the PC, not the Edison. Anyhow, could you please explain a little bit more? I might be able to help you with it.

On the other hand, I'd say that the issue is because the sketch stops running once the USB cable is disconnected. We can discard or confirm this possible cause from the two you listed with a simple test. Try uploading the Blink example code and then disconnect the USB cable. If the LED stops blinking then, the issue is because the Arduino sketches stop running. As I explained in an earlier post, this is a known issue with the latest image. You should re-flash the Edison with the 146 version to fix it.

Anyhow, I'll be waiting for your clarification because I might have misunderstood what you're trying to do.

Regards,

Diego

0 Kudos
Highlighted
Novice
23 Views

Hi thank you for your response. I am currently back to 159 version and it is confirmed, after I disconnect the usb cable, the led stops blinking, thus, sketch doesn't really stay. I will be reflashing it down to 146 version, but I will be needing your help, I need to have java 8 so i can run the local server of blynk.

I want to clarify, the link i shared about blynk, it is needn't to be installed on pc, but on edison, here is the screen shot

I have installed it the same way of installing it on a r.pi

 

Additional question, can you help me how to automatically launch the server everytime intel edison boots up? the tutorial in blynk document is only for r.pi. I tried it but i can't seem to succeed.

Thank you so much for your help. Godspeed!

0 Kudos
Highlighted
Employee
23 Views

Hi itsmealex56,

How did you install Java previously? Just to clarify were you running the 159 image version, or the 159.devkit? I'm asking just to be sure, because there are two 159 versions: the 159 version and the 159.devkit version.

Additionally, the command apt-get is not supported by Edison. You mentioned that you installed Java on Edison like installing it on Raspberry Pi, but since the apt-get command is not supported, I'm wondering how you installed it on Edison when using the 159 version. Did you follow another guide for Edison?

Regarding your other question, I recommend you to check the following post: . It explains how to run a script when the Edison boots.

Regards,

Diego

0 Kudos
Highlighted
Novice
23 Views

Hi, it is 159.devkit image version. I don't know but it just that when I tried java -version, there is already installed java 8 on 159.devkit, perhaps a devkit image has pre-installed java? another question, is it normal after the sketch uploaded to edison, then i turn off the edison via removing the power supply then turn it on back but sketch is not working again? I tried the blinking example, sketch is working even I disconnect the usb cable, but when I power off it then power it on back, led is not blinking. hmmmm

0 Kudos
Highlighted
Employee
23 Views

Hi itsmealex56,

Thank for the information. Let me check if I'm able find a way to run the server of Blynk. I'll check the Arduino sketch issue that you described too. I'll post additional information soon.

Regards,

Diego

0 Kudos
Highlighted
Novice
23 Views

Thank you so much for helping me. I tried flashing 159 image version too and confirmed that there is no preinstalled java sdk. The 159.devkit version has a preinstalled java sdk. I am trying to look for a 146.devkit image version but I couldn't find it. Is it possible that only the 159 version has a devkit version?

0 Kudos
Highlighted
Employee
23 Views

Hi itsmealex56,

Sorry for the delay. I've been trying to install jdk sources and openjdk with no success so far. An alternative suggestion is to follow this workaround for the Arduino sketches: . The workaround has been tested with the 159 image version, however I recommend you to follow it using the 159.devkit version instead since this is the version that has the SDK already installed. Let me know if it works.

Regarding your last question, there isn't a 146.devkit image version only 146.

Regards,

Diego

0 Kudos