[SOLVED] Serial USB, can't get it to connect

And I think the problem might not be with the code in itself but the execution. Could you please elaborate how you connected yourself to the internet.

I have the Arduino Uno R3 connected to Windows 10 computer via USB, which connects to router via ethernet, connected to modem.

I have followed the Blynk example
http://docs.blynk.cc/#hardware-set-ups-arduino-over-usb-no-shield
and


also,
https://github.com/blynkkk/blynk-library/wiki/USB-Serial

Hi,

Sorry to say, but I have the same problem as tbarritt reported above and I can not see any solution in the post or other posts that would help me.

The problem is a connection time-out as well as the app shows the Arduino Uno to be off-line.

In order to keep it simple I have used the Get started-code from Blynk - “Arduino Uno / Serial/USB / GettingStarted/BlynkBlink” without modifications. The USB-script has been run with COM3.

I have a feeling that it is a connection problem to the cloud server. I have connected both via the normal router and a mobil connection as well as tried on Win10 and Win7.

I am a bit stuck here and would appreciate some advice.

I exclusively use USB link for all my Arduinos… mainly because I have no other option at this time :slight_smile: So here are my hints and tips:

AVOID all references to the same serial connection that the link utilises. That means you MUST modify many of the examples to comment out #define BLYNK_PRINT Serial and duplicate Serial.begin(9600); lines.

Do not open the IDE monitor, or any other terminal program (if on same COM port)… common sense you say?? perhaps, but sometimes I have had a minimised window that I forgot to close :blush:

Speaking of minimised windows or forgetting… always make sure your batch script IS running, on the correct server designation (cloud or local IP), COM port and BAUD rate, as well as not showing any errors or repetitive connection attempts.

When lockup/disconnect issues happen, the best way to reconnect is to close and restart the batch file script… while I have seen it automatically reconnect at times, it is not always reliable. That said, I have had links that have lasted days, with glitches but still reconnect, eventually, particularly if I close the app (but not stop the project) then reopen the app.

Don’t attempt to do too much, or assume that a faster BAUD rate is better… basic serial communication does not have the same packet error correction as TCP/IP, so some data might get missed and cause continuity issues.

1 Like

At risk of double redundancy… :wink: I should point out that it is NOT a directly server related issue! The USB link is just that, a link between two differing types of communication (RS-232 and TCP/IP), so the old adage “garbage in, garbage out” applies: The server looks for data via TCP/IP and if that data gets garbled up in the translation, then no worky worky.

As it has been mentioned to me in this forum, get a proper connection :stuck_out_tongue: … USB link is a temporary, quick and dirty “benchtop” troubleshooting solution to get a basic Arduino communicating with a server, before setting it loose with proper ethernet communication (tethered or wirelessly).

Thanks for the info Gunner. I just gave up yesterday and tried to connect through ethernet instead which works perfect :slight_smile:

Hi Gunner,

I am a new member and also experiencing the same issues as the tbarritt and ulle2. After executing blynk-ser.bat -c COM4 -b 9600 -s 46.101.143.225 -p 8442
The Arduino UNO responded with a DSR is OFF. Also, the Blynk app says it’s offline.

My question is, what is DSR? Is there some kind of relationship between DSR and the offline message from the Blynk app?

I like to think of myself as a problem solver and not ready to give up :slight_smile:
If you have other ideas, other than those above, I am happy to try out. Thanks!

I don’t have a clue what DSR means but OFF is good, your problem is elsewhere.

Maybe wrong token, maybe not closing Serial Monitor etc.

I verified the serial monitor was not open. Doesn’t appear to be an issue with the token either. The token that is programmed matches the one provided by the app as can be seen from the serial monitor.

Could please give a more detailed description about the “offline” message?

Also another thing, under the iOS phone setting, the Blynk app’s default server is:
127.0.0.1
5555

I assume that should match the blynk-ser.bat’s settings? In any case I changed them to match the script’s settings but still get the “offline” message.

Just had a thought, could it be that my Windows7 firewall be blocking access? If so, is there a way to circumvent this?

Are you using Blynk’s Cloud Server or your own Local Server?

No. I also use USB link on Windows 10. no issues or setup required with firewall or AV.

I followed the instructions that ran blynk-ser.bat script so would that constitute using the Blynk server? I’m not totally sure.

@tanos1 Well, if you are unsure then you are probably not using a local Server :slight_smile:

The blynk-ser.bat script is just a translator between Serial and TCP/IP… and generally all one needs to modify is the COM port. It will work automatically with Cloud Server (unless you change that info as well… which if you don’t have a local server, then DON’T change it):

@echo off
setlocal EnableDelayedExpansion

REM === Edit these lines to match your need ===

set COMM_PORT=COM1   <--- Change this to match the COM port that you are using on your MCU
set COMM_BAUD=9600   <--- Match this to the serial speed on your MCU
set SERV_ADDR=blynk-cloud.com    <--- Only change this IF using Local Server... then change it to the internal IP address of your Server
set SERV_PORT=8442

REM === Edit lines below only if absolutely sure what youre doing ===

The reason I had asked which server you where using, is that this is NOT the address for Blynk’s Cloud Server. That setting should look something like this (this is on Android, but I think IOS should be similar):

You only switch to CUSTOM when you are using your own Local Server… or in special situations where you are running into a GEO-DNS issue.

Ok, so now back to why I am getting the “offline” message on the Blynk app :grin:

So then the default server address should be changed to match Blynks server address? I did change it just in case but to no avail.

I was thinking about your comment about the USB->TCP/PI conversion and there maybe differences in signal translation that could be causing this issue. Sounds plausible. Should I focus my attention there? If so, where should I start?

You suggestion is well appreciated!

Sorry, I did not get your last comment so disregard the server address comment

This may be the missing link. How do I get to that setting? I did not see that in the instructions nor did I see it in my app and I believe I am using the latest version.

OK, I have just been going through this whole thread and realised that there are now three? different individuals joined in with this issue… but the first two haven’t shown any conclusions.

It is getting a bit messy :stuck_out_tongue:

@tanos1 Your original post showed this… and you have indicated that you are probably NOT using a Local Server… so what is 46.101.143.225 pointing too?

And what is the missing link?? The app server setting?

Your original post showed this… and you have indicated that you are probably NOT using a Local Server… so what is 46.101.143.225 pointing too?
Initially I was not connecting to the Blynk server using what I know now is an older server called blynk-cloud.cc, so I searched around and say someone;s post suggesting to use 46.101.143.225 which I believe is the same as blynk-cloud.com(new server)

And what is the missing link??
The “Server Settings” you mentioned above. How do I get to it to set it up?

If you are connecting to Blynk’s Cloud Server you don’t do any of your above mentioned “settings”.

Run the script with only the COM port and BAUD settings changed, to match your device, and leave the app just as it is by default (set to BLYNK)… if you can’t find the settings (which is on the login page of the app), then you probably haven’t changed them :stuck_out_tongue:

If you are running the newer IDE and Blynk libraries, you can run the USB script from here and it will take care of COM and BAUD settings for you.

Hey Gunner,

It worked! Thanks!. Not sure what’s different about it but I logged out of the app and logged back in (I could then see the “Server Settings” you mentioned; I have been logged in so I did not see “Server Settings”), and I also reran the script blynk-ser.bat (this time, without the -arguments).

Whatever it is, it works now.

Thanks a lot Gunner!

1 Like