OpenWrt Forum Archive

Topic: Problem with USB-TTL adapter

The content of this topic has been archived between 3 Apr 2018 and 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi friends, I have USB-TTL adapter which not works properly. I mean when I type something in terminal I can not see it (I crossed TX and RX). The adapter is with Profilic PL2303 chip. I idetnified TX,RX,GND with my multimeter beeps according to datasheet of PL2303HX. Here are my settings:

http://s10.postimg.org/pc796lr49/pic1.png

http://s7.postimg.org/ftjfx2gt7/pic2.png

http://s23.postimg.org/d85emmqjv/pic3.png

Do I need to find 3,3V Vcc and connected to power supply to see how it work ?

Thanks !

(Last edited by Experimentator on 4 Aug 2013, 14:00)

No, the 3.3V should be supplied by the USB, so to have a quick echo test, you just need to connect Tx and Rx.

I just bridged RX and TX and nothing shows in console (I typed something of course). So there is a difference in voltage of TX and RX if I use 3.3V and if I use 5.0V The voltage of TX and RX is different than 3.3V TX and RX. So my question is why we need only to connect GND, TX, RX on router's PCB and do not need to connect VCC pin according to difference in voltages of TX and RX?
Any suggestions what to do to see if the adapter works properly yet?

Thanks !

And another question: I did RS232 - Max232 adapter and I want to test it but now I have not got router on 5.0V Vcc so is it possible to test it like in a picture with 5.0V DC adapter as follow :

http://s18.postimg.org/hs5crn06d/5_V.jpg

Of course I will bridge TX and RX pins

(Last edited by Experimentator on 4 Aug 2013, 23:21)

if i not wrong,the ttl is meaning use the 3.3v level signal,and the pl2303 should can do the work for this. i dont know you use which route for this,but if for the ar9331,you should use 11522bit.no hard flow control
http://see.sl088.com/w/images/d/d4/JustCapIt3206.jpg

this is in the seurecrt:
http://see.sl088.com/w/images/c/cc/JustCapIt3208.jpg

and you can see the pl2302's homepage:

Flexible signal level requirement on the RS-232 serial port side also allows the PL-2303HX to connect directly to 3.3V ~ 1.8V devices.

so you should no worry about the 5v and 3.3v.

to need the gnd,i think that's because we use both diffrent power supply,need a base reference voltage, my suck english is very hard to expensive this,but you dont need vcc,because,you can measurement it by use gnd and signal it self.

@slboat: he should do the Tx-Rx-Echo test first to see, if his serial adapter can at least communicate to itself. this has to work first, before changing serial settings or connect to a router.
@Experimentator: a simplified reason for not connecting the Vcc's is that they are both outputs, on the router and your adapter, and you should connect just inputs to outputs. it is totally sufficient to connect GND and the appropriate signal lines (at the right voltage level).

MBS wrote:

@Experimentator: a simplified reason for not connecting the Vcc's is that they are both outputs, on the router and your adapter, and you should connect just inputs to outputs. it is totally sufficient to connect GND and the appropriate signal lines (at the right voltage level).

Ok, but according to http://www.dd-wrt.com/phpBB2/viewtopic. … 76d474b182 and post of shivasdream: Ok, i did it, build a serial adapter with a MAX232 and two resistors on the tx-output for the W311R (to get 3,3V) It´s working again! Flashed it with DD-WRT, yeah ...

So if I have a router with 3.3V Vcc I can use MAX232 and power the IC from 5.0V power adapter and connect only TX, RX, GND to router's TX, RX, GND ? Are there any difference in voltages of 3.3 and 5.0 level converters in TX and RX ?

OK, put it this way: on the usb-serial adapters you normally get, Vcc is an output and may be used to power small devices. But it should not be connected to a router.
If you build an adapter using chips like the MAX232, you are basically on your own and should be able to read and understand the datasheet. The adapter IC should be powered with the same voltage as the routers SoC, which is usually 3.3V. Other voltage levels, like 5V may damage the SoC or reduce signal reception.

MBS wrote:

OK, put it this way: on the usb-serial adapters you normally get, Vcc is an output and may be used to power small devices. But it should not be connected to a router.
If you build an adapter using chips like the MAX232, you are basically on your own and should be able to read and understand the datasheet. The adapter IC should be powered with the same voltage as the routers SoC, which is usually 3.3V. Other voltage levels, like 5V may damage the SoC or reduce signal reception.

I understand THANKS !

My friend gave me brick tp-link tl-wr340g which is bricked. I will try to unbrick it because I want to learn more things and have free time but I do not know the settings like speed, parity, flow controw and etc. If you know something about settings please tell me. The router is not supported by any WRT firmware because it is old and hardware is not supported so I will flash TP-LINK firmware.

THANKS AGAIN !

(Last edited by Experimentator on 6 Aug 2013, 21:50)

It is usually 8N1, which means 8 bits, no parity, 1 stop bit. Speed can vary, normally one of these: 115200, 9600, 19200, 38400, 57600.

MBS wrote:

It is usually 8N1, which means 8 bits, no parity, 1 stop bit. Speed can vary, normally one of these: 115200, 9600, 19200, 38400, 57600.

Most often 115200

Thanks for replays ! When I touch with wire TX on the router with RX on the adapter I see only strange characters.

What must be character encoding in putty ? UTF-8 or ?

