-->
Page 1 of 1

Cp2102 problem

PostPosted: Thu Feb 12, 2015 10:56 am
by zioax
I'm trying to upload a nodemcu script using a cp2102, it come mounted on /dev/ttyUSB0 but it can't communicate with the module. All the wires connection are ok, and I've also tried with a Windows pc and it work , so the problem is software side. This is the dmesg output:

[ 3144.796181] usb 5-1: new full-speed USB device number 70 using uhci_hcd
[ 3144.957166] usb 5-1: New USB device found, idVendor=10c4, idProduct=ea60
[ 3144.957174] usb 5-1: New USB device strings: Mfr=1,Product=2,SerialNumber=3
[ 3144.957180] usb 5-1: Product: CP2102 USB to UART Bridge Controller
[ 3144.957184] usb 5-1: Manufacturer: Silicon Labs
[ 3144.957188] usb 5-1: SerialNumber: 0001
[ 3144.962334] cp210x 5-1:1.0: cp210x converter detected
[ 3144.964477] usb 5-1: cp210x converter now attached to ttyUSB0
and this what appear when I try to upload the code:

python luatool.py -p /dev/ttyUSB0 -b 9600 -f webserver.lua -t webserver.lua

s->file.open("webserver.lua", "w")Traceback (most recent call last):
File "luatool.py", line 118, in <module>
writeln("file.open(\""+args.dest+"\", \"w\")\r")
File "luatool.py", line 41, in writeln
raise Exception('No proper answer from MCU')
Exception: No proper answer from MCU

Re: Cp2102 problem

PostPosted: Thu Feb 12, 2015 11:12 am
by quantalume
I don't really have any experience with the CP2102, but what happens if you use a serial terminal program and connect the CP2102 in loopback? You should see the characters echoed to the screen. Are you sure your linux user is a member of the right group to access tty? I would think that you would get a different error if not, but you can try to run luatool as root just to see.

Re: Cp2102 problem

PostPosted: Thu Feb 12, 2015 11:18 am
by zioax
The user already have permission for to access tty. Anyway I've tried with sudo but no solved :/

Re: Cp2102 problem

PostPosted: Fri Feb 13, 2015 7:34 pm
by jra
What happens when you try talking to the ESP-8266 with the adapter, something like:

screen /dev/USB0 9600