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

Improved Linux (and maybe Mac) support for RMIR

 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Software
View previous topic :: View next topic  
Author Message
mathdon
Expert


Joined: 22 Jul 2008
Posts: 2960
Location: Cambridge, UK

PostPosted: Tue Mar 17, 2015 1:15 pm    Post subject: Improved Linux (and maybe Mac) support for RMIR Reply with quote

At long last I have a Linux system on which I can test RMIR development. It is Ubuntu Linux 14.04 and I was horrified at what I found when I came to set up RMIR on it. Double-clicking the RemoteMaster.jar file didn't work. It could not find the RDFs, Maps or even protocols.ini, and even when pointed to them through the dialogs that opened, it still failed to open. I found I had to use the rmir.sh and rmaster.sh shell scripts every time I wanted to open RMIR or RM, that these had to be run from a command line and that as they ran RemoteMaster with root privileges, I had to enter my password every time. Even I know that it is not good practice to run ordinary programs as root, not to mention the inconvenience of needing my password each time.

With help from Barf, to whom many thanks, I have tried to do something about this. My intention has been to try to make use of RMIR in Linux as easy as it is in Windows. Build 18 of RMIR v2.03 Alpha 28 is my first attempt at this. If you download and unzip the full package, you will see that the old shell scripts rmir.sh and rmaster.sh have been removed and in its place there is a setup script Setup.sh. If you have unzipped the upgrade package into an existing installation of Alpha 28 then the old scripts will, of course, still be present with the new one added.

You need to run Setup.sh from a command line as, like the old scripts, it uses sudo to gain root privileges. However, this is a one-off setup procedure. It creates two files, RMIR.desktop and RemoteMaster.desktop, which are the Linux equivalent of the Windows shortcuts created by Setup.vbs. Root privileges are needed to give these, and the jar file, execute permission. It is also needed to perform what to me is a rather esoteric task of adding the user to the "dialout" group. This step is required to enable RMIR to access USB ports without RMIR itself being run as root.

The two .desktop files appear (in Ubuntu at least) in the Nautilus file manager without their extensions. They should show with the appropriate RM icon, and double-clicking these files should open RemoteMaster in RMIR or RM mode. If you copy them to your Home/Desktop directory they should show as icons on your desktop. If, like Ubuntu, your Linux uses Gnome Unity desktop then when you open RMIR or RM with the .desktop shortcuts, the icon should appear on the Launcher sidebar. If you then right-click the icon and select "Lock to Launcher", they will remain there for quick access after you close the program. Also, after you have run Setup, you may open RMIR by double-clicking RemoteMaster.jar. (In fact you can do this before running Setup, but you will not be able to use a USB port to download or upload from a remote.)

There is one problem with running RMIR without root privileges. If it attempts to access the parallel port interface then it will crash, as this is a primitive interface not supported by modern operating systems. To avoid this problem, if you have the menu item Remote/Interface set to Auto-detect then before it tries the parallel interface, you will get a warning message explaining this and asking if you want to continue. If you don't actually have a parallel interface, the only time you will get this message is when RMIR cannot find a remote, as the parallel interface is tried after all others have failed. If you really do want to use a parallel interface without getting this message every time, you can do so by selecting the parallel interface explicitly in the Remote/Interace menu, and of course you must run RMIR as root.

I hope this simplifies the use of RMIR with Linux. Please report any problems. I would also be grateful if Mac OS X users could report whether it helps them, and what more could be done to ease use with Mac OS X. As I have said, I can now do testing on Ubuntu Linux but still have no access to a Mac. As I am a (very) newbie Linux user, please excuse me if I have misused Linux terminology. I have also tried hard not to use anything specific to Ubuntu in the new setup mechanism, but there are no guarantees on that so please report any issues.
_________________
Graham
Back to top
View user's profile Send private message
mathdon
Expert


Joined: 22 Jul 2008
Posts: 2960
Location: Cambridge, UK

PostPosted: Wed Apr 01, 2015 12:20 pm    Post subject: Reply with quote

I have now posted build 19 of RMIR v2.03 Alpha 28. Thanks to helpful comments from user leamas in a PM, this includes a substantially revised version of the new Linux setup file Setup.sh.

It seems that this setup is of no use to Mac OS X users. Even without Setup.sh or any equivalent, running RemoteMaster.jar will open it in RMIR mode. There are two ways to open it as RM. One is to open RMIR and then use the menu option File/New/Device Upgrade to open RM. The original RMIR can then be closed if desired. The other is use a command line to open RemoteMaster.jar with parameter -rm.

If any Mac OS X user can write a setup script to create shortcuts to open both RMIR and RM, it would be welcome and it can be included in a later build.