(Last edited by Experimentator on 7 Aug 2013, 23:07)

Plain ASCII, so usually UTF8 will do.

So I see this
http://s12.postimg.org/a0z0k0gkp/TP1.jpg
http://s21.postimg.org/4hf3rudsj/TP2.jpg

I use USB-COM adapter http://www.aten.com/products/productIte … _no=UC232A an maybe this is the reason for this characters in images.

I found what is the boot log:

AR2315 rev 0x00000090 startup...
Attached TCP/IP interface to ae unit 0
Attaching interface lo0...done

USRCONF : g_size = 20428
Name = MODULE_USR_CONF_T , size = 12
Name = UC_IEEE802_1X_CFG_DATA_T , size = 512
Name = UC_ADVANCED_CFG_T , size = 16
Name = UC_ARP_CFG_T , size = 652
Name = UC_BPA_CFG_DATA_T , size = 912
Name = UC_DDNS_T , size = 1480
Name = UC_DHCPC_CFG_DATA_T , size = 416
Name = UC_DHCPS_CFG_AND_STATIC_T , size = 708
Name = UC_FIRE_WALL_STATE_T , size = 1992
Name = UC_FORWARD_VIRTUAL_SERVE_CLASS_T , size = 1572
Name = UC_LAN_CFG_DATA_T , size = 16
Name = UC_L2TP_CFG_DATA_T , size = 1472
Name = UC_MAC_CONFIG_T , size = 80
Name = UC_PPPOE_CFG_DATA_T , size = 1600
Name = UC_NTP_PREFER_SRV_CFG_DATA_T , size = 28
Name = UC_STATIC_IP_CFG_DATA_T , size = 144
Name = UC_SATTIC_ROUTE_CFG_DATA_T , size = 328
Name = UC_MANAGE_USERS_T , size = 64
Name = UC_UTILITIES_T , size = 16
Name = UC_WANCONNTYPE_T , size = 16
Name = UC_WLAN_CFG_T , size = 5164
Name = UC_OPMODE_CFG_T , size = 4
Name = UC_PPTP_CFG_DATA_T , size = 1472
Name = UC_NETWORK_PSEUDO_T , size = 4
Name = UC_QOS_ROUTER_CONF_FLASH_T , size = 740
Name = UC_DHCPP_CFG_DATA_T , size = 1008
dsInit 1 wlanBridgeInit(): ucGetOpMode() 1 wireless access point starting...
wlan0 Ready
TDDP

                             Software Platform for ARM
   Copyright(C) 2001-2004 by TP-LINK TECHNOLOGIES CO., LTD.
   Creation date: Jan  6 2009, 15:49:50

   Press CTRL-B to enter bootmenu...

   Boot Menu:
     1:  Download application program
     2:  Modify Bootrom password
     3:  Exit the menu
     4:  Reboot
     5:  User commond line
        Enter your choice(1-4):


http://www.elektroda.pl/rtvforum/viewto … 81#7938781

So do I need bootrom password to flash new firmware ?

that seems like more like a RS232 serial adapter.. not 3.3v TTL!

nebbia88 wrote:

that seems like more like a RS232 serial adapter.. not 3.3v TTL!


No, I use max3232 and USB-COM and I connect only TX on adapter to TX on router and NOT CONNECT RX.

I will test on my desktop PC with real RS232 port not USB-RS232

(Last edited by Experimentator on 8 Aug 2013, 21:30)

Experimentator wrote:

No, I use max3232 and USB-COM and I connect only TX on adapter to TX on router and NOT CONNECT RX.

I will test on my desktop PC with real RS232 port not USB-RS232

Do yourself a favor and get yourself a USB to 3.3V serial adapter. You will find them for 3-5$ and they work OTB.
The adapter cable you've got probably runs 3.3V or 5V internally, and has a level shifter to reach +/- 12V, and with your max3232 you shift it back, at the expense of your signal quality.

ok now i understood why you need the max232..

anyway.. are you using a very long cable?

(Last edited by nebbia88 on 9 Aug 2013, 21:58)

I see. Thanks for your advise. I did with my soldering iron RS232 - MAX3232 and want to see how it works. Test with crossed TX and RX is working fine but when I connect it to the router the things looks different. These days I will give you some images to see my diy work wink When there is a ground pin I solder a wire from element to element ground pin. Is this the problem ?


Thanks for your time and help to solve my problem !

nebbia88 wrote:

should it be tx from router with rx of adapter?? obviusly considering that rx is an input and tx an output...

This is the scheme of adapter  http://www.nslu2-linux.org/wiki/HowTo/AddASerialPort .   When I do what you say there in nothing in terminal. It works with strange characters only when the connection is TX to TX.

Thanks for helping wink !

nebbia88 wrote:

ok now i understood why you need the max232..

anyway.. are you using a very long cable?


No I need max3232 because there is 3.3V between Ground and Vcc pin. As I said these days I will upload some images to see my cable. And I think that the cable is not very long but you will see from the picture

(Last edited by Experimentator on 9 Aug 2013, 22:02)

i have that type of usb-serial(ttl) cable. been using ok with my router. havent experienced any problem.

try to verify your set up also.

elaber wrote:

i have that type of usb-serial(ttl) cable. been using ok with my router. havent experienced any problem.

try to verify your set up also.

What you see when you crossed TX and RX ? Any suggestions what to test ?

are you sure you have the correct tx rx pins?