You are not logged in.

#26 2014-05-28 03:37:14

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,397

Re: How to install and use the CP2102 USART to USB Converter?

Looks right to me.  You may want to ensure that Bit 1 of  UCSRnA is still clear (its default value) That would be U2Xn.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#27 2014-05-28 03:49:24

sherrellbc
Member
Registered: 2014-05-26
Posts: 112

Re: How to install and use the CP2102 USART to USB Converter?

I had an Arduino Mega lying around so I decided to create a test using that device. The mega was never re-flashed, so the Arduino bootloader remains on the device. As such, I simply used the Serial library Arduino provides and setup the baudrate as 9600. I infinitely write character to via serial every 500mS. I opened GTKterm and still nothing comes across. If I open up the Arduino Serial Monitor I can see a steady stream of characters as they come across via USB.

Something is not right with the converter or GTK. Any more ideas on getting GTK setup ?

Offline

#28 2014-05-28 04:16:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,397

Re: How to install and use the CP2102 USART to USB Converter?

My last suggestion is to ensure that hardware flow control (or handshake) is off.  Other than that, I would need to hang a scope on it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#29 2014-05-28 04:42:03

sherrellbc
Member
Registered: 2014-05-26
Posts: 112

Re: How to install and use the CP2102 USART to USB Converter?

ewaller wrote:

My last suggestion is to ensure that hardware flow control (or handshake) is off.  Other than that, I would need to hang a scope on it.


Indeed, it is. The Mega UART most certainly works considering I programmed it using the Arduino Serial API - so I am confident that side of things is working. It's definitely something wrong with either my GTKterm configuration or the converter device, but I didn't do anything to this thing (the driver was already installed).

All I can say is that the device has a small Tx LED on it that flashes when data is being transmitted. When I type information into the GTKterm window that LED does nothing unless I have the Tx/Rx shorted together on the converter. If Tx/Rx are connected to the appropriate pins on the controller than that "transfer" LED does not flicker when using GTKterm.

Are there any other terminal programs like GTKterm that you may suggest? I would just like to try another one just to ensure this program is not the problem, which is unlikely anyway.

Offline

#30 2014-05-28 04:49:54

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,397

Re: How to install and use the CP2102 USART to USB Converter?

screen, minicom (both in community) or putty (in the AUR)

Edit: BTW, screen is much much more than a serial terminal.  You may want to stay away from that one

Last edited by ewaller (2014-05-28 04:51:14)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#31 2014-05-28 04:58:04

sherrellbc
Member
Registered: 2014-05-26
Posts: 112

Re: How to install and use the CP2102 USART to USB Converter?

ewaller wrote:

screen, minicom (both in community) or putty (in the AUR)

Edit: BTW, screen is much much more than a serial terminal.  You may want to stay away from that one

Thank you. When I first posted here you made a comment regarding remedying the permissions so I do not have to call sudo each time I want to run a program. Currently, I have to sudo any program that was installed outside the scope of my home directory.

Loopback test works with picocom and nothing is coming through. Must not have been GTKterm. This is turning out to be quite a difficult task.

Last edited by sherrellbc (2014-05-28 05:10:09)

Offline

#32 2014-05-28 05:16:15

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,397

Re: How to install and use the CP2102 USART to USB Converter?

I don't have a USB serial device handy right now, so you will have to do the legwork.

After you attach the device, look it /dev and find the owner and group of the ttyUSB0 node.  The owner will be root.  The group may be root, or it may be something else.  If it is something else, just add your user to that group, log out, and log back in.  If the group is root, things get a little more complex.  The real solution is to write a udev rule to mount it with a group that normal users can join.   

The quick and nasty work around for this is to, after you connect the device, use sudo to chown the device node to your user name.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#33 2014-05-29 03:21:20

sherrellbc
Member
Registered: 2014-05-26
Posts: 112

Re: How to install and use the CP2102 USART to USB Converter?

ewaller wrote:

I don't have a USB serial device handy right now, so you will have to do the legwork.

After you attach the device, look it /dev and find the owner and group of the ttyUSB0 node.  The owner will be root.  The group may be root, or it may be something else.  If it is something else, just add your user to that group, log out, and log back in.  If the group is root, things get a little more complex.  The real solution is to write a udev rule to mount it with a group that normal users can join.   

The quick and nasty work around for this is to, after you connect the device, use sudo to chown the device node to your user name.

So I figured out why the converter bridge was not working. I realized that if I shorted the Tx/Rx together on the bridge that the loopback test worked just fine. So I thought, just on a whim what would happen if I shorted the terminals together AND jumped my Rx pin from the controller in a sort-of three terminal node. Turns out, this worked! I sat here for a moment and thought what could be causing this .. I conjured up the notion that perhaps the Rx and Tx connections I was using were swapped. So, I simply swapped the way I was connecting the device and voila, it worked.

Just for reference of others, at least for the bridge that I am using, the mapping looks like this:

Converter Tx  ->  Microcontroller Tx
Converter Rx -> Microcontroller Rx

I imagine the silk screens on the PCB were alluding to Tx and Rx connections with respect to how the target device should be wired up, but what a terrible idea.

Anyway, to answer your question, the owner of /dev/ttyUSB0 is root and the group is uucp. I think when I installed Arch I exactly followed the suggestion on the wiki to just add myself to Wheel, Power, and something else. the GTKterm program, on the other hand, is root/root for owner/group.

Last edited by sherrellbc (2014-05-29 03:33:59)

Offline

#34 2014-05-29 03:37:46

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,397

Re: How to install and use the CP2102 USART to USB Converter?

sherrellbc wrote:

So I figured out why the converter bridge was not working. I realized that if I shorted the Tx/Rx together on the bridge that the loopback test worked just fine. So I thought, just on a whim what would happen if I shorted the terminals together AND jumped my Rx pin from the controller in a sort-of three terminal node. Turns out, this worked! I sat here for a moment and thought what could be causing this .. I conjured up the notion that perhaps the Rx and Tx connections I was using were swapped. So, I simply swapped the way I was connecting the device and voila, it worked.

Just for reference of others, at least for the bridge that I am using, the mapping looks like this:

Converter Tx  ->  Microcontroller Tx
Converter Rx -> Microcontroller Rx

I imagine the silk screens on the PCB were alluding to Tx and Rx connections with respect to how the target device should be wired up, but what a terrible idea.

Er, Um.... yeah.
https://bbs.archlinux.org/viewtopic.php … 7#p1419517
tongue


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#35 2014-05-29 06:02:36

sherrellbc
Member
Registered: 2014-05-26
Posts: 112

Re: How to install and use the CP2102 USART to USB Converter?

I remember when you said that and I checked to make sure that the connections were correct. With anything else I've ever worked with you always connect the Tx of a device with the Rx of the other. In this case the Tx and Rx of the converter are connected respectively to the Tx and Rx of the controller. This is backwards than it should be. I looked and saw I had the converter's Tx and the controller's Rx connected and figured I was good to go.

Mapping should be:
Converter Tx  ->  Microcontroller Rx
Converter Rx -> Microcontroller Tx

Mapping was:
Converter Tx  ->  Microcontroller Tx
Converter Rx -> Microcontroller Rx

Last edited by sherrellbc (2014-05-29 06:03:33)

Offline

Board footer

Powered by FluxBB