Skip to main content



      Home
Home » Eclipse Projects » Kura » Kura 1.4 + Moxa Uport 1250(kura protocol modbus not recognize MXUSB port)
Kura 1.4 + Moxa Uport 1250 [message #1758370] Tue, 28 March 2017 03:44 Go to next message
Eclipse UserFriend
Hi All,

I need help with Kura 1.4.
I'm trying to use MOXA UPORT 1250 plugged on BeagleBone Black with kernel 4.8.17-bone-rt-r2 (I need two RS485 port).
The driver and ttyMXUSB* ports of Moxa Uport , are not recognized by kura.protocol.modbus serialport driver.
I have a lot of experience with kura 1.4 modbus protocol (NO problems with ttyS* and ttyUSB*) but is the first time that i use MOXA USB-Serial converter.
Any suggestions?

Thanks for help

-Giuseppe-

[Updated on: Tue, 28 March 2017 03:46] by Moderator

Re: Kura 1.4 + Moxa Uport 1250 [message #1758450 is a reply to message #1758370] Tue, 28 March 2017 14:52 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

Have you tried using the serial ports (no Modbus) outside of Kura, just to make sure they operate as expected?

Thanks,
--Dave
Re: Kura 1.4 + Moxa Uport 1250 [message #1758482 is a reply to message #1758450] Wed, 29 March 2017 03:59 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Yes, I was able to open port and send string to make sure that driver was installed correctly and operates as expected.
For example I used:
echo "testtesttesttesttest" > /dev/ttyMXUSB* directly from console linux.
I used other script in java (no kura modbus) to open port and it's worked too.
i think that the problem is inside kura.protocol.modbus

Thanks for reply and help
Re: Kura 1.4 + Moxa Uport 1250 [message #1758513 is a reply to message #1758482] Wed, 29 March 2017 09:42 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

Can you please provide the following after trying to start your modbus bundle:

1. /var/log/kura.log and /var/log/kura-console.log files
2. Output of OSGi 'ss' command
3. Output of OSGi 'ls' command

Thanks,
--Dave

Re: Kura 1.4 + Moxa Uport 1250 [message #1758521 is a reply to message #1758513] Wed, 29 March 2017 10:21 Go to previous messageGo to next message
Eclipse UserFriend
Hi Dave,
thanks for reply.

kura-console is empty. there are no errors or exceptions.

kura.log with grep "my modbus bundle" is the following:

2017-03-29 14:12:02,525 [Component Resolve Thread (Bundle 6)] DEBUG o.w.k.a.Acqmodbusrtu - Configure /dev/ttyMXUSB0 port
2017-03-29 14:12:02,528 [Component Resolve Thread (Bundle 6)] DEBUG o.w.k.a.Acqmodbusrtu - portName : /dev/ttyMXUSB0
2017-03-29 14:12:02,529 [Component Resolve Thread (Bundle 6)] DEBUG o.w.k.a.Acqmodbusrtu - baudRate = 19200
2017-03-29 14:12:02,536 [Component Resolve Thread (Bundle 6)] DEBUG o.w.k.a.Acqmodbusrtu - Acqmodbusrtu /dev/ttyMXUSB0 activated
2017-03-29 14:12:02,553 [Acqmodbusrtu /dev/ttyMXUSB0 Thread] DEBUG o.w.k.a.Acqmodbusrtu - Acqmodbusrtu thread /dev/ttyMXUSB0 START
2017-03-29 14:12:02,554 [Component Resolve Thread (Bundle 6)] INFO o.w.k.a.Acqmodbusrtu - updated...
2017-03-29 14:12:02,652 [Acqmodbusrtu /dev/ttyMXUSB0 Thread] DEBUG o.e.k.p.m.ModbusProtocolDevice - Configure serial connection multiPorta thread num 0
2017-03-29 14:12:02,918 [Acqmodbusrtu /dev/ttyMXUSB0 Thread] WARN o.e.k.p.m.ModbusProtocolException - Could not load Exception Messages Bundle for Locale en_US
2017-03-29 14:12:02,924 [Acqmodbusrtu /dev/ttyMXUSB0 Thread] ERROR o.w.k.a.Acqmodbusrtu - configureDevice Exception: Generic Error - CONNECTION_FAILURE: {1} {2} {3} {4} {5} 1:java.io.IOException: javax.comm.NoSuchPortException uri: comm:/dev/ttyMXUSB0;baudrate=19200;databits=8;stopbits=1;parity=0;flowcontrol=0;timeout=2000

Here the ss+ls telnet localhost 5002:

osgi> ls
All Components:
ID State Component Name Located in bundle
1 Active org.eclipse.equinox.event org.eclipse.equinox.event(bid=7)
2 Active org.eclipse.kura.deployment.agent org.eclipse.kura.deployment.agent(bid=46)
3 Active org.eclipse.kura.data.DataService org.eclipse.kura.core(bid=48)
4 Active org.eclipse.kura.db.DbService org.eclipse.kura.core(bid=48)
5 Active org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport org.eclipse.kura.core(bid=48)
6 Active org.eclipse.kura.ssl.SslManagerService org.eclipse.kura.core(bid=48)
7 Active org.eclipse.kura.system.SystemService org.eclipse.kura.core(bid=48)
8 Active org.eclipse.kura.system.SystemAdminService org.eclipse.kura.core(bid=48)
9 Active org.eclipse.kura.certificate.CertificatesService org.eclipse.kura.core.certificates(bid=49)
10 Active org.eclipse.kura.cloud.CloudService org.eclipse.kura.core.cloud(bid=50)
11 Active org.eclipse.kura.cloud.CloudCallService org.eclipse.kura.core.cloud(bid=50)
12 Active org.eclipse.kura.cloud.app.command.CommandCloudApp org.eclipse.kura.core.cloud(bid=50)
13 Active org.eclipse.kura.core.comm.CommConnectionFactory org.eclipse.kura.core.comm(bid=51)
14 Active org.eclipse.kura.configuration.ConfigurationService org.eclipse.kura.core.configuration(bid=52)
15 Active org.eclipse.kura.crypto.CryptoService org.eclipse.kura.core.crypto(bid=53)
16 Active org.eclipse.kura.core.deployment.CloudDeploymentHandlerV2 org.eclipse.kura.core.deployment(bid=54)
17 Active org.eclipse.kura.log.LoggerService org.eclipse.kura.core.log(bid=55)
18 Active org.eclipse.kura.command.CommandService org.eclipse.kura.linux.command(bid=57)
19 Active org.eclipse.kura.net.NetworkService org.eclipse.kura.emulator.net(bid=58)
20 Unsatisfied org.eclipse.kura.position.PositionService org.eclipse.kura.linux.position(bid=59)
21 Active org.eclipse.kura.bluetooth.BluetoothService org.eclipse.kura.linux.bluetooth(bid=60)
22 Active org.eclipse.kura.status.CloudConnectionStatusService org.eclipse.kura.core.status(bid=61)
23 Active org.eclipse.kura.web.Console org.eclipse.kura.web(bid=62)
24 Active org.eclipse.kura.gpio.GPIOService org.eclipse.kura.linux.gpio(bid=63)
25 Active org.eclipse.kura.protocol.modbus.ModbusProtocolDevice org.eclipse.kura.protocol.modbus(bid=66)
26 Active org.eclipse.kura.watchdog.WatchdogService org.eclipse.kura.linux.watchdog(bid=75)
27 Active org.wisnam.kura.geko4_led_handler.Led_handler org.wisnam.kura.geko4_led_handler(bid=76)
28 Active org.wisnam.kura.acqmodbusrtu.Acqmodbusrtu org.wisnam.kura.acqmodbusrtu(bid=77)
29 Active org.eclipse.kura.demo.heater.IEC104 org.eclipse.kura.demo.iec104_server(bid=78)
osgi>ss
"Framework is launched."


id State Bundle
0 ACTIVE org.eclipse.osgi_3.8.1.v20120830-144521
1 ACTIVE org.eclipse.equinox.cm_1.0.400.v20120522-1841
2 ACTIVE org.eclipse.equinox.common_3.6.100.v20120522-1841
3 ACTIVE org.eclipse.equinox.registry_3.5.200.v20120522-1841
4 ACTIVE org.eclipse.equinox.http.registry_1.1.200.v20120522-2049
5 ACTIVE org.eclipse.equinox.console_1.0.0.v20120522-1841
6 ACTIVE org.eclipse.equinox.ds_1.4.0.v20120522-1841
7 ACTIVE org.eclipse.equinox.event_1.2.200.v20120522-2049
8 ACTIVE org.eclipse.equinox.io_1.0.400.v20120522-2049
9 ACTIVE org.eclipse.equinox.metatype_1.2.0.v20120522-1841
10 ACTIVE org.eclipse.equinox.util_1.0.400.v20120522-2049
11 ACTIVE org.eclipse.osgi.services_3.3.100.v20120522-1822
12 ACTIVE org.eclipse.osgi.util_3.2.300.v20120522-1822
13 ACTIVE org.apache.felix.gogo.command_0.8.0.v201108120515
14 ACTIVE org.apache.felix.gogo.runtime_0.8.0.v201108120515
15 ACTIVE org.apache.felix.gogo.shell_0.8.0.v201110170705
16 ACTIVE org.knowhowlab.osgi.monitoradmin_1.0.2
17 ACTIVE org.apache.felix.dependencymanager_3.0.0
18 ACTIVE org.apache.felix.deploymentadmin_0.9.5
19 ACTIVE osgi.cmpn_4.3.0.201111022214
20 ACTIVE org.eclipse.equinox.http.jetty_3.0.0.v20120522-1841
21 ACTIVE org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841
22 ACTIVE org.eclipse.jetty.continuation_8.1.3.v20120522
23 ACTIVE org.eclipse.jetty.http_8.1.3.v20120522
24 ACTIVE org.eclipse.jetty.io_8.1.3.v20120522
25 ACTIVE org.eclipse.jetty.security_8.1.3.v20120522
26 ACTIVE org.eclipse.jetty.server_8.1.3.v20120522
27 ACTIVE org.eclipse.jetty.servlet_8.1.3.v20120522
28 ACTIVE org.eclipse.jetty.util_8.1.3.v20120522
29 ACTIVE javax.servlet_3.0.0.v201112011016
30 ACTIVE org.apache.commons.fileupload_1.2.2.v20111214-1400
31 ACTIVE org.apache.commons.io_2.4.0
32 ACTIVE slf4j.api_1.6.4
33 RESOLVED slf4j.log4j12_1.6.0
Master=72
34 RESOLVED log4j_1.2.17
Fragments=35
35 RESOLVED log4j.apache-log4j-extras_1.1.0
Master=34
36 ACTIVE org.json_1.0.0.v201011060100
37 ACTIVE org.hsqldb.hsqldb_2.3.0
38 ACTIVE com.codeminders.hidapi_1.1.1
39 ACTIVE org.eclipse.soda.dk.comm_1.2.1
40 ACTIVE org.apache.commons.lang3_3.4.0
41 ACTIVE org.usb4java_1.0.0
42 ACTIVE usb4java-javax_1.0.0
43 RESOLVED jdk.dio_1.0.3
44 ACTIVE org.apache.commons.net_3.1.0.v201205071737
45 RESOLVED com.gwt.user_0.2.0
46 ACTIVE org.eclipse.kura.deployment.agent_1.0.5
47 ACTIVE org.eclipse.kura.api_1.0.7
48 ACTIVE org.eclipse.kura.core_1.0.7
49 ACTIVE org.eclipse.kura.core.certificates_1.0.2
50 ACTIVE org.eclipse.kura.core.cloud_1.0.7
51 ACTIVE org.eclipse.kura.core.comm_1.0.2
52 ACTIVE org.eclipse.kura.core.configuration_1.0.6
53 ACTIVE org.eclipse.kura.core.crypto_1.0.3
54 ACTIVE org.eclipse.kura.core.deployment_1.1.0
55 ACTIVE org.eclipse.kura.core.log_1.0.1
56 ACTIVE org.eclipse.kura.core.net_1.0.7
57 ACTIVE org.eclipse.kura.linux.command_1.0.4
58 ACTIVE org.eclipse.kura.emulator.net_1.0.0
59 STARTING org.eclipse.kura.linux.position_1.0.5
60 ACTIVE org.eclipse.kura.linux.bluetooth_1.0.3
61 ACTIVE org.eclipse.kura.core.status_1.0.1
62 ACTIVE org.eclipse.kura.web_1.0.7
63 ACTIVE org.eclipse.kura.linux.gpio_1.0.1
64 ACTIVE org.tigris.mtoolkit.iagent.rpc_3.0.0.20110411-0918
65 ACTIVE com.mysql.jdbc_5.1.41
66 ACTIVE org.eclipse.kura.protocol.modbus_1.0.7.201703241609
67 ACTIVE io.netty.buffer_4.0.34.Final
68 ACTIVE io.netty.common_4.0.34.Final
69 ACTIVE io.netty.transport_4.0.34.Final
70 ACTIVE io.netty.handler_4.0.34.Final
71 ACTIVE io.netty.codec_4.0.34.Final
72 ACTIVE slf4j.api_1.7.16
Fragments=33
73 ACTIVE io.dropwizard.metrics.core_3.1.2
74 ACTIVE org.openmuc.j60870_1.2.0
75 ACTIVE org.eclipse.kura.linux.watchdog_1.0.4
76 ACTIVE org.wisnam.kura.geko4_led_handler_1.0.1.201611291200
77 ACTIVE org.wisnam.kura.acqmodbusrtu_1.0.3.201703241815
78 ACTIVE org.eclipse.kura.demo.iec104_server_1.0.3.201703281829
osgi>

Thanks again

-Giuseppe-
Re: Kura 1.4 + Moxa Uport 1250 [message #1758546 is a reply to message #1758521] Wed, 29 March 2017 18:37 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

Sorry for not catching this at the beginning, the error is explained here [1]. To summarize, the library we use hard codes the device names, so only "standard" names are allowed (/dev/ttyUSB, /dev/ttyS0, etc.). You can get a complete list of available names here [2]. The solution is to link your /dev/ttyMXUSB0 port name to one accepted by the library. Something like:

ln /dev/ttyMXUSB0 /dev/ttyS0


I know this is not the ideal solution, but hopefully it gets you going.

[1] https://github.com/eclipse/kura/issues/10
[2] https://github.com/eclipse/kura/blob/develop/target-platform/org.eclipse.soda.dk.comm-parent/org.eclipse.soda.dk.comm/src/main/c/cygCommDriver.c

Thanks,
--Dave
Re: Kura 1.4 + Moxa Uport 1250 [message #1758571 is a reply to message #1758546] Thu, 30 March 2017 04:26 Go to previous message
Eclipse UserFriend
Hello Dave,

Thank you so much.
It's works!
Previous Topic:Device SSL Certificate error
Next Topic:GUI swing on OSGI bundle in KURA
Goto Forum:
  


Current Time: Wed Jul 30 18:18:27 EDT 2025

Powered by FUDForum. Page generated in 0.04729 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top