ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well, your system is not nearly as simple as it seemed from your original post. There are numerous links in the chain between two systems, all of which are potential problems.
To diagnose, I would start by using loopback connectors on all of the places where there is a Tx and Rx pin on a single device. Send data, and confirm that the same data can be read back. Use a program that is known to work correctly on whatever platform it is running.
There is a whole host of potential problems with the RF transceiver interface(s). There is a considerable amount of programming of the RF transceiver(s) that is required, and you have not shown any of this code. I guess that you have written some driver code that you embedded in your ARM kernel? Is there any vendor-supplied linux device driver fro you RF modules? The datasheet shows two or three modes of operation; which mode are you using? The RF devices behave very much like a telephone-line modem, where you can send commands to and receive replies from the modem itself. Have you succeeded in communicating with the RF devices at such a level?
It appears that there is no RS-232 signaling whatsoever in your system. A 60 cm cable carrying 3.3V CMOS logic sounds like a significant probability of error. I assume that the cable(s) to which you refer are between the RF modems and the USB/UART dongle. Can you reduce this cable length to something much less, like 2 or 3 cm? What type of cable and connectors are you using? The fact that you have reduced or eliminated the error rate by reducing the bitrate would be consistent with cross-talk or other cable-induced errors.
--- rod.
After checking with the loopback connectors, do a direct connection of both uarts at the 'RS232 side' with (as said by theNbomr) the shortest possible cable and check if it works.
Next you can try a longer length if required and test thoroughly (spit data for a day and verify the result).
And the last step will be to add the rf devices in the chain (again with the shortest possible cable).
uart-usb connector is consist of the cp201x chip.
one company made that connector.
but that connector's manual is written by korean.
then i found core chip i think(there is no chip name in korean manual..)
The datasheet shows two or three modes of operation; which mode are you using? The RF devices behave very much like a telephone-line modem, where you can send commands to and receive replies from the modem itself. Have you succeeded in communicating with the RF devices at such a level?
It appears that there is no RS-232 signaling whatsoever in your system. A 60 cm cable carrying 3.3V CMOS logic sounds like a significant probability of error. I assume that the cable(s) to which you refer are between the RF modems and the USB/UART dongle. Can you reduce this cable length to something much less, like 2 or 3 cm? What type of cable and connectors are you using? The fact that you have reduced or eliminated the error rate by reducing the bitrate would be consistent with cross-talk or other cable-induced errors.
in this part, i don't setting specific option. maybe common option is not address mode(all modem received in rage)
and i didn't use command protocol. i just use command protocol in X-CTU(setting program made by zigbee company)
uart-usb connector is consist of the cp201x chip.
one company made that connector.
but that connector's manual is written by korean.
then i found core chip i think(there is no chip name in korean manual..)
If it's a module, it might contain more than only the chip (usb-to-serial converter) but e.g. also line drivers. That is why I like to see the spec sheet. It might also show if it uses an external power supply or that it pulls power from the usb connector which might be another possible cause for the problem that you're experiencing (as you're saying that it works the one way but not the other if I understood your initial post correctly).
It's quite unusual for an usb-to-serial converter not to have the appropriate line drivers (in this case RS232) because it makes it a product for a very small market. I mean, I can not use it to connect 2 PCs, one with USB and one with serial port.
I did follow your link hoping for a useful 'english' button. And unfortunately my korean is far worse (read non-existing) than your english so it indeed did not ring any bells.
Wim Sturkenboom, if you look closely at the images in the page at solo0805's link to devicemart.co.kr, you can see that there are only a couple of passive components and connectors, as well as the main chip, on the USB/UART dongle. I think solo0805 is correct about the absence of line drivers. I agree that this makes the device a very small niche market product, but it does appear to be what solo0805 describes.
--- rod.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.