Unfx Posted February 20, 2021 Share Posted February 20, 2021 Hello all, I'm trying to use Uport 1250i for 2 wire RS485 communication. My operating system is Ubuntu 18.04. I see that it is recognized well by the Linux kernel. Feb 17 10:01:17 r300021513 kernel: [ 2.031006] usb 1-1: New USB device found, idVendor=110a, idProduct=1251 Feb 17 10:01:17 r300021513 kernel: [ 2.031007] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Feb 17 10:01:17 r300021513 kernel: [ 2.031008] usb 1-1: Product: MOXA UPort 1250I Feb 17 10:01:17 r300021513 kernel: [ 2.031008] usb 1-1: Manufacturer: MOXA Technologies Feb 17 10:01:17 r300021513 kernel: [ 6.545204] usbcore: registered new interface driver mxuport Feb 17 10:01:17 r300021513 kernel: [ 6.545210] usbserial: USB Serial support registered for MOXA UPort Feb 17 10:01:19 r300021513 kernel: [ 9.752962] mxuport 1-1:1.0: Using device firmware version v1.4.1 Feb 17 10:01:19 r300021513 kernel: [ 9.752966] mxuport 1-1:1.0: MOXA UPort converter detected Feb 17 10:01:19 r300021513 kernel: [ 9.753393] usb 1-1: MOXA UPort converter now attached to ttyUSB1 Feb 17 10:01:19 r300021513 kernel: [ 9.753603] usb 1-1: MOXA UPort converter now attached to ttyUSB2 I can communicate via RS232 without a problem. However when I connect an RS485 device to D+ D- pins, I cannot. In the manual it says run setserial /dev/ttyUSB1 port 0x1 for 2 wire RS485. But when I run this, it returns; Cannot get serial info: Inappropriate ioctl for device So, I'm stucked. How can I use this device in Ubuntu 18.04 (4.15.0-135-generic) with 2 wire RS485 configuration? Best Regards Link to comment
Знайка Posted February 20, 2021 Share Posted February 20, 2021 Hello, which driver version was used? Link to comment
Unfx Posted February 20, 2021 Author Share Posted February 20, 2021 Hello, Is this information sufficient? If not please guide me how to get the driver version. modinfo mxuport filename: /lib/modules/4.15.0-135-generic/kernel/drivers/usb/serial/mxuport.ko license: GPL author: <support@moxa.com> author: Andrew Lunn <andrew@lunn.ch> srcversion: 228F3A178FF4B8853712E3E alias: usb:v110Ap1653d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v110Ap1613d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v110Ap1658d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v110Ap1618d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v110Ap1451d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v110Ap1450d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v110Ap1410d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v110Ap1251d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v110Ap1250d*dc*dsc*dp*ic*isc*ip*in* depends: usbserial retpoline: Y intree: Y name: mxuport vermagic: 4.15.0-135-generic SMP mod_unload signat: PKCS#7 signer: sig_key: sig_hashalgo: md4 Link to comment
Знайка Posted February 20, 2021 Share Posted February 20, 2021 Where did you get the driver you used? What name of the file it had? Link to comment
Unfx Posted February 20, 2021 Author Share Posted February 20, 2021 Hello, thank you for the reply. It’s already included in. I did not install any driver. I think ubuntu linux kernel modules includes this moxa driver. Link to comment
Знайка Posted February 20, 2021 Share Posted February 20, 2021 Try this one https://yadi.sk/d/l8D9Y5aY00MNrQ version 5.0.7 Link to comment
Unfx Posted February 20, 2021 Author Share Posted February 20, 2021 Since my kernel is 4.15, will this one be suitable? It says kernel 5.x thanks Link to comment
Знайка Posted February 20, 2021 Share Posted February 20, 2021 You're absolutely right, for your case you should use this https://moxa.ru/files/drivers_utilities_3/1600-series-driver-v4_01.zip Link to comment
Unfx Posted February 22, 2021 Author Share Posted February 22, 2021 Thanks. This one seems to work. Now I have port names as ttyMXUSB0 and ttyMXUSB1 instead of ttyUSB0 and ttyUSB1. For communicating with RS485 device, I run setserial /dev/ttyMXUSB0 port 0x1 After this command, I can receive serial messages but they are very slow and sometimes missing some of the ending bytes. Is there a configuration to alter latency and speed of the device? Maybe some timeouts etc.? Thnaks Link to comment
Знайка Posted February 24, 2021 Share Posted February 24, 2021 If your task is to increase the line throughput you should increase the bitrate on the both ends of the line. Link to comment
Unfx Posted February 26, 2021 Author Share Posted February 26, 2021 In fact, it may not be related with bitrate. It is 115200 and I can read very well with another RS485 converter (ICPDAS brand). When I change it with Moxa 1250i, messages stall sometimes. They are not constantly arriving. Messages are generally corrupted and arriving slowly. I thought as a driver issue. Link to comment
Знайка Posted February 26, 2021 Share Posted February 26, 2021 Did you try to terminate the line or to install Pull Hi\Lo resistors? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now