[Bacsharp-developers] MAC-Address fix for 'SendPropertyWrite()' ?
Brought to you by:
anders-agren,
skarg
From: Dennis V M. <d.m...@d2...> - 2018-10-24 14:09:21
|
Relating to the (/my) previous MAC address (suggested) fix for 'SendReadProperty()' - possible fix (??) for the same issue in 'SendWriteProperty()' (- not tested as yet but looks like the same fix might be required, original code commented-out): var macAddrBytes = BitConverter.GetBytes(device.MacAddress); // DVM: // sendBytes[len++] = 0x01; // MAC address length - adjust for other lengths ... sendBytes[len++] = device.SourceLength; // sendBytes[len++] = macAddrBytes[0]; for (var idx = 0; idx < (device.SourceLength - macAddrBytes.Length); idx++) { sendBytes[len++] = 0x00; } for (var idx = 0; idx < macAddrBytes.Length; idx++) { sendBytes[len++] = macAddrBytes[(macAddrBytes.Length - 1) - idx]; } [cid:image015.png@01D46BA8.967AB950] [http://dev.d2i.co/d2i-email-signature/wlogo.png] Dennis McEnaney Technical Lead DDI 020 3102 4100<tel:02031024100> [http://dev.d2i.co/d2i-email-signature/wdot.png] TEL 020 3817 7839<tel:02038177839> [http://dev.d2i.co/d2i-email-signature/wdot.png] WEB d2i.co<http://d2i.co/> Portsoken House, 155-157 Minories, London, EC3N 1LJ [http://dev.d2i.co/d2i-email-signature/wico-linkedin.png]<https://www.linkedin.com/company/d2-interactive-uk>[http://dev.d2i.co/d2i-email-signature/wico-facebook.png]<https://www.facebook.com/d2iglobal>[http://dev.d2i.co/d2i-email-signature/wico-twitter.png]<https://twitter.com/d2interactive>[http://dev.d2i.co/d2i-email-signature/wico-instagram.png]<https://www.instagram.com/d2interactive/>[http://dev.d2i.co/d2i-email-signature/wico-google.png]<https://plus.google.com/116460778442548453069/posts> D2 Interactive Limited, Company Reg No. 7116878, VAT No. 984-4271-88, Registered Office: Portsoken House, 155-157 Minories, London, EC3N 1LJ. This email may be private and confidential, and contain legally privileged information. If you are not the addressee you should not disclose, copy, circulate or in any other way use the information contained in this transmission. Such unauthorised use is prohibited and may be unlawful. If you are not the intended recipient, please contact us immediately. P Save a tree - we only print the emails we really need. |