Issues using USB link - DSR is off - project is offline

Hi Guys

I am new to Blynk. I have an arduino uno hooked up via USB. I have taken a plain vanilla example, injected the token I received, and deployed to the arduino over USB. I then tried to run the batch script but I am getting a message that states: DSR is off.

This results in the app saying the project is offline.

Any help?

Thanks!

Does this mean you have correctly setup the COM port and BAUD rate for the Blynk-ser.bat file?

http://help.blynk.cc/how-to-connect-different-hardware-with-blynk/arduino/usb-serial

If your DOS window looks something like this, then that usually means you have used the correct COM port and that the board is connected and all is good (NOTE: you must keep this window open, minimised is OK, the entire time in order to maintain connection).

image

If like above, then then your issue may be something else with the sketch… like trying to send serial data over the same port that the USB Link is using. make sure to comment out (or remove) all Serial print commands… including #define BLYNK_PRINT Serial

Thanks for the help. I’m just using a plain vanilla sample script. I tried what you said and commented the parts of the script that has anything to do with the serial port, but I am having the same issue.

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
#include <SimpleTimer.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "mytoken";

WidgetLED led1(V1);

SimpleTimer timer;

void setup()
{
  //Serial.begin(9600); // See the connection status in Serial Monitor
  Blynk.begin(auth);

  timer.setInterval(1000L, blinkLedWidget);
}

// V1 LED Widget is blinking
void blinkLedWidget()
{
  if (led1.getValue()) {
    led1.off();
    //Serial.println("LED on V1: off");
  } else {
    led1.on();
    //Serial.println("LED on V1: on");
  }
}

void loop()
{
  Blynk.run();
  timer.run();
}

When using the USB link, don’t forget to comment out this line as well.

However…

These are the wrong libraries for the USB link… so that will be a problem as well :stuck_out_tongue:

This is the basic sketch you should be using:

Ignore the SoftwareSerial part unless you also have a USB-TTL adapter

Thanks for pointing me in the right direction. I tried this again, and am getting the same issue. I rebooted, tried to launch the batch script with the IDE closed, and then from within the Arduino IDE. I am getting the same error. Here’s the updated sketch:

#define BLYNK_PRINT SwSerial


#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
    
#include <BlynkSimpleStream.h>

char auth[] = "mytok";


void setup()
{
  //SwSerial.begin(9600);

  Serial.begin(9600);
  Blynk.begin(Serial, auth);
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

I tried commenting out anything to do with software serial, still no luck. DSR is off.

// #define BLYNK_PRINT SwSerial


//#include <SoftwareSerial.h>
//SoftwareSerial SwSerial(10, 11); // RX, TX
    
#include <BlynkSimpleStream.h>

char auth[] = "ca73d08fefd64ee6b5d722a4eee2bdea";


void setup()
{
  //SwSerial.begin(9600);

  Serial.begin(9600);
  Blynk.begin(Serial, auth);
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

What error?? DSR is OFF is not an error message… generaly if that is the last part showing then the script is working fine.

What is the COM port and BAUD rate shown in the DOS window when running the script?

And I am guessing you are replacing the words mytok with a proper auth code (from the App Project) in between the quote marks?

Yup you’re right! The app now connects! Thank you!

The DSR is OFF message is a bit misleading for beginners.

3 posts were split to a new topic: USB Link Shutdown error