srbeen
Posts: 3
Joined: Sat Mar 02, 2013 12:06 am

UniversalGcodeSender on Hard Float raspbian

Sat Mar 02, 2013 12:14 am

Universal G-Code sender on Raspbian Wheezy with Hard Float & jdk8

Infos taken from
http://jdk8.java.net/fxarmpreview/javaf ... eview.html
and
http://opensourceecology.org/wiki/Gcode ... spberry_Pi

1) Flash latest Wheezy hard float image to your SD card, setup using raspi-config.
*NOTE* java suggests a min 128MB split for the GPU VRAM for proper functionality.
2) Boot up to the GUI
3) download the javaFX arm preview 58MB zip, posted above, extract it to /opt directory
4) download 32bit UniversalGcode Sender by willwinder here: http://bit.ly/Xz4U1R
5) in terminal, install some things:

Code: Select all

sudo apt-get install openjdk-7-jre librxtx-java
6) extract UniversalGcodeSender to a folder, I chose

Code: Select all

/home/pi/Desktop/UGCS/
7) Using terminal, you want to extract your two jar files. Heres how I did it:

Code: Select all

tar xzvf UniversalGcodeSender-v1.0.5-all32.zip
/opt/jdk1.8.0/bin/jar -xf UniversalGcodeSender-all32.jar
cd lib
/opt/jdk1.8.0/bin/jar -xf swing-layout-1.0.4.jar
In UGCS folder, you should see a start.sh file, you need to edit that like so:
under the $last section (linux one not mac), delete line starting with

Code: Select all

java -jar
or comment out by putting a # in front.
add these lines below your commented line:

Code: Select all

export CLASSPATH=$CLASSPATH:.:/usr/share/java/RXTXcomm.jar:/home/pi/Desktop/UGCS/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni
/opt/jdk1.8.0/bin/java -Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0:/dev/ttyUSB0:/dev/ttyAMA0 jar -Xmx256m $rootdir/UniversalGcodeSender-all*.jar
From what I can tell, having JDK8 requires these exports to be set on EACH execution. Theres likely a better way, but this is easy.
Save the start.sh script. chmod +x it/right click->permissions->allow execution. Double click and click execute. In about 20 seconds it should pop up. If your CPU meter isn't maxed, and it never loaded you should run in terminal to find problem. execute

Code: Select all

./start.sh
and see what is erroring out.

When its loading up and will control your steppers you can delete everything from the UGCS folder except the universal jar file, start.sh and lib folder. Double clicking start.sh and hitting execute should be all you need to do to boot now.

If anyone wants to try not installing the openjdk-7-jre package and seeing if it'll execute that'd be great, its quite large. You will need the librxtx-java package AFAIK.

Hope this helps the millers! Next step is to get SSH working along with X-term and the wifi adapter.

User avatar
xranby
Posts: 539
Joined: Sat Mar 03, 2012 10:02 pm

Re: UniversalGcodeSender on Hard Float raspbian

Sat Mar 02, 2013 8:56 am

I had no idea what an "GcodeSender" was so I had to google it:

"Universal GcodeSender is a Java based GRBL compatibl cross platform G-Code sender. Use this program to run a GRBL controlled CNC machine."
Source: https://github.com/winder/Universal-G-Code-Sender

Image
Image source: http://opensourceecology.org/wiki/Gcode ... spberry_Pi

Nice, and very cool!
:shock: Do It Yourself, Computer Numerical Control manufacturing software running using a Raspberry Pi!
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

srbeen
Posts: 3
Joined: Sat Mar 02, 2013 12:06 am

Re: UniversalGcodeSender on Hard Float raspbian

Sat Mar 02, 2013 6:35 pm

Java just released the JDK8 preview with hard-float support on ARM a short while ago. All the other guides I found shown how to get it going in soft-float, which is a slower booting/running OS. I just tried it on the latest wheezy image and this method worked to control my CNC mill & was quite easy, so it should work for others.

Next goal is to get Xterm functional over SSH so I can remotely log into the CNC mill and send the commands. This should lower the dust and noise as I can move the mill outside if needed. Doubt this will take much further effort though.

User avatar
xranby
Posts: 539
Joined: Sat Mar 03, 2012 10:02 pm

Re: UniversalGcodeSender on Hard Float raspbian

Sat Mar 02, 2013 6:46 pm

srbeen wrote: Next goal is to get Xterm functional over SSH so I can remotely log into the CNC mill and send the commands. This should lower the dust and noise as I can move the mill outside if needed. Doubt this will take much further effort though.
Login using ssh -X
then you should be able to access the CNC Java interface across the network.
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

srbeen
Posts: 3
Joined: Sat Mar 02, 2013 12:06 am

Re: UniversalGcodeSender on Hard Float raspbian

Mon Mar 11, 2013 7:52 pm

Thank you for the suggestion. I was going to use something similar as I have done with my other ubuntu box for mythtv setup (Xterm via ssh) - but this relies on the SSH connection staying up.

I just don't want any wifi hiccups to botch jobs, thinking if I use X-term and the wifi drops/ssh connection is lost, the job will cancel and potentially ruin what its working on. I'll have to play some more.

User avatar
terrycarlin
Posts: 70
Joined: Thu Jun 14, 2012 10:42 pm

Re: UniversalGcodeSender on Hard Float raspbian

Tue Mar 12, 2013 9:06 pm

Check out "screen". It allows you to do several interesting things, one of which is to let you run a command line command and if the ssh session drops, you can reconnect and your job will still be running.
If it ain't broke, take it apart and see how it works.

luismmmmmm
Posts: 1
Joined: Sun Sep 03, 2017 5:12 pm

Re: UniversalGcodeSender on Hard Float raspbian

Sun Sep 03, 2017 5:26 pm

i tried but is imposiblke instal this in raspberry ist more easy instal grbl controler bus cant install it un arduino using rasp bery

Return to “Automation, sensing and robotics”