Problem to open gcode serial

68 views
Skip to first unread message

Bernd Walter

unread,
Jun 13, 2017, 7:36:26 PM6/13/17
to OpenPnP
This is the output I get when I start openpnp and hit the "power" button:
[85]pnp2> ./openpnp.sh
2017-06-14 00:40:21 [AWT-EventQueue-0] org.openpnp.Main DEBUG: Bienvenue, Wilkommen, Hello, Namaskar, Welkom to OpenPnP version 0.0.1-alpha-SNAPSHOT build cbd790.
2017-06-14 00:40:21 [AWT-EventQueue-0] org.openpnp.Scripting TRACE: Scripting.on Startup
2017-06-14 00:40:26 [Thread-9] org.openpnp.machine.reference.ReferenceMachine DEBUG: setEnabled(true)
Exception in thread "Thread-9" java.lang.UnsatisfiedLinkError: jssc.SerialNativeInterface.openPort(Ljava/lang/String;Z)J
        at jssc.SerialNativeInterface.openPort(Native Method)
        at jssc.SerialPort.openPort(SerialPort.java:158)
        at org.openpnp.machine.reference.driver.AbstractSerialPortDriver.connect(AbstractSerialPortDriver.java:113)
        at org.openpnp.machine.reference.driver.GcodeDriver.connect(GcodeDriver.java:169)
        at org.openpnp.machine.reference.driver.GcodeDriver.setEnabled(GcodeDriver.java:198)
        at org.openpnp.machine.reference.ReferenceMachine.setEnabled(ReferenceMachine.java:110)
        at org.openpnp.gui.MachineControlsPanel$6.lambda$actionPerformed$0(MachineControlsPanel.java:352)
        at java.lang.Thread.run(Thread.java:745)

Background info.
The system is a FreeBSD jail.
The gcode controller is connected to another host.
TTY is handed over to the virtual system via socat, which creates a PTY and softlink under /var/run/pnp/gcode1.
I can connect to the controller via /var/run/pnp/gcode1 using a terminal program.

This is the gcode part of my machine.xml
      <driver class="org.openpnp.machine.reference.driver.GcodeDriver" port-name="/var/run/pnp/gcode1" baud="115200" flow-control="Off" data-bits="Eight" stop-bits="One" parity="None" set-dtr="false" set-rts="false" units="Millimeters" max-feed-rate="1000" timeout-milliseconds="5000" connect-wait-time-milliseconds="1000">
         <homing-fiducial-location units="Millimeters" x="0.0" y="0.0" z="0.0" rotation="0.0"/>
         <command type="COMMAND_CONFIRM_REGEX">
            <text><![CDATA[^ok.*]]></text>
         </command>
         <command head-mountable-id="69edd567-df6c-495a-9b30-2fcbf5c9742f" type="MOVE_TO_COMMAND">
            <text><![CDATA[G71325]]></text>
         </command>
         <command head-mountable-id="NOZ1493179319575" type="MOVE_TO_COMMAND">
            <text><![CDATA[G123]]></text>
         </command>
         <sub-drivers class="java.util.ArrayList"/>
         <axes class="java.util.ArrayList">
            <axis name="x" type="X" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>*</string>
               </head-mountable-ids>
            </axis>
            <axis name="y" type="Y" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>*</string>
               </head-mountable-ids>
            </axis>
            <axis name="z" type="Z" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>*</string>
               </head-mountable-ids>
            </axis>
            <axis name="rotation" type="Rotation" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>*</string>
               </head-mountable-ids>
            </axis>
         </axes>
      </driver>

It doesn't even open the device.
After some googling I was pointed to:
https://code.google.com/archive/p/java-simple-serial-connector/
Which seems to be another autoincluded Binary hell, which honesty is not exactly my way of doing things.
I usually prefer to be able to compile everything manually from source.
I've already had an extremely unpleasant time with OpenCV, because I had to include a dynamic build library version for various reasons,
which makes it a "works for me only" kind of solution.
And getting maven to use my own OpenCV package wasn't an easy task either.

Although this is not exactly an OpenPNP question.
Does anyone have an idea how to compile the jSCC sourcecode and get it into OpenPNP?
Currently I don't even know if I've got a wrong one included via maven, or non at all.
Unlike the OpenCV it is not a maven based source and I couldn't find anything in the jSSC-2.7.0-Release.zip either.
There is low level portable (missing code for non standard bps-rates though) cpp code for TTY usage and two .jar files.
The src/jssc-2.7.0-src.jar only contains .java files, the other seems to be a prebuild version, which of course is of no use for me.
There is no Makefile or anything else I could identify as a build mechanism.