Please report any issues with the latest build in Linux or Mac OS X so that we can try to address them.
_________________
Graham
Back to top
View user's profile Send private message
jchiso



Joined: 18 Nov 2010
Posts: 34
Location: Columbus, OH

PostPosted: Tue Sep 08, 2015 3:52 pm    Post subject: Reply with quote

Thanks for this. I never could get RemoteMaster to run on my Ubuntu Precise notebook PC, though I could on others ...
Back to top
View user's profile Send private message
Jobius



Joined: 26 Dec 2004
Posts: 30

PostPosted: Fri Dec 25, 2015 4:30 pm    Post subject: Mac troubles with JP1.2/3 USB cable Reply with quote

I've got a JP1.2/3 cable that I got from Tommy Tyler some years ago. I used it successfully with IR.exe under Windows, but when my Windows machine died I switched to Mac, and haven't been able to get it to work with my Mac.

When I try a Raw download using RemoteMaster.v2.03build12, the lights on the cable blink, but I get the error message "Unable to read the signature of the remote. Download terminating. Make sure you have the latest driver installed for your interface cable.

In rmaster.err, I find this error:

Starting normal download
Interface Name = NULL
Port Name = NULL
Testing interface: JP1.X Serial
Port Name = /dev/cu.usbserial-A400fwZw
Opened on Port /dev/cu.usbserial-A400fwZw
Interface opened successfully
Base address = $600
Interface type = 5
Download error: null
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at javax.swing.SwingWorker.get(SwingWorker.java:582)
at com.hifiremote.jp1.RemoteMaster$DownloadTask.done(RemoteMaster.java:690)
at javax.swing.SwingWorker$5.run(SwingWorker.java:717)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:814)
at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:95)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:824)
at javax.swing.Timer.fireActionPerformed(Timer.java:291)
at javax.swing.Timer$DoPostEvent.run(Timer.java:221)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext

That's just an excerpt, but I thought it was relevant. I can post the whole file if that would help. The permissions on the device should allow me to read/write as a normal user (but I tried running with "sudo" and got the same results)

crw-rw-rw- 1 root wheel 17, 3 Dec 22 21:30 /dev/cu.usbserial-A400fwZw

I was worried that the cable had gotten fried, but I just tried it with another Windows machine, and it still works there.

Are there any other diagnostics I could post to help figure out the problem?
Back to top
View user's profile Send private message
mathdon
Expert


Joined: 22 Jul 2008
Posts: 2960
Location: Cambridge, UK

PostPosted: Fri Dec 25, 2015 6:26 pm    Post subject: Reply with quote

I suggest you do post the entire rmaster.err file in the Diagnostic Area of the website, with a link to it in a post in this thread. I am not a Mac user and so probably cannot help if it is a Mac-specific problem, but I will look at the file to see if I can spot anything. In any case, having the whole file should be of help to Mac experts who are more likely to be able to trace the cause.
_________________
Graham
Back to top
View user's profile Send private message
Jobius



Joined: 26 Dec 2004
Posts: 30

PostPosted: Fri Dec 25, 2015 9:09 pm    Post subject: rmaster.err from Mac attempting Raw download Reply with quote

Okay, I posted the complete rmaster.err file from the simplest case, attempting a Raw download from the RCA remote to my Mac. The Raw download fails with the "Unable to read the signature of the remote" error message.

The Raw download works correctly from a Windows machine using the same version of the software (RemoteMaster.v2.03build12).

Any clues? Should I post the rmaster.err from the Windows machine too?
Back to top
View user's profile Send private message
mathdon
Expert


Joined: 22 Jul 2008
Posts: 2960
Location: Cambridge, UK

PostPosted: Sat Dec 26, 2015 1:46 pm    Post subject: Reply with quote

The rmaster.err file you posted has no errors. Can you post one from a normal download rather than a raw download, one that includes the error shown in your previous post?

Have you actually done what your original error message said: make sure that you have the latest Mac drivers for your FTDI cable? The fact that an attempt at a raw download gave no errors of coding in RMIR, it simply failed to work, does suggest that it is a problem of a missing or incorrect driver. Since Mac and Windows drivers are different, that would explain why it works on the Windows machine but not the Mac.
_________________
Graham
Back to top
View user's profile Send private message
Jobius



Joined: 26 Dec 2004
Posts: 30

PostPosted: Sun Dec 27, 2015 2:01 am    Post subject: Reply with quote

Is there a Mac driver other than the libjp12serial.jnilib that's included with the RemoteMaster file?
Back to top
View user's profile Send private message
3FG
Expert


Joined: 19 May 2009
Posts: 3241

PostPosted: Sun Dec 27, 2015 3:49 am    Post subject: Reply with quote

