Iphone+macmini+arduinouno = no connection

I have installed library as instructed.

selected Uno board

selected usb port.

loaded File example Blynk Boards Arduino_serial_USB

sent auth code from iphone

pasted code into auth field

uncommented Blynk.begin(auth, 57600);

and pressed upload

reports:

avrdude: ser_setspeed(): tcsetattr() failed
avrdude: ser_open(): can’t set attributes for device “/dev/cu.usbmodem1421”: Invalid argument
ioctl(“TIOCMGET”): Bad file descriptor
avrdude: ser_close(): can’t reset attributes for device: Bad file descriptor

run iphone Blynk

reports:

Arduino UNO is offline

please can you help me!!! my son is waiting to the LED D8 to illuminate!!!

thanks

is Google Chrome script running Codebender conflicting with Arduino 1.6.7?

@skipzone the full instructions are at http://docs.blynk.cc/#hardware-set-ups-arduino-over-usb-no-shield

Suspect you skipped running the script that opens the gateway on your computer so Blynk has access to your Arduino.

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.

I tried running that in Terminal but I only get this

…/Arduino/libraries/blynk-library-0.3.1/scripts/blynk-ser.sh: Permission denied

seems a very complicated setup.

Do I have to do this every time I make a little application with Arduino and Blynk?

If the Auth code timesout do I have to refresh and run this procedure each time?

thanks

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 :grinning: 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.

This means it is working.
But! Your Arduino IDE seems to be working with the usb port, so it may interfere.
Try closing Arduino IDE…

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?

I will invest in this hardware and try again.

Thanks

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).

1 Like

I bought an Ethernet Hat but still no luck connecting to BLYNK

lights are on the Ethernet Hat

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

But it looks like a permission issue, weird.

Thanks Lichtsignaal,

FTDI say they don’t support this product

Network Ethernet Lan Shield Module Board W5100 Arduino UNO Mega 1280 256 UK C106

They suggested MAC should automatically detect this device. And so there might be a conflict and maybe need to uninstall D2XX driver.

I only have one ethernet port on my MAC so can’t think what else would be connected to serial. How would I find out?

thanks

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.

Tried all that but won’t work on MAC

Shame really… it would be interesting to use BLYNK

I am going to look at some other systems

Thanks - Pete

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 :slight_smile:

@skipzone hello, regarding USB.

You need to run script with sudo command. As stated in docs.

Doesn’t those instruction says you what you need to do? Just copy-paste “/dev/tty.usbmodem1451” and put if after “:” and everything will work.

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]

Sorry Dimitry,

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.

Like the BLYNK graphics and concept though!

regards - Pete

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.

Did you follow getting started instruction?