JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

RM on ubuntu 18.04 [Solved]
Goto page 1, 2  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Software
View previous topic :: View next topic  
Author Message
wnewell



Joined: 13 Jan 2009
Posts: 156
Location: DFW, Texas

PostPosted: Sat Jun 16, 2018 9:40 am    Post subject: RM on ubuntu 18.04 [Solved] Reply with quote

Been a long time since I've been here. here's what I get when I try and run rmir now.
root@mythfe0:/home/wes/rm# java -jar RemoteMaster.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.hifiremote.jp1.RemoteMaster (file:/home/wes/rm/RemoteMaster.jar) to method java.lang.ClassLoader.findLoadedClass(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.hifiremote.jp1.RemoteMaster
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
root@mythfe0:/home/wes/rm#
RM version 2.06 build 5
root@mythfe0:/home/wes/rm# java --version
openjdk 10.0.1 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)
root@mythfe0:/home/wes/rm#
What am I doing wrong.


Last edited by wnewell on Thu Jun 21, 2018 2:19 am; edited 1 time in total
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 903

PostPosted: Sun Jun 17, 2018 3:16 am    Post subject: Reply with quote

You are using Java 10, which is not currently supported. IFAIK, only Java 7 and 8 (?) are supported. Install Java 8 and you will be OK.

Please do not run RM as root. If the system is set up correctly, everything runs as non-root, except for the parallel driver (but that is a bad idea anyhow).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
yaworski



Joined: 22 Jun 2014
Posts: 450
Location: Warsaw, Poland

PostPosted: Sun Jun 17, 2018 5:08 am    Post subject: Reply with quote

RMIR is compiled with Java 7 right now. Java 8 works for sure. I don't have Java 9 installed right now so I'm not able to test it right now, as I'm on a really poor Internet connection until Tuesday.

I've checked with Java 10 as I have it installed side by side with Java 6, 7 and 8 on my Arch and I can confirm that it doesn't work. I don't know if the reason is what's printed out as a WARNING or something else. This is only a warning and not an error. It needs some deeper investigation.

--edit--

I've compiled RMIR using JDK 10 but it still doesn't start. I've temporarily disabled the code causing the illegal access warning and it still doesn't start. So as I thought it won't be easy to port RMIR to Java 10. I've seen a lot of deprecation warnings during compilation so a lot of code would need to be rewritten.
_________________
Marcin
Back to top
View user's profile Send private message
mdavej
Expert


Joined: 08 Oct 2003
Posts: 3952

PostPosted: Sun Jun 17, 2018 9:58 am    Post subject: Reply with quote

3FG found the culprit a while back. Sounds like it may be an easy fix, changing to a different method of dynamically loading classes.
http://www.hifi-remote.com/forums/viewtopic.php?p=133317#133317

But I suppose this also means once it's fixed, RMIR will only work with later versions of Java and not the earlier ones.
Back to top
View user's profile Send private message
wnewell



Joined: 13 Jan 2009
Posts: 156
Location: DFW, Texas

PostPosted: Sun Jun 17, 2018 11:03 am    Post subject: Reply with quote

Thanks guys. Deleted java 10 and loaded 8 and all works now.
Back to top
View user's profile Send private message
yaworski



Joined: 22 Jun 2014
Posts: 450
Location: Warsaw, Poland

PostPosted: Sun Jun 17, 2018 1:15 pm    Post subject: Reply with quote

Thanks mdavej for pointing that out. I read some info on the subject and after some changes in the code I'm now able to build RMIR under JDK 7 and run it on Java versions 7, 8 and 10 (as mentioned earlier, I don't have Java 9 installed, but shouldn't be a problem).

I can't make any tests right now as I don't have any remote with me, so I don't know if it fully works, but at least the GUI starts up correctly and there're no exceptions in the rmaster.err. The icons on the toolbar are also loaded correctly.
_________________
Marcin
Back to top
View user's profile Send private message
mdavej
Expert


Joined: 08 Oct 2003
Posts: 3952

PostPosted: Sun Jun 17, 2018 1:49 pm    Post subject: Reply with quote

That's great news! Thanks, Marcin.
Back to top
View user's profile Send private message
wnewell



Joined: 13 Jan 2009
Posts: 156
Location: DFW, Texas

PostPosted: Mon Jun 18, 2018 12:38 pm    Post subject: Reply with quote

wnewell wrote:
Thanks guys. Deleted java 10 and loaded 8 and all works now.

Well, I spoke before trying it with a remote. Getting the dreaded No remotes found. Tried different com ports, different jp1.2/3 cables, new batteries, etc. Same remotes I modded many years ago. No problem loading saved rmir files. Anyone got any ideas? Here's parts of rmaster.err.
RemoteMaster v2.06 build 5
Legacy merge set = true
System Properties:
java.version = 1.8.0_171
java.vendor = Oracle Corporation
os.name = Linux
os.arch = amd64
java.home = /usr/lib/jvm/java-8-openjdk-amd64/jre
java.class.path = /home/wes/rm/RemoteMaster.jar
Adding to classpath: file:/home/wes/rm/
Error parsing gtk-icon-sizes string: ''
Generating deviceImporter for protocol Blank
Generating deviceImporter for protocol Acer Keyboard
DevParm is Device
DevParm is Sub Device
**** Warning: multiple protocols with PID 00 5E and variantName ....
Starting normal download
Interface Name = JP1.X Serial
Port Name = /dev/ttyS0
Testing interface: JP1.X Serial
Interface matched. Trying to open remote.
Port Name = NULL
Failed to open
RemoteMaster.windowClosing() entered
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 903

