Device is offline (problem running script)

Hi, i am using blynk server 0.21.0 now. My hardware setup is arduino UNO USB to port COM5.

I succesfully send auth token to my gmail then copy paste into sketch then upload sketch to arduino then i create an app project and when i press play (start/run) it says device is offline. there is nothing in log exept me joining the app.

Someone already had this issue ? maybe i am skipping one important step ?

Thanks alot

sorry i forgot to tell that also, when i run script-ser.bat it says

connect (blynk-cloud.com, 8442 ok
InOut() start
DSR is off
then after a moment:
received EOF
EVENT_CLOSE
InOut() start
DSR is off
Then it loop again forever

So i guess it is related to my problem ?

Thanks

Hi. Yes. Please try to follow step by step instruction. Also pleaes check no firewall or blocked ports on your router.

i have folowed this part correctly :

On Windows:
Open cmd.exe
Write your path to blynk-ser.bat folder. For example:
cd C:\blynk-library-0.3.1\blynk-library-0.3.1\scripts

( i changed this to the right path )

Run blynk-ser.bat file.
For example : blynk-ser.bat -c COM4 (where COM4 is port with your Arduino)

I am port COM5 and i modified it

And press “Enter”, press “Enter” and press “Enter”

when i enter the blynk-ser.bat -c COM5 it do that.
and then nothing happens.

Any idea why ? i turned off my firewall and unlocked ports on port forwarding.

Thank you !

That is correct, right? It’s connected now to the cloud server.

If you want to connect to the local server, edit the BAT file with your local server IP :slight_smile:

1 Like

Thanks Lichtsignaal !!

yeah it make sense i guess i skipped that part on the getting started section ? :pensive: anyways now
what i did is edit bat file like you said, put my local ip adress at the set SERV_ADDR field.

Then it works but only if i have the script running while the server is started. (the script running step never ends)

when i close the script, it says device is offline on the app and i cant toggle the LED anymore.

Also, when i try to open the serial monitor of arduino, it sa1yis Port busy.

Any idea why the script doesnt end ? maybe i need to edit something else ?

Thanks alot for your help

No, that is how it works. The script needs to be running. You can make it into a service using 3rd party tools (e.g. search for bat to service).

1 Like

From my experience (using an UNO), that is normal and good… means it is running. If the server goes off-line or you disable and reconnect your device (that is plugged into COM5) then it might start scrolling until it reconnects again (I can’t remember).

The script is a redirection… er, script… It takes the communication from the device on COM5 and redirects it thru your network to the server, and vice versa. Thus it must be running in order to do it’s thing. Just minimize the window and carry on.

Which leads to your other question…[quote=“Bob, post:6, topic:10253”]
Also, when i try to open the serial monitor of arduino, it sa1yis Port busy.
[/quote]

Only one “purpose” at a time for the USB connection, either program your device, run your device on the network using the script, or view the serial monitor.

In order to do the first and last, you need to disable the script… OR, set up a 2nd serial port (in the case of the UNO, software serial) and with use of a TTL to USB adapter, use one port (typically the built in one) for programming / monitor use. While the 2nd (software serial - TTL to USB) for the script redirection to the network.

1 Like