On Linux and Mac:
Navigate to /scripts folder. For example:
cd User$/Documents/Arduino/libraries/Blynk/scripts
When inside this folder, run:
user:scripts User$ ./blynk-ser.sh
blynk-ser.sh is greyed out so can’t open in arduino. Mac doesn’t identify a programme to run with this.
and then I don’t understand any of the following! Thanks…
You may need to run it with sudo
user:scripts User$ sudo ./blynk-ser.sh
This is what you’ll see in Terminal app on Mac (usbmodem address can be different):
[ Press Ctrl+C to exit ]
/dev/tty.usbmodem not found.
Select serial port [ /dev/tty.usbmodem1451 ]:
Copy the serial port address: /dev/tty.usbmodem1451 and paste it back:
Select serial port [ /dev/tty.usbmodem1451 ]: /dev/tty.usbmodem1451
After you press Enter, you should see an output similar to this:
Resetting device /dev/tty.usbmodem1451…
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:cloud.blynk.cc:8441,cafile=/Users/…/server.crt,nodelay
2015/10/03 00:29:45 socat[30438.2046857984] N opening character device “/dev/tty.usbmodem1451” for reading and writing
2015/10/03 00:29:45 socat[30438.2046857984] N opening connection to LEN=16 AF=2 45.55.195.102:8441
2015/10/03 00:29:45 socat[30438.2046857984] N successfully connected from local address LEN=16 AF=2 192.168.0.2:56821
2015/10/03 00:29:45 socat[30438.2046857984] N SSL connection using AES128-SHA
2015/10/03 00:29:45 socat[30438.2046857984] N starting data transfer loop with FDs [3,3] and [4,4]
NOTE: Arduino IDE may complain with “programmer is not responding”. You need to terminate script before uploading new sketch.
We warn everyone, that Blynk wasn’t designed for USB, it’s an Internet of Things platform.
USB example was made just to give an ability to try things out before connecting it to the Internet. We use third-party software for that. That’s why we can’t guarantee it’s proper work. Yes, it’s not the best solution, we admit that, however it’s not our focus at all.
@skipzone I don’t share @Pavel’s view that the world currently runs on WiFi with everlasting batteries So as the devices generally needs mains power USB is a reasonable solution to provide power and the internet connection.
I don’t have any Mac experience but other Operating Systems have lots of ways of automating the running of a script (cron, Scheduler etc). The way the script is written means it will keep checking to see that you are still connected to Blynk and your Arduino sketch should ensure your Auth code doesn’t timeout (WDT etc).
The permission denied from Terminal issue should be easy enough for you to fix by changing file permissions or moving the script and associated binary to the correct location.
I see, so the Terminal is just running to check the processes are working.
The conflict is lying in the USB connection. ( I was trying to just use a single connection to power and connect the device… so now I have to invest in an ethernet shield and 9v power supply!) Will a Wi-Fi shield also work?
You can power the Arduino AND use the USB port to connect to Blynk.
However if you need to debug your code, which invariably you will, you will need to connect an FTDI or similar to the RX and TX pins as defined in SoftSerial (normally shown as pins 2 and 3, I use 11 and 12 and technically you only need pin 12 connected i.e. the TX line from the Uno to your PC).
I see you are on Mac, do you have anything else connecting to the serial port at that time? Because you can use it only once. It also might be an idea to re-install the serial drivers: http://www.ftdichip.com/Drivers/D2XX.htm
Just install the FTDI drivers. They are very picky about support. Ethernet and Serial ports have nothing to do with each other, but a Serial port can only be used by one application at a time. So f you have you have your ARduino Serial monitor open and try to launch the server.sh script to the same serial port, that wil not work.
It’s always sad to see someone go of course and I have it running fine on Mac, so I’m not sure what is up with your configuration. I hope we see you again here
I didn’t have to run it with sudo? Maybe there is something different in 0.3.3 library? Currently I’m not even sure what the latest version is, lol.
MacBook-Pro-van-Bastiaan:scripts bastiaanvisee$ ./blynk-ser.sh -s cloud.blynk.cc
[ Press Ctrl+C to exit ]
Resetting device /dev/tty.usbmodemFD131…
Warning: Server connection may be insecure!
Connecting: GOPEN:/dev/tty.usbmodemFD131,raw,echo=0,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,ispeed=9600,ospeed=9600,crtscts=0 ↔ TCP:cloud.blynk.cc:8442,nodelay
2016/02/09 15:52:35 socat[1663] N opening character device “/dev/tty.usbmodemFD131” for reading and writing
2016/02/09 15:52:35 socat[1663] N opening connection to LEN=16 AF=2 45.55.195.102:8442
2016/02/09 15:52:35 socat[1663] N successfully connected from local address LEN=16 AF=2 192.168.117.19:52813
2016/02/09 15:52:35 socat[1663] N starting data transfer loop with FDs [5,5] and [6,6]
Completely lost me! You would need clear step by step installation guide to use this device stating which programme to use at each stage of the installation. It didn’t help being diverted to Codebender and having to install chrome plugins. What was that for?
I was hoping to show to my young son. But it was a big turn off.
I’ll wait and buy a system that works, end-to-end with a simple install.
We did everything we could, as Pavel said before, we rely on 3d party software here so we couldn’t do nothing more. All instructions in sketch are based on Blynk users feedback.