Bernd Walter

unread,
Jun 13, 2017, 8:27:21 PM6/13/17
to OpenPnP

comms/java-simple-serial-connector is in the FreeBSD ports system.

Hopefully this just means I need to install it.

Bernd Walter

unread,
Jun 13, 2017, 9:28:55 PM6/13/17
to OpenPnP


On Wednesday, June 14, 2017 at 2:27:21 AM UTC+2, Bernd Walter wrote:

comms/java-simple-serial-connector is in the FreeBSD ports system.

Hopefully this just means I need to install it.

Yes - that made me connect to my board.
Now I have another problem that the move commands are broken.
But that's something I should be able to find out myself.
Quite obvious there is something wrong with my settings, but that's no surprise since it never worked at all.

2017-06-14 03:25:18 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:19 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:20 [pool-2-thread-1] org.openpnp.machine.reference.ReferenceNozzle DEBUG: N1.moveTo((0.010000, 0.000000, 0.000000, 0.000000 mm), 1.0)
2017-06-14 03:25:20 [pool-2-thread-1] org.openpnp.machine.reference.driver.GcodeDriver DEBUG: sendCommand(G71325, 5000)...
2017-06-14 03:25:20 [pool-2-thread-1] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] >> G71325
2017-06-14 03:25:20 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << ok 0
2017-06-14 03:25:20 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << Unknown command:G5789
2017-06-14 03:25:20 [pool-2-thread-1] org.openpnp.machine.reference.driver.GcodeDriver DEBUG: sendCommand(G71325, 5000) => [wait, wait, wait, wait, wait, wait, wait, wait, wait, wait, wait, wait, wait, ok 0]
2017-06-14 03:25:20 [pool-2-thread-1] org.openpnp.machine.reference.ReferenceNozzle DEBUG: N1.moveTo((0.020000, 0.000000, 0.000000, 0.000000 mm), 1.0)
2017-06-14 03:25:20 [pool-2-thread-1] org.openpnp.machine.reference.driver.GcodeDriver DEBUG: sendCommand(G71325, 5000)...
2017-06-14 03:25:20 [pool-2-thread-1] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] >> G71325
2017-06-14 03:25:20 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << ok 0
2017-06-14 03:25:20 [pool-2-thread-1] org.openpnp.machine.reference.driver.GcodeDriver DEBUG: sendCommand(G71325, 5000) => [Unknown command:G5789, ok 0]
2017-06-14 03:25:20 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << Unknown command:G5789
2017-06-14 03:25:21 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:22 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:23 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:24 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:25 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:26 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:27 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:28 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:29 [pool-2-thread-1] org.openpnp.machine.reference.ReferenceNozzle DEBUG: N1.moveTo((0.030000, 0.000000, 0.000000, 0.000000 mm), 1.0)
2017-06-14 03:25:29 [pool-2-thread-1] org.openpnp.machine.reference.driver.GcodeDriver DEBUG: sendCommand(G71325, 5000)...
2017-06-14 03:25:29 [pool-2-thread-1] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] >> G71325
2017-06-14 03:25:29 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << ok 0
2017-06-14 03:25:29 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << Unknown command:G5789
2017-06-14 03:25:29 [pool-2-thread-1] org.openpnp.machine.reference.driver.GcodeDriver DEBUG: sendCommand(G71325, 5000) => [Unknown command:G5789, wait, wait, wait, wait, wait, wait, wait, wait, ok 0]
2017-06-14 03:25:30 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:31 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:32 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait
2017-06-14 03:25:33 [Thread-11] org.openpnp.machine.reference.driver.GcodeDriver TRACE: [/var/run/pnp/gcode1] << wait

Bernd Walter

unread,
Jun 13, 2017, 9:49:25 PM6/13/17
to OpenPnP
It finally moves - at last my loose motor setup on my bench.
Will have to wire up my machine.
The broken GCodes where within my head definition.
The good thing is that it just worked with repetier-firmware.
I know that repetier firmware can be configured to require checksums, which of course wouldn't work, but that's another story.
Now I need to find out how set setup the commands for my two board setup.
Both Z cam motors are setup as extruders on the first board and 4 rotation axis as extruders on the second board.
Repetier Firmware has no support for multiple Z motors, which are not mirrored.

Sorry for the noise.
Java is something I've never really had to use at this layer.
My world is more C and CPP.

Reply all
Reply to author
Forward
0 new messages