USB problems

Hi, I’m trying to use Blynk for the first time. I have some trouble getting the Uno to connect by USB. I’ve tried on a MAC, using all listed methods of blynk-ser.sh and gave up after a few hours. I couldn’t get the Uno to appear in the network.

This morning I’ve tried on a Windows machines with similar results. The sketch loads up fine, I’ve tried two different tokens, set the COM port to COM4 in both the .bat file directly and in Terminal , and the scrip compiles fine. In the serial monitor I see some upside down L’s and between them my char auth value. I’ve got the Uno wired to a computer which is getting its internet via mobile tether (not using a shield). When I tried the mac last night the computer was wired to the home network and I also tried with a tether with no luck.

Do I have to buy an Ethernet shield or am I doing something wrong. Thanks.

Did you upload the sketch to the UNO and set the correct parameters for serial connection? This because the UNO has only one serial port, so you cannot use the debug output, unless you use software serial for that. I currently have it running with this sketch (seems there is a lot of stuff with USB, so I thought I try):

#include <BlynkSimpleSerial.h>

char auth[] = "blabla";

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth);
}

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

Nothing too fancy. Furthermore I’ve edited my blynk-ser.sh (I’m on Mac too) and changed the parameters as follows:

!/bin/bash
# Detect script path
pushd `dirname $0` > /dev/null
SCRIPTPATH=`pwd`
popd > /dev/null

# === Edit default options to match your need ===

FROM_TYPE="SER" # SER, TCP

# Change this to TCP, since the hardware doesn't talk TCP
TO_TYPE="TCP"   # TCP, SSL

COMM_PORT_LINUX=/dev/ttyUSB0

# Change this to your own USB device
COMM_PORT_OSX=/dev/tty.usbmodemFD131
COMM_BAUD=9600

# I use a local server, this is for cloud connect
SERV_ADDR=cloud.blynk.cc
SERV_PORT_SSL=8441
SERV_PORT_TCP=8442
SERV_PORT_2WAY=8443
LSTN_PORT=8442

SRVR_CERT="$SCRIPTPATH/certs/server.crt"
CLNT_CERT="$SCRIPTPATH/certs/client.pem"

# === Edit the lines below only if absolutely sure what you're doing ===

This should work fine. It works nice here can I can switch pin 13. Also please make sure your firewalls are turned off because Blynk uses non-default ports.

Thanks for trying but no luck yet. It may be because the sensor I am using uses a digital pin but that option is not available. It’s looking easier to write my own Python middleware to get this done.

Truthfully, the easiest and most flexible is way is use an ESP as wifi shield or standalone. Or if you prefer cable an ethernet adapter. I personally use the ENC28J60 because it’s really cheap and is attached to SPI so I can always use the serial port for either debugging or something else.

Lichtsignaal, thanks for your advice. I got a W5100 shield, set it up today and it worked great. (Before that I had tried the ESP with Arduino Uno which was difficult to get working.) Thanks for your help. I’m really happy to be up and running.

1 Like