Can't connect to Cayenne via USB

I am brand new to Arduino and Cayenne and can’t get past trying to connect my new Arduino Uno to Cayenne to do a simple temperature monitor using the TMP36 sensor as my first project…

I have just copied the example sketch for the temperature test…I have just ordered a Wifi module but am still waiting for it to arrive so assumed given it is on the list, that I could get to the internet via the USB connection on the Arduino connected to my iMac.

I am invoking the cayenne-ser script as outlined in the sketch example as follows:
./cayenne-ser.sh -c dev/cu.usbmodem1431 -b 9600 -s arduino.mydevices.com -p 8442

Upon invocation it gives the following error

/dev/tty.usbmodem not found.
Select serial port [ /dev/tty.usbmodem1431 ]:
Resetting device …
stty: hupcl: No such file or directory
Warning: Server connection may be insecure!
Connecting: GOPEN:,raw,echo=0,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,ispeed=9600,ospeed=9600,crtscts=0 <-> TCP:arduino.mydevices.com:8442,nodelay
2016/07/16 15:39:37 socat[2595] N opening undef “” for reading and writing
2016/07/16 15:39:37 socat[2595] E open(“”, 01006, 0666): No such file or directory
2016/07/16 15:39:37 socat[2595] N exit(1)
Reconnecting in 3s…

If I change the port to my arduino serial port I get the following:

/dev/tty.usbmodem not found.
Select serial port [ /dev/tty.usbmodem1431 ]: /dev/cu.usbmodem1431
Resetting device /dev/cu.usbmodem1431…
Warning: Server connection may be insecure!
Connecting: GOPEN:/dev/cu.usbmodem1431,raw,echo=0,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,ispeed=9600,ospeed=9600,crtscts=0 <-> TCP:arduino.mydevices.com:8442,nodelay
2016/07/16 15:47:03 socat[2720] N opening character device “/dev/cu.usbmodem1431” for reading and writing
2016/07/16 15:47:03 socat[2720] N opening connection to LEN=16 AF=2 54.164.145.102:8442
2016/07/16 15:47:03 socat[2720] N successfully connected from local address LEN=16 AF=2 192.168.0.10:52012
2016/07/16 15:47:03 socat[2720] N starting data transfer loop with FDs [5,5] and [8,8]
2016/07/16 15:47:10 socat[2720] N socket 2 (fd 8) is at EOF
2016/07/16 15:47:11 socat[2720] N exiting with status 0
Reconnecting in 3s…

It keeps reconnecting and when I look at the serial monitor I get:

[25003] Login timeout
[25003] Connecting…

se8lc2601c[45005] Login timeout
[45005] Connecting…

Appreciate any advice or help. thanks

I’m not very familiar with connecting an Arduino to another drive and using it as a USB modem. I’ll try to give that a try soon and see if I get the same thing. Are you on a network that blocks ports? Port 8442 may be blocked for you. From the computer you are connecting the Arduino to run this command: telnet cloud.mydevices.com 8442

According to the documentation you can just run ./cayenne-ser.sh to accept all the default values. I did this on a windows computer and it worked fine. I can try in a few days with a raspberry pi or another Linux machine.

I notice that you are missing the leading / for your usb modem in the command [quote=“peter_a_spicer, post:1, topic:927”]
./cayenne-ser.sh -c dev/cu.usbmodem1431 -b 9600 -s arduino.mydevices.com -p 8442
[/quote]

Here is the output from my command on windows:

Connecting device at COM8 to arduino.mydevices.com:8442...
OpenC0C("\\.\COM8", baud=9600, data=8, parity=no, stop=1) - OK
Connect("arduino.mydevices.com", "8442") - OK
InOut() START
DSR is OFF
Received EOF
EVENT_CLOSE
InOut() - STOP
Disconnect() - OK
Connect("arduino.mydevices.com", "8442") - OK
InOut() START
DSR is OFF

Also, the documentation says using the serial monitor will interfere with the USB Modem script, try closing the serial monitor and restarting the script.

ATTENTION!
  Do not use Serial to display any output in this sketch. It will interfere with the Serial
  USB connection. When uploading sketches the Arduino IDE may complain with "programmer is
  not responding" or "Access is denied." You will need to terminate the connection script
  before uploading new sketches since it blocks access to the Serial port. Also make sure 
  the Serial Monitor is disabled in the IDE since that can prevent the Arduino from 
  connecting to the Windows/Linux/OSX machine. If you use Visual Micro for Visual Studio make
  sure Automatic Debugging is disabled. Otherwise the Serial Monitor can interfere with the
  Serial connection.