Up Core + Low Speed Carrier + RS-485 Help
I have two UP Core stacks, each with a High Speed and Low Speed Carrier. I need to communicate with another device using RS-485 and have not been able to yet. I am now trying to communicate between the two UP Core Stacks using RS-485 but have not been able to yet. I believe both have the jumpers set for RS-485 (jumpers are furthest from the DB9 connector so the pins closest to the DB9 are open).
I connected the DB9 pins 1, 2, and 5 on one stack to the same pins on the other stack and used picocom (kind of like described here: https://github.com/up-board/up-community/wiki/UP_Core_carrier_board_(low_speed_I) but did not get any messages through. I also tried swapping pins so 1 went to 2 on the other board (I don't think that's correct but tried anyway), still did not get any messages through. I changed the jumpers and wires to use RS-232 and everything worked on the first try so at least something is working but I really need to be able to communicate with an RS-485 device.
Any suggestion on how I can get this to work?
Answers
-
Verify that the COM cable between ports is correct. Double-check that the RS485- end and the RS485+ end are correctly connected. It's RS485- to RS485- between both ports, RS485+ to RS485+. Also make sure the baud rate is the same in both unit.
DB9 Male
DB9 pinoutBTW, you use Putty to test the RS-485 in Linux
-
This did not help, as stated in my original post, "I connected the DB9 pins 1, 2, and 5 on one stack to the same pins on the other stack". This matches the table posted by rogertsai. Based on that post I tried again, I installed putty on both Up Core stacks, I connected both instances of Putty to /dev/ttyUSB0, 9600. Terminals opened on both but typing in the terminals did not result in text (or anything) in the other terminals.
The link from the original post doesn't seem to work if I click on it, but if I copy it and paste it into a browser it takes me to the correct page. Scrolling to the bottom of that page suggest that you can test via loopback with RS485 converters, picocom, and echo. I believe that since I am using two Up Core stacks, that I should not need converters. The carrier boards say they support RS485 so to me this implies that I should not need to add external converters when connecting between two stacks (maybe for a loopback test but not from board to board), is that a correct assumption?
Is anyone able to communicate from one Up Core to another using RS485?
-
@ross
try this, set 1-3 and 4-6 for jumper JP1Also check RS-485 setting in the FINTEK driver
F81534-532 drivers -
Thank you for the continued suggestions, I still have not been able to make it work. I downloaded and installed the latest driver (v1.24-SVN2136_Linux) and the set_mode application. What I get is
:~/bin$ dmesg | grep ttyUSB
[ 6.312401] usb 1-1: Fintek F81532/F81534 converter now attached to ttyUSB0
[ 6.313750] usb 1-1: Fintek F81532/F81534 converter now attached to ttyUSB1
:~/bin$ sudo ./set_mode ttyUSB0 2
Target:/dev/ttyUSB0
port: ttyUSB0
Error: TIOCGRS485 ioctl not supported, errno=25.NOTE: I modified the set_mode to include the printing of the errno, and errno 25 is device unavailable.
I tried this with the jumpers in all 4 possible combinations and get the same results for all of them.
I think the ioctl calls were working when I began working on this months ago) but I have no proof of that so maybe they weren't.
I have tried to set mode on both ttyUSB0 and ttyUSB1, both get the same results.
I have been using RS-232 with an RS-232 to RS-485 converter so I can keep working on other parts of the code but it would be nice to not need the converter.