Go Down

Topic: Pay for coding - Serial HEX reader with checksum calculator function (Read 898 times) previous topic - next topic

iasonas7

Hi Folks,
Hopefully this is the right location for this request (previous Google from 2016 suggests its okay?..).

I have come to a stage where I am prepared to pay for some coding support as I haven't been able to make enough significant progress on the functionality I am trying to obtain. I have seen others pay contributors via PayPal so I'll offer AUD$100 for someone to come up with the required code for this project.

Requirements are as follows:

- Board in use is an Mega 2560, however I will end up moving to an Atmel ARM based SAM3X8E (Arduino Due) at a later date, as I need the large amount of memory for another bit of code.
- There is a home automation network connected to Serial1 via a bridge. The protocol is well documented (attached). Pages of most interest would be 7 (checksum) and 11 (data construct)
- Serial1 will need to receive data in Hexadecimal format and parse the data
- Each HEX pair will ideally be stored in an array so I can query the data.
- The end of each data transmission is marked with a carriage return (/n)
- Typical data as received over the interface can be seen below:

D638B0000000000000000000000000000000000000000042
0529E4000E010426FF58243A
D838002AAAAAAAAA9AAAAA2AAA0280000000000A0080822A02A2
D8385802800AA8AA0A00000000000000000000000000000000B0
D638B0000000000000000000000000000000000000000042
056A38007909D7
056A380001094F
D838002AAAAAAAAA9AAAAA2AAA0280000000000A0080822A02A2
D8385802800AA8AA0A00000000000000000000000000000000B0
D638B0000000000000000000000000000000000000000042

- I will then need to be able to check the HEX string for the existence of particular bits of data.
In the example above, "056A380001094F" contains the following commands:
 - 05 = This is a lighting message
 - 6A = The unit address on the network which the command was sent from
 - 38 = Lighting application address (always 38 for lighting)
 - 00 = Always 00, if 01 discard message
 - 01 = Turn light off. 79 means turn light on.
 - 09 = The light group address which is being turned on/off
 - 4F = The checksum of the preceding bytes.

So, for example, I'd like to be able to say if (LightingAddress = 09 & LightingLevel = 79) {do something}

- The code should calculate the checksum for the received data and compare it against the received checksum. If it's invalid, discard.
- The code should also allow me to send commands to the network and use the same function (ideally?) to calculate the required checksum, so I can append it to my sending data.

I had a good crack at it using code from this forum https://forum.arduino.cc/index.php?topic=288234.0 but ultimately had problems with the leading zero of the hex being dropped, or perhaps rather my interpretation of the data...

Nonetheless time is money and I'd be happier handing this over to someone with much more experience & knowledge in this than me!
Good hunting & thank you.

sterretje

If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

DKWatson

Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi

sterretje

@iasonas7 did not come back to me. Maybe he/she did not like the offer.

I basically told @iasonas7 that "I was interested and could write demo code for that price and that integration would cost extra".

The latter was mostly because current code is not available.

Feel free to contact @iasonas7. You might be able to better the offer ;)
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

DKWatson

I'll defer to you unless he contacts me directly. I'll let you know. There should be cooperation here.
Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi

Go Up