Station M2 does not work with Moxa RS-485 via USB
smatask
Newbie
Station M2
2022-02-26 19:17
1626
0
Last edited by smatask on 2022-2-26 19:17 Editor
Hello, next question.
In my task, my software controls external devices via the rs-485 interface.
I have a Moxa UPort-1450 in my work.
When I connect Moxa to M2, I see a USB adapter, but I don't see the interfaces I need to work.
[ 54.985877] usb 5-1: new high-speed USB device number 2 using xhci-hcd
[ 55.127103] usb 5-1: New USB device found, idVendor=110a, idProduct=1450, bcdDevice= 2.00
[ 55.127129] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 55.127144] usb 5-1: Product: MOXA UPort 1450
[ 55.127158] usb 5-1: Manufacturer: MOXA Technologies
root@firefly:~# uname -a
Linux firefly 4.19.193 #76 SMP Thu Feb 24 14:25:47 CST 2022 aarch64 aarch64 aarch64 GNU/Linux
Another option is to connect Moxa to Raspberry pi 4b in Alt Linux:
[1304833.113224] usb 1-1.3: new high-speed USB device number 11 using xhci_hcd
[1304833.254311] usb 1-1.3: New USB device found, idVendor=110a, idProduct=1450, bcdDevice= 2.00
[1304833.254332] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[1304833.254344] usb 1-1.3: Product: MOXA UPort 1450
[1304833.254355] usb 1-1.3: Manufacturer: MOXA Technologies
[1304835.959702] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[1304836.533656] mxuport 1-1.3:1.0: Using device firmware version v1.4.1
[1304836.533713] mxuport 1-1.3:1.0: MOXA UPort converter detected
[1304836.534506] usb 1-1.3: MOXA UPort converter now attached to ttyUSB0
[1304836.535130] usb 1-1.3: MOXA UPort converter now attached to ttyUSB1
[1304836.535714] usb 1-1.3: MOXA UPort converter now attached to ttyUSB2
[1304836.536306] usb 1-1.3: MOXA UPort converter now attached to ttyUSB3
sam-rpi4b-8g ~ # uname -a
Linux sam-rpi4b-8g 5.10.81-rpi-def-alt1 #2 SMP Fri Dec 3 11:58:48 UTC 2021 aarch64 GNU/Linux
There is an adapter and the interfaces I need here.
Experts from Alt Linux say that you need to build a kernel with the option:
CONFIG_USB_SERIAL_MXUPORT=m
And I may need a driver for moxa.
I'm asking you to help me get moxa to work at the station M2.
Thanks in advance
|
|
Original topic Author:smatask,If you repost, please indicate the source:《 Station M2 does not work with Moxa RS-485 via USB 》
I found the driver for your device here
https://moxa.com/en/support/prod ... ntation?psid=114475
You must do step 3.3 in the readme and compile a new kernel with the driver for kernel 4.19.
Perhaps Firefly can help build a new image for you next week or later.
Hi,
Would I distract people if it were that simple.
root@firefly:/home/firefly/install/mxuport/driver# make -s
************************************************************************
Ubuntu 20.04.4 LTS
\l 4.19.193
MOXA UPort 1200/1400/1600 series driver ver 4.1
Release Date: 2021/11/18
************************************************************************
***********************************ERROR********************************
Unable to locate matching source for kernel 4.19.193.
Please refer the readme.txt to install proper kernel-header/source.
************************************************************************
Build Fail! Please check build.log for further information.
make: *** [Makefile:42: modules] Error 1
//update
root@firefly:/home/firefly/install/mxuport/driver# apt update
Hit:1 http://mirrors.aliyun.com/ubuntu-ports focal InRelease
Hit:2 http://mirrors.aliyun.com/ubuntu-ports focal-updates InRelease
Hit:3 http://mirrors.aliyun.com/ubuntu-ports focal-backports InRelease
Hit:4 http://mirrors.aliyun.com/ubuntu-ports focal-security InRelease
Hit:5 https://wiki.t-firefly.com/firefly-ubuntu-repo focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
//I didn't find anything in the sources
root@firefly:/home/firefly/install/mxuport/driver# apt search linux-headers-$(uname -r)
Sorting... Done
Full Text Search... Done
//I didn't find anything to install kernel headers
root@firefly:/home/firefly/install/mxuport/driver# apt install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.19.193
E: Couldn't find any package by glob 'linux-headers-4.19.193'
root@firefly:/home/firefly/install/mxuport/driver#
***************************************
What works in regular Ubuntu doesn't work here.
I need the help of Firefly developers.
Please, could you help me...
Firmware is uploading, try this, Station_M2_Ubuntu_20.04_GPT_RAW_20220301_1609.zip
https://drive.google.com/drive/f ... MefLA4Y?usp=sharing
Thank you very much, it got better.
There are four RS-232 interfaces, and I can work with them, however, to switch to RS485 mode (according to the moxa documentation), use setserial, but setserial does not work, because the driver does not support ioctl. And how else to switch the port to rs-485, I do not know.
I need RS-485 interfaces, but how to get them is not clear. I would be grateful for any help in solving this problem. Thank you for your attention and help.
I'm afraid the problem is with the driver CONFIG_USB_SERIAL_MXUPORT=m.
Maybe you still need to use the official driver, as lonewolf31 said.
You can find the corresponding linux-header here, linux-headers-4.19.xxx_arm64.deb.
https://drive.google.com/drive/f ... bcnO7LSajZKSgKbZdFS
Thank you very much, I will try to follow your recommendation, I will report the results.
I'm not successful today.
Hi, do as follows to see if the driver is loaded normally.