writeRemote returned -1

This is the JP1 beginners forum. There's no such thing as a stupid question in here, so post away, but this forum is just for JP1 users and people considering JP1, non-JP1 users please use the appropriate forum above!

Moderator: Moderators

Post Reply
gumbygo1
Posts: 14
Joined: Mon Nov 21, 2005 3:49 pm

writeRemote returned -1

Post by gumbygo1 »

I'm running RMIR/RemoteMaster 2.02 and trying to upload my setup into my RCA RCRP05BR remote using Tommy Tyler's JP1X flash interface.

It has worked successfully about 5-6 times, but then I started getting a message when I upload:

"writeRemote returned -1"

At first it was sporadic and I could just retry until it worked, but now it is doing it 100% of the time.

It appears to be a "message" not an "error", but it does not seem to transfer all the information to the remote. It seems to transfer the data on all the tabs except the Devices tab. In other words it transfers the General, Key Moves, and Macros information, but the device upgrades I made are not being transferred.

I'm running on Windows 7 x64.

Any ideas?
3FG
Expert
Posts: 3434
Joined: Mon May 18, 2009 11:48 pm

Post by 3FG »

Is it really writing to everything except the device upgrades? Can you download from the remote, change the contents of a macro in RMIR, upload to the remote (presumably writeRemote returns -1), and then a download shows that the macro has changed?

Writes are done in 128 bytes blocks, but the flash memory is just one contiguous area, so this would imply that the interface is working and that the RCRP05B is capable of accepting writes.

Probably the batteries are weak, and can't hold enough voltage throughout the writing process.
gumbygo1
Posts: 14
Joined: Mon Nov 21, 2005 3:49 pm

Post by gumbygo1 »

3FG,

I looked a little deeper. It appears to simply not write correctly. When I download the data I wrote, the macros are messed up (not all of them are there and the keystrokes are changed). Sometimes if I disconnect and reconnect the remote it starts working (maybe a bad connection?). Reading the remote always succeeds just fine.

The batteries came fresh out of the box, but they were bought a while ago, I'll try some newer ones. I've had some success read/writing the remote with no batteries installed. Do I actually need batteries in the remote when using the JP1X flash interface?
gumbygo1
Posts: 14
Joined: Mon Nov 21, 2005 3:49 pm

Post by gumbygo1 »

I got it working again. It seems to have something to do with the contents of the remote image itself.

If I download from the remote and then just immediately re-upload it works okay. If I try to upload the image I've built within RMIR (8 macros, 5 device upgrades, and a couple learned signals) then it throws the warning.

I'll guess I'll keep playing with it to see if I can narrow it down more.
gumbygo1
Posts: 14
Joined: Mon Nov 21, 2005 3:49 pm

Post by gumbygo1 »

Well, I've isolated it down to this:

I can get my RMIR file (w/ 5 macros) to upload to the remote successfully, but then I add one additional macro and upload again and it fails. Then I can delete the additional macro and it starts working again. I saved both RMIR files and I can repeat the results. The file with 5 macros always uploads okay, and the file with 6 macros always fails.

I don't know where to go from here, but at least I have some control over it.
3FG
Expert
Posts: 3434
Joined: Mon May 18, 2009 11:48 pm

Post by 3FG »

Post both RMIR files; others of us that have RCRP05B remotes can then see if it reproduces on our remotes or perhaps spot a problem in the RMIR files.
gumbygo1
Posts: 14
Joined: Mon Nov 21, 2005 3:49 pm

Post by gumbygo1 »

Okay here are links to both files:

The RMIR file that uploads okay:
http://www.hifi-remote.com/forums/dload ... e_id=11612

The RMIR file that uploads with the "writeRemote returns -1" message:
http://www.hifi-remote.com/forums/dload ... e_id=11613

The only difference (that I know of) is that the second file has one additional macro defined and bound to the "Macro2" key. I've gotten the "writeRemote returns -1" before without any macro bound to the Macro2 key, so I don't think that is specifically the issue, but maybe it just breaks when the raw data image has some particular characteristic.
3FG
Expert
Posts: 3434
Joined: Mon May 18, 2009 11:48 pm

Post by 3FG »

Both files load OK on my RCRP05B. Actually, these two remote images only differ in 1 byte, so I'm really having trouble seeing why one would load and the other doesn't


BTW, the second macro issues Up on the Cable device, but Up isn't assigned, so that step of the macro doesn't issue a signal,
gumbygo1
Posts: 14
Joined: Mon Nov 21, 2005 3:49 pm

Post by gumbygo1 »

At this point, I think I just have a flaky remote or interface. I tried a few more things. While the contents of the image seem to have some effect, I occasionally have an image fail to upload and then later succeed without changing the image. Disconnecting and reconnecting the remote sometimes helps (I think), but it could also be random. I was finally able to get my desired image onto the remote, so I'm okay for now.
spyfish007
Posts: 4
Joined: Thu Apr 14, 2011 11:10 pm

Post by spyfish007 »

I just encountered the same issue. I have an identical setup - same remote and the same adapter. I just did a factory reset (981) and now I can write to the remote. In addition some of my upgrades are having issues that cause the same thing to occur. Time to dig in an find the write upgrade files.
spyfish007
Posts: 4
Joined: Thu Apr 14, 2011 11:10 pm

Post by spyfish007 »

Can someone please review my files? If I add the TV discrete off code to my config then the file will not upload and I get the 'writeRemote returned -1' error. I have tried resetting the remote with 981. It also seems like I have to get out of RMIR and restart to clear the error. I tried IR and it did the same thing.

Here are the files 1) is working & 2) is not working.

http://www.hifi-remote.com/forums/dload ... e_id=11753

http://www.hifi-remote.com/forums/dload ... e_id=11754

Thanks for your help in advance
Post Reply