-->
Page 1 of 1

AT commands not working over serial with Mac

PostPosted: Sat Nov 08, 2014 3:02 pm
by Mikem42
I got the esp8266 and a 3.3v ftdi USB to serial cable and other bits from sparkfun in the mail today.

Hooked up 3.3v voltage regulator with an led to the 5v off the ftdi cable and checked that with a meter carefully. Then hooked up the esp8266 to serial and power.

So far the best command in the Mac OSX shell command I've found is:

`screen /dev/cu.usbserial-AJ02ZE2K 9600`

The slower 9600 is apparently common for later devices.

I also had to tie the non-gpio pins to 1 (reset and ch_pd). Now it prints a basic message when reset and also echos characters, but I'm pretty sure that it isn't understanding newline as gnu-screen is sending it, as it doesn't do anything besides return the cursor to the start of the line when I hit return.

[Vendor:www.ai-thinker.com Version:0.9.2.4]

ready

The little blue light flashes when I type, so I'm pretty sure the serial link is working other than "return". A good start, but I seem to be stuck on this issue currently. I can't seem to find anything that allows me to adjust what screen is sending for newline/carrage return. I'm guessing that because it's a Mac and it has a different idea about what should be sent for return versus an expected crlf set?

Re: AT commands not working over serial with Mac

PostPosted: Sat Nov 08, 2014 3:28 pm
by joe
I would suggest a couple of things.

Install minicom and use it instead of screen.

Alternatively, you can try using 'sudo stty -f /dev//cu.usbserial-AJ02ZE2K onlcr' AFTER you have started screen. This should turn your CR into a LF and CR combo. Unfortunately, I'm still waiting on my usb-serial converter, which is currently on a slow boat from china, or I'd double check it works myself.

Re: AT commands not working over serial with Mac

PostPosted: Sat Nov 08, 2014 5:25 pm
by martinayotte
You can also use picocom, there is a version for Mac OS X, but I'm not sure which version.
The latest version from https://github.com/jmesmon/picocom support the option "--omap crcrlf" which map output of CR to CRLF.

Re: AT commands not working over serial with Mac

PostPosted: Sun Nov 09, 2014 12:36 am
by Mikem42
Thanks for the suggestions. I did get it working from a linux virtual machine using picocom, so I'll look into a macos version of that as the --omap crcrlf switch was key to getting it working under linux too. I accidentally double-posted my question over here and just added some results: viewtopic.php?f=6&t=518&p=2355#p2355 - sorry for the confusion about starting 2 identical threads :-(

- Mike