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

writeRemote returned -1

 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - General Forum
View previous topic :: View next topic  
Author Message
spyfish007



Joined: 15 Apr 2011
Posts: 4

                    
PostPosted: Sun Mar 03, 2013 11:48 pm    Post subject: writeRemote returned -1 Reply with quote

I am using RMIR v2.02a with Tommy's JP1.X interface on a RCA RCRP05B remote. I can do lots of programming (learning, key moves, macros) with the RMIR however I continually run into "writeRemote returned -1" and I don't know what this means. I can only assume the upload did not happen properly. I have tkdiff'd the source file being uploaded against the downloaded copy and the maps are not the same. In a simple case, I have an upgrade file for SAT that works fine by itself. I have an upgrade file for DVD that works fine by itself. When I place both upgrades in the same upload, then I get the error.

I also tried to upload the extender with only setup codes and I got the error above.

Can someone please point me in the correct direction? I am really starting to wonder if I have a defective remote.
Back to top
View user's profile Send private message
3FG
Expert


Joined: 19 May 2009
Posts: 3365

                    
PostPosted: Mon Mar 04, 2013 1:05 am    Post subject: Reply with quote

Sorry that I missed your earlier post. I did try the working and non-working files in that post and both upload to my RCRP05B without difficulty.

Before doing anything else, please be quite sure that your batteries are fresh. Writing to the remote requires much more power from the batteries than normal operation.

WriteRemote is a routine in JP12Serial.dll. Unfortunately it will return -1 on any sort of write error. If you're using a Windows computer (but not Win7 or 8), you can download PortMon, which will allow us to see exactly the point where the trouble occurs.
Download Portmon http://technet.microsoft.com/en-us/sysinternals/bb896644 and try a Raw Download. (Some people find that Portmon 3.03 won't work well on their computers, and have better luck with Portmon 3.02) Start RMIR, start PortMon, make sure that Options/ShowHex is set, use Capture/Ports /COMx to select your port, and initiate a Raw Download. Use Edit Copy to get the resulting data into a file and post it here in the Diagnostics Section. It will help if in RMIR Remote\Interface\SerialJP1.x is selected rather than Auto-detect.

If Portmon doesn't show any COM ports, close all windows, open a command prompt and run Portmon from there. Then you can start up RMIR.
Back to top
View user's profile Send private message
spyfish007



Joined: 15 Apr 2011
Posts: 4

                    
PostPosted: Mon Mar 04, 2013 9:29 am    Post subject: Reply with quote

@3FG, thanks for the response. I definitely have fresh batteries in the remote as I read about that elsewhere. I also did the 981 reset a couple of times. All of my computers are Win7 now. I might have to find a WinXP machine and try that out. I have this feeling that I have some stuck bits in my EEPROM. I've encountered this sort of thing with other systems and this is reminds me of those systems. Got any other suggestions, or should I just go pickup another remote?
Back to top
View user's profile Send private message
3FG
Expert


Joined: 19 May 2009
Posts: 3365

                    
PostPosted: Mon Mar 04, 2013 11:27 am    Post subject: Reply with quote

When RMIR or IR writes to a remote, it does so in small blocks of erasure followed by writes. However, it doesn't immediately check to see if the memory has been altered. That is done in a verify step (if that option is selected in RMIR/IR). More likely the error you're seeing is occurring because the remote doesn't acknowledge a block erasure or write operation or perhaps in the interaction between computer and the JP1 cable.

So a new remote may fix the problem. There is some possibility the problem is in the JP1 interface hardware, or in the dll.
Back to top
View user's profile Send private message
gentzel



Joined: 22 Sep 2003
Posts: 40

                    
PostPosted: Wed Aug 13, 2014 11:19 pm    Post subject: Reply with quote

I'm also seeing this error, though with a twist.

I have an RCA RCRP05B that I purchased several years ago, shortly after it was released. Call this remote1.