PostPosted: Mon Jun 18, 2018 2:00 pm    Post subject: Reply with quote

wnewell wrote:
Tried different com ports, different jp1.2/3 cables,...


It is hard to help you if you are not telling exactly what you try to do...

Quote:

...
Interface Name = JP1.X Serial
Port Name = /dev/ttyS0
Testing interface: JP1.X Serial
Interface matched. Trying to open remote.
Port Name = NULL
Failed to open
RemoteMaster.windowClosing() entered


/dev/ttyS0 is on Linux a boda-fide serial port, somehow I doubt that you are using it. Assuming you are using a FTDI-like serial cable, this should show up as /dev/ttyUSB0 or similar. Try
Code:
ls /dev/tty????

and tell us the outcome. (That's four literal question marks.)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
wnewell



Joined: 13 Jan 2009
Posts: 156
Location: DFW, Texas

PostPosted: Mon Jun 18, 2018 3:34 pm    Post subject: Reply with quote

I'm trying to download or upload to the rcrp05b remote like I did many years ago. Don't know why you want this, but here's all the serial ports.
wes@mythfe0:~$ ls /dev/ttyS*
/dev/ttyS0 /dev/ttyS14 /dev/ttyS2 /dev/ttyS25 /dev/ttyS30 /dev/ttyS8
/dev/ttyS1 /dev/ttyS15 /dev/ttyS20 /dev/ttyS26 /dev/ttyS31 /dev/ttyS9
/dev/ttyS10 /dev/ttyS16 /dev/ttyS21 /dev/ttyS27 /dev/ttyS4
/dev/ttyS11 /dev/ttyS17 /dev/ttyS22 /dev/ttyS28 /dev/ttyS5
/dev/ttyS12 /dev/ttyS18 /dev/ttyS23 /dev/ttyS29 /dev/ttyS6
/dev/ttyS13 /dev/ttyS19 /dev/ttyS24 /dev/ttyS3 /dev/ttyS7
But only 3 of them have actual uarts. S0, S4, and S5. I'm using ttyS0. Standard com1 in winspeak.
es@mythfe0:~$ setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test
wes@mythfe0:~$ ls -l /dev/ttyS0
crw-rw---- 1 root dialout 4, 64 Jun 18 05:05 /dev/ttyS0

Any other info you need?
Back to top
View user's profile Send private message
wnewell



Joined: 13 Jan 2009
Posts: 156
Location: DFW, Texas

PostPosted: Mon Jun 18, 2018 3:55 pm    Post subject: Reply with quote

Oh, I'm not using a usb jp1 cable. I do jnow the difference between usb and rs232 ports. I have 2 of these cables.

https://www.diygadget.com/jp1-1-1-1-2-1-3-cables/44-jp1-2-1-3-flash-serial-cable-for-universal-remotes.html

Just for grins I opened read/write permissions to all on the port. No change.
wes@mythfe0:~$ ls -l /dev/ttyS0
crw-rw-rw- 1 root dialout 4, 64 Jun 18 15:43 /dev/ttyS0
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 903

PostPosted: Tue Jun 19, 2018 1:00 am    Post subject: Reply with quote

Ok, that is a "real" serial cable. Are you sure that /dev/ttyS0 really corresponds to hardware? Today very few PCs have real serial interfaces. Can you check using something else?

Code:

wes@mythfe0:~$ ls -l /dev/ttyS0
crw-rw-rw- 1 root dialout 4, 64 Jun 18 15:43 /dev/ttyS0

Modern Linuxes tend to undo that, at latest by the next reboot. Better is

Code:

sudo usermod -aG dialout `whoami`

(at least on Fedora, I believe also on Ubunto).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
wnewell



Joined: 13 Jan 2009
Posts: 156
Location: DFW, Texas

PostPosted: Tue Jun 19, 2018 1:50 am    Post subject: Reply with quote

Assuming you want to make sure I'm member of the dialout group. I already am.
wes@mythfe0:~$ groups wes
wes : wes adm dialout cdrom sudo dip video plugdev lpadmin sambashare mythtv
In case rm uses root to dialout I added root to the dialout group too. No change.

I might add that uploads and downloads stop working a few distros back. Don't remember exactly when, but at least a few years back. My original programing of the remotes with rm was probably around 2010 and I was using mandriva linux back then iirc, but it was on this same machine which I've had since ~2009. I just never needed to reprogram the remotes since then.
Back to top
View user's profile Send private message
yaworski



Joined: 22 Jun 2014
Posts: 450
Location: Warsaw, Poland

PostPosted: Tue Jun 19, 2018 4:55 am    Post subject: Reply with quote

If anyone is interested in testing a possible Java 9/10 fix, you can grab it here:
https://www.dropbox.com/s/bc7tfj5l58foard/RemoteMaster.jar?dl=1

I've tested it under Java 7 and Java 10 with URC-6440 (JPS), URC-7980 (JP1.x serial) and Nevo C3 (CommHID) and everything seems to work.

PS. I'm sorry for using dropbox instead of the file section - I've tried uploading this multiple times and failed.
_________________
Marcin
Back to top
View user's profile Send private message
wnewell



Joined: 13 Jan 2009
Posts: 156
Location: DFW, Texas

PostPosted: Tue Jun 19, 2018 10:53 am    Post subject: Reply with quote

Still no remotes found, but can confirm it runs ok on ubuntu 18.04 with java 8 or java 10 installed.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Software All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Get Smart! the band's official homepage Rockabilly Central