|
JP1 Remotes
|
View previous topic :: View next topic |
Author |
Message |
mathdon Expert
Joined: 22 Jul 2008 Posts: 4523 Location: Cambridge, UK |
Posted: Mon Jun 14, 2021 9:11 am Post subject: |
|
|
3FG wrote: | Graham,
I chose the order of the bytes in the fixed and variable data arbitrarily. For this TI2541/MAXQ executor, these byte orders are not important. However, perhaps a S3C80 executor would need a different order, which we can easily change now but once it has been published in the next release we should avoid further changes. |
If Rob, or perhaps you, wants to write an S3C80 executor, I can delay issuing the next RMIR release or omit your executor from that release and include it in the following one, depending on the timescale for the S3C80 executor to be ready. S3C80 architecture and its assembler are something that I have never got to grips with. Beloved of some, so I understand, but just plain weird to me, so I have to leave it to one of you two as I am not in a position to write one. _________________ Graham |
|
Back to top |
|
|
The Robman Site Owner
Joined: 01 Aug 2003 Posts: 21238 Location: Chicago, IL |
Posted: Mon Jun 14, 2021 11:05 am Post subject: |
|
|
I didn't realize FieldCopier was a protocols.ini function, so I was Googling it to try to understand what it was. I also didn't know that it only had the ability to add nibbles rather than bytes, so maybe it would be a good idea to add the ability to add bytes together?
I think my personal preference, in the absence of any other samples of this protocol would have been to treat the 3rd byte as another device code as the fact that it is the reverse of the 1st byte may be a coincidence, but as you say, at least that's in protocols.ini rather than the executor.
I agree with adding the fixed bytes outside of the executor if that saves executor space. (Just FYI, it takes 6 bytes of code to add the 2 variable bytes to the checksum, and it would only have taken 10 bytes of code to write a loop to add all 5 of the bytes). This is what that code would look like: Code: | 6C 05 loop: LD W6,#05
87 56 02 LD W5,#02h[W6]
04 C5 08 ADD R08,W5
6A F6 DJNZ W6,loop |
As for the allocation of bytes, thinking of this from an S3C8 executor point of view, I think my preference would be to make this a 6-2 format (ie, 6 fixed, 2 variable) where the bits in the protocol block define it as "all of the fixed bytes and 0 variable bytes). I would populate bytes 1, 3, 5 and 6 from protocols.ini, with bytes 2 and 4 being zero filled and byte 6 being the seeded value for the checksum (ie, the 3 fixed bytes and "4" being added together). Then in the executor, I'd move variable byte1 to data byte2, and variable byte2 to data byte4, then I'd ADD each of them to data byte 6.
Here's an un-tested S3C8 executor as described above:
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=26342 _________________ Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help! |
|
Back to top |
|
|
3FG Expert
Joined: 19 May 2009 Posts: 3367
|
Posted: Mon Jun 14, 2021 12:46 pm Post subject: |
|
|
I'll look at the S3C80 stuff tonight.
Regarding adding a translator to RMIR to sum over bytes is something I'd like to do, and it should be quite simple to do as a modification to the NibbleSumChk translator. I tried to do it yesterday, but I haven't been able to get an Eclipse project without lots of package errors. It is looking for packages that are something like main\com\ etcetera rather than com\etcetera. The Maven build itself works fine, but adding a new Java class is beyond my understanding of pom.xml. |
|
Back to top |
|
|
mathdon Expert
Joined: 22 Jul 2008 Posts: 4523 Location: Cambridge, UK |
Posted: Mon Jun 14, 2021 1:02 pm Post subject: |
|
|
Sorry, I don't understand. You do not need to modify pom.xml to add a new Java class. You just add a new class in Eclipse in exactly the same way as before the migration to Maven. You will need to check out RMIR afresh from the SVN, though, as the directory structure was changed in the migration. If you have done that and still can't get it to work, can you explain in a little more detail what is going wrong? _________________ Graham |
|
Back to top |
|
|
The Robman Site Owner
Joined: 01 Aug 2003 Posts: 21238 Location: Chicago, IL |
Posted: Mon Jun 14, 2021 1:45 pm Post subject: |
|
|
If you know what needs to be done Graham, would you be able to make a clone of the nibble sum process that sums up bytes? _________________ Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help! |
|
Back to top |
|
|
3FG Expert
Joined: 19 May 2009 Posts: 3367
|
Posted: Mon Jun 14, 2021 11:29 pm Post subject: |
|
|
Graham,
The problem is fixed. I used the instructions in https://scriptime.blogspot.com/2014/08/how-to-convert-maven-project-to-eclipse.html
The two non-obvious things to me was to run mvn eclipse:eclipse, and then to do File->Import->General->Existing Projects in Workspace. I had been trying to import a Maven project. I gather there is another way to do this directly from Eclipse using the Maven plug-in, but I didn't get it to work.
Rob,
I understand your S3C80 executor, and once I get a byte sum translator going I'll modify the TI/MAXQ executor to accept 6 fixed bytes (even though two are just space holders). |
|
Back to top |
|
|
The Robman Site Owner
Joined: 01 Aug 2003 Posts: 21238 Location: Chicago, IL |
Posted: Tue Jun 15, 2021 8:40 am Post subject: |
|
|
Sounds good, and yes, they are placeholders, but it's only wasting 2 bytes, whereas it would take more than 2 bytes of executor code to move all the data around if we didn't use them. _________________ Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help! |
|
Back to top |
|
|
3FG Expert
Joined: 19 May 2009 Posts: 3367
|
Posted: Wed Jun 16, 2021 12:35 am Post subject: |
|
|
Graham,
I zipped up a protocols.ini entry and the Java class ByteSumCheck. Also a skeleton RMDU file for the robot vacuum. Hopefully user loft will take that MDU file, assign the buttons and fill in a good description before uploading as an upgrade.
I checked these with URC7980, Inteset INT-422-3, and a 1067BC4.
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=26343 |
|
Back to top |
|
|
mathdon Expert
Joined: 22 Jul 2008 Posts: 4523 Location: Cambridge, UK |
Posted: Sat Jul 17, 2021 10:04 am Post subject: |
|
|
3FG wrote: | I zipped up a protocols.ini entry and the Java class ByteSumCheck. |
I have included these in RMIR v2.13.0 which I have just released. It also includes the entries needed for RMIR to identify learned signals as Eufy 11s protocol. _________________ Graham |
|
Back to top |
|
|
|
|
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
|