I also have an RCA RCRP05BR (which I realize is supposed to only reflect a change in packaging, but I'm mentioning it for completeness) which was purchased a few weeks ago as a refurb from an Amazon seller. Call this remote2.

Remote1 has given me no problems. I've uploaded to it many times, added new protocols, devices, macros, DSMs, etc.

Remote2 was fine for a few uploads, but when I add "enough" (which is difficult to quantify) items to it, I get the aforementioned writeRemote error. The exact same image uploads fine to remote1.

So I assumed remote2 was defective. I searched local WalMarts online and was fortunate enough to find one that was clearancing them for $1! So I purchased 6 of them (it's a disease). These are also RCRP05BRs. I've opened one of them. Call it remote3.

And remote3 exhibits the exact same behavior as remote2.

It seems a longshot that remote2 & remote3 would both be defective, coming from completely different vendors. So something appears to have changed with this remote in the intervening years.

Any suggestions of what I could do to diagnose this? I'm a professional programmer of more than 30 years, and started my academic life as an EE, so I'm pretty competent at this stuff.

I'm running RM IR 2.02a with the final version of Tommy's JP1 flash interface before his departure.
Back to top
View user's profile Send private message
gentzel



Joined: 22 Sep 2003
Posts: 40

                    
PostPosted: Thu Aug 14, 2014 12:25 am    Post subject: Reply with quote

Popped them open. Looks like they made pretty significant changes.

remote1 PCB:
AAC-RCA CABLE 5 DEVICE
REMOTE 2009 REV:01 Mar.6.09
DATE:2009/03/30
MODEL:AUD201
P/N:200-03920000-000-9 V2

remote3 PCB:
AAC-RCA CABLE 5 DEVICE
REMOTE 2009 REV:01 MAR.6.09
DATE:2010/05/07
MODEL:AUD201
P/N:300-03920000-003-9 V0

Back to top
View user's profile Send private message
3FG
Expert


Joined: 19 May 2009
Posts: 3365

                    
PostPosted: Thu Aug 14, 2014 8:52 am    Post subject: Reply with quote

Let's find out if the processor type was changed. Use Tommy's instructions to try to read back a processor identifier from both remotes. Perhaps the amount of available flash has changed.

I would also do a Raw Download from both remotes after performing a 981 reset. Use a file comparison utility to see the differences between the two IR files.
Back to top
View user's profile Send private message
gentzel



Joined: 22 Sep 2003
Posts: 40

                    
PostPosted: Thu Aug 14, 2014 1:02 pm    Post subject: Reply with quote

Thanks 3FG. I'll run through the process tonight.

Is there any documentation for the serial protocol used by JP1.3 remotes? I don't see anything in the file section (but could easily have missed it). And is there a published mapping of the values returned by the "I" command to their processor type?
Back to top
View user's profile Send private message
gentzel



Joined: 22 Sep 2003
Posts: 40

                    
PostPosted: Thu Aug 14, 2014 9:55 pm    Post subject: Reply with quote

Output from both remotes was identical (non-printable characters in bold):

IS<K$V(^F^@31793179.

981 reset both remotes, downloaded in RM IR. Images were identical.
Back to top
View user's profile Send private message
3FG
Expert


Joined: 19 May 2009
Posts: 3365

                    
PostPosted: Thu Aug 14, 2014 10:43 pm    Post subject: Reply with quote

The implication of the "K" is is that these remotes have the same processor, even if the package is different. Also, UEI typically changes the signature if the firmware has been altered. So let's make sure that they behave differently, starting from the 981 reset. Even if the upload fails, please do another Raw Download to see if that is different.
Back to top
View user's profile Send private message
gentzel



Joined: 22 Sep 2003
Posts: 40

                    
PostPosted: Fri Aug 15, 2014 12:17 am    Post subject: Reply with quote

The image is indeed changed from the pristine 981 image after the failed upload. Looking in RM IR, the only visible difference is that the single DSM defined in the upgrade is present, but not the devices or protocol.

http://www.hifi-remote.com/forums/dload.php?action=file&file_id=12683
Back to top
View user's profile Send private message
gentzel



Joined: 22 Sep 2003
Posts: 40

                    
PostPosted: Wed Aug 20, 2014 2:29 pm    Post subject: Reply with quote

Posting a followup for anyone who sees this problem in the future.

First, thanks to 3FG for his very insightful help.

I ultimately got the uploads to work, and the resolution is surprising and confusing.

As I mentioned, I was using the final version of Tommy's JP1X Flash Interface that he was selling at the time of his exit; the small rectangular one (seen in the first picture here: http://www.hifi-remote.com/forums/viewtopic.php?t=9405). With this interface, remote1 worked consistently, both with and without batteries. Remote3 rarely if ever worked (though fresh batteries seemed to increase the odds).

In the course of working through variables with 3FG, I pulled out one of my homemade cables built using an eBay FTDI serial cable (as seen here: http://www.hifi-remote.com/forums/viewtopic.php?t=13928). And that worked reliably with both remotes. With or without batteries.

Obviously there were hardware changes between the two remotes, but what exact change causes the newer ones to be less reliable with some JP1.x interfaces is a mystery at this point. One possibility, especially given the change in behavior with stonger batteries, is that the interfaces put out different voltage levels, and that the newer models need a higher driver voltage.

I'll try to find time to measure the output of the two interfaces to see if I can see a difference.

I will note that the serial FTDI cable I used was bought from an eBay auction claiming to be 3.3V TTL. But 5V TTL cables are also common and impossible to differentiate visually, and overseas eBay sellers are notoriously inexact when it comes to such details. So I really have no idea whether the working cable is rated 3.3V or 5V.
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 - General Forum 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
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control