libjp12serial.jnilib expects to talk to a serial port. With modern computers, we usually employ a pseudo serial port by using a USB to serial converter. So your JP1.2/1.3 interface cable uses a chip made by FTDI which itself needs a driver. mathdon suspects that the FTDI driver you're using may be obsolete for the OS version you're using.

http://www.ftdichip.com/Drivers/VCP.htm
Back to top
View user's profile Send private message
chuliu



Joined: 04 Dec 2010
Posts: 307
Location: Hong Kong

PostPosted: Sun Jan 03, 2016 9:39 am    Post subject: Reply with quote

I am here to say that I am able to write a shell script to call rmir or remote master from os x, even though it is not a shortcut of any kind.

I simply use any text editor and write "java -jar pathofremotemaster/remotemaster.jar -rm" without quotes for remotemaster, and "java -jar pathofremotemaster/remotemaster.jar" for rmir

and save it as rm.sh. Then I use terminal to chmod a+x rm.sh

Then I click on it, open with, other. Choose all applications, and select terminal.

I then am able to double click on rm.sh to launch remotemaster or rmir.


I tested with remote master 2.03 build 10 with nevo c2 and vizio v8.
RMIR says no remote found for either of the two.
I have the latest driver installed.
Back to top
View user's profile Send private message
Jackson



Joined: 03 Mar 2016
Posts: 1

PostPosted: Fri Mar 04, 2016 12:40 am    Post subject: Reply with quote

Version: RemoteMaster v2.03 build 14
Host: Mac OS X 10.11
Adapter: FTDI
Remote: INT-422-2

I'm in the same boat. I am able to launch RemoteMaster.jar and when I go to download from the remote, the lights on the remote blink. So I believe the cable is working.

However, Java throws an exception (same as reported by Jobius), and fails.

Quote:
Starting normal download
Interface Name = NULL
Port Name = NULL
Testing interface: JP1.X Serial
Port Name = /dev/cu.usbserial-FTB6SPL3
Opened on Port /dev/cu.usbserial-FTB6SPL3
Interface opened successfully
Base address = $0
Interface type = 0
Read first -1 bytes: 00 00 00 00 00 00 00 00 00 00
Searching for RDF
Final signature sought = null
Download error: null
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at javax.swing.SwingWorker.get(SwingWorker.java:602)
at com.hifiremote.jp1.RemoteMaster$DownloadTask.done(RemoteMaster.java:691)
at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NullPointerException
at com.hifiremote.jp1.RemoteMaster$DownloadTask.doInBackground(RemoteMaster.java:589)
at com.hifiremote.jp1.RemoteMaster$DownloadTask.doInBackground(RemoteMaster.java:1)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


A raw download gives the following error in rmmaster.err:

Quote:
Starting raw download
Interface Name = NULL
Port Name = NULL
Testing interface: JP1.X Serial
Port Name = /dev/cu.usbserial-FTB6SPL3
Opened on Port /dev/cu.usbserial-FTB6SPL3
Interface opened successfully
Base address = $0
Interface type = 0
Read first -1 bytes: 00 00 00 00 00 00 00 00 00 00


Would love to get this working on a Mac!
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 832

PostPosted: Sun Mar 06, 2016 3:23 am    Post subject: Reply with quote

There appears to be problems with El Capitan and serial ports, see https://github.com/arduino/Arduino/issues/3928 Don't know if that helps.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ikay



Joined: 24 Oct 2016
Posts: 1

PostPosted: Fri Oct 28, 2016 2:17 am    Post subject: Reply with quote

Jackson wrote:


Would love to get the Hydromax on https://www.secrecyfilm.com/hydromax-review-results this working on a Mac!


Same here Jackson, were you able to get it working on a Mac at all?


Last edited by Ikay on Thu Apr 13, 2017 4:59 am; edited 2 times in total
Back to top
View user's profile Send private message
chuliu



Joined: 04 Dec 2010
Posts: 307
Location: Hong Kong

PostPosted: Fri Oct 28, 2016 6:52 am    Post subject: Reply with quote

Ikay wrote:
Jackson wrote:


Would love to get this working on a Mac!


Same here Jackson, were you able to get it working on a Mac at all?


I am able to get it to work on a mac with my nevo c2.
A nevo c2 comes with a standard mini usb cable to connect to a pc/mac.
I don't know if it work with a 6 pin jp1 cable or not.
Back to top
View user's profile Send private message
Bim



Joined: 29 Oct 2016
Posts: 2

PostPosted: Sat Oct 29, 2016 9:08 am    Post subject: Reply with quote

I have a similar problem with the URC-7690 on Ubuntu and have not found a solution yet.
EDIT: I was being dumb and connected Pin 2 to RST, not RTS. I works now...
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
Page 1 of 1

 
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