USB Serial
If you don't have any shield and your hardware doesn't have any connectivity, you can still use Blynk – directly over USB.

Getting Started

  1. 1.
    Optional, but recommended.Connect additional USB-Serial adapter to your device to see the debug prints.
  2. 3.
    Run the blynk-ser script, located in scripts folder:
  • Windows: My Documents\Arduino\libraries\Blynk\scripts
  • Mac: ~/Documents/Arduino/libraries/Blynk/scripts
  • Linux: ~/Arduino/libraries/Blynk/scripts
The script is simply redirecting traffic to Blynk Cloud.
You can specify port, baud rate, and server endpoint like this: ./blynk-ser.sh -c <serial port> -b <baud rate> -s <server address> -p <server port>
For instance: ./blynk-ser.sh -c /dev/ttyACM0 -b 9600 -s blynk-cloud.com -p 8442
Run blynk-ser.sh -h for more information
Be sure to select the right serial port (there may be multiple). Attention! Arduino IDE may complain with "programmer is not responding". You need to terminate script before uploading new sketch.

On Windows

Open cmd.exe (you may need to "Run as Administrator") Navigate to scripts folder:
1
cd C:\...\libraries\Blynk\scripts
Copied!
Run blynk-ser.bat file. For example : blynk-ser.bat -c COM4 (where COM4 is port with your Arduino)And press "Enter", press "Enter" and press "Enter"

On Linux and Mac

Navigate to scripts folder:
1
cd User$/Documents/Arduino/libraries/Blynk/scripts
Copied!
When inside this folder, run:
1
user:scripts User$ ./blynk-ser.sh
Copied!
You may need to run it with sudo:
1
user:scripts User$ sudo ./blynk-ser.sh
Copied!
This is what you'll see in Terminal app on Mac (usbmodem address can be different):
1
[ Press Ctrl+C to exit ]
2
/dev/tty.usbmodem not found.
3
Select serial port [ /dev/tty.usbmodem1451 ]:
Copied!
Copy the serial port address: /dev/tty.usbmodem1451 and paste it back:
1
Select serial port [ /dev/tty.usbmodem1451 ]: /dev/tty.usbmodem1451
Copied!
After you press Enter, you should see an output similar to this:
1
Resetting device /dev/tty.usbmodem1451...
2
Connecting: GOPEN:/dev/tty.usbmodem1451,raw,echo=0,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,ispeed=9600,ospeed=9600,crtscts=0 <-> openssl-connect:blynk-cloud.com:8441,cafile=/Users/.../server.crt,nodelay
3
2015/10/03 00:29:45 socat[30438.2046857984] N opening character device "/dev/tty.usbmodem1451" for reading and writing
4
2015/10/03 00:29:45 socat[30438.2046857984] N opening connection to LEN=16 AF=2 45.55.195.102:8441
5
2015/10/03 00:29:45 socat[30438.2046857984] N successfully connected from local address LEN=16 AF=2 192.168.0.2:56821
6
2015/10/03 00:29:45 socat[30438.2046857984] N SSL connection using AES128-SHA
7
2015/10/03 00:29:45 socat[30438.2046857984] N starting data transfer loop with FDs [3,3] and [4,4]
Copied!

Additional materials:

Last modified 4mo ago
Copy link