[SOLVED] Arduino UNO is Offline

So I downloaded the app, filled in the auth token from my email and downloaded the code directly from codebender. I then created a button widget connected 10 D7 and started running the project. Unfortunately, it told me that my “Arduino UNO is Offline”. What can I do to get this working?

How does your Uno connect to Blynk (USB, ESP, Ethernet etc)?

I connected my arduino to my macbook using a usb.

Heaps of info on where to start. Do a bit of research and testing, then if you still need help, give us more information. Like, how are you connecting to the Internet? What does the serial monitor output say?

Sorry, that link may not be as relevant if you are using USB. It does still have some good info in it.

The folk who are not able to connect with USB generally forget to open the gateway. Have you ran the bat (Windows) file in the script folder or equivalent for Mac’s?

What do you mean? I have only been looking off of the getting started tutorial and do not know of a script for mac. Sorry, I am really new to this.

@megalodon67 the details for a USB connection are at http://docs.blynk.cc/#hardware-set-ups-arduino-over-usb-no-shield.

As well as the app and the sketch it points out the following:

2. Run the script which is usually located in /scripts folder:
Windows:My Documents\Arduino\libraries\Blynk\scripts
Mac User$/Documents/Arduino/libraries/Blynk/scripts

There is nothing in the sketch or the app that connects the Uno to the server. The script opens a gateway on your USB. Hope this helps.

Please help me to understand. Was I supposed to download that. I don’t have the library or anything downloaded… Just the code on the board from codebender.

@megalodon67 Hello. When working with codebender - it uploads code directly to your device via browser so there is no need to install library. But in case you just copy code to your IDE you need to install library. Please follow getting started instruction.

You say to install the library when using the IDE. But I used Codebender… Should I install the library and run the script? If so how would I do that?

@megalodon67 Codebender will not give you USB access. The sketch from codebender is ok but you also need to run a script on your Mac (or Windows machine).

The script is available at https://github.com/blynkkk/blynk-library/releases/download/v0.3.1/Blynk_v0.3.1.zip

Unzip the full Blynk package and then go into Blynk directory and scripts subdirectory.

1 Like

Since I am on mac how would I run the .bat script file?

I tried to run the .sh file in terminal but was told that it uses socat and that I need to install that first… Is this right?

@megalodon67 yes. this is correct. There should be also link on how to install it.

@Costas yeah, you are right. Forgot that codebender will not run script for user :grinning:.

So when I tried that it said to install home-brew, and when I tried that it said to install X-Code. Is that what I should do?

Installed all of the necessary files, but when I run it, I get this error repeating:
$ ./blynk-ser.sh [ Press Ctrl+C to exit ] /dev/tty.usbmodem not found. Select serial port [ /dev/tty.usbmodem1421 ]: Resetting device ... stty: hupcl: No such file or directory Connecting: GOPEN:,raw,echo=0,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,ispeed=9600,ospeed=9600,crtscts=0 <-> openssl-connect:cloud.blynk.cc:8441,cafile=/Users/TheBoys/Desktop/blynk-library-master/scripts/certs/server.crt,nodelay 2016/02/07 09:34:52 socat[15124] N opening undef "" for reading and writing 2016/02/07 09:34:52 socat[15124] E open("", 01006, 0666): No such file or directory 2016/02/07 09:34:52 socat[15124] N exit(1) Reconnecting in 3s...

Please help promptly!

Am I running blank-ser.sh or a different script?

When you see

Select serial port [ /dev/tty.usbmodem1421 ]: 

copy paste “/dev/tty.usbmodem1421”, so it should be

Select serial port [ /dev/tty.usbmodem1421 ]: /dev/tty.usbmodem1421