Hi.
To sent an api frame, I use the following code:
byte[] bytesToSend5 = new byte[] { 0x7E, 0x00, 0x10, 0x17, 0x01, 0x00, 0x13, 0xA2, 0x00, 0x40, 0xA6, 0x5E, 0x23, 0xFF, 0xFE, 0x02, 0x44, 0x34, 0x05, 0x4F };
serialPort1.Write(bytesToSend5, 0, bytesToSend5.Length);
But I want to be able to change the xbee on the receiving XBee. To do this, I’m thinking it’s possible to type in the new mac address into my program, and save that info in a string, translate the string into a byte array, and implement that into the middle of the existing byte array. In theory, it would look something like this:
string Xbee_macaddress = address typed by user
xbee_macaddress = string converted to bytearray
byte[] bytesToSend5 = new byte[] { 0x7E, 0x00, 0x10, 0x17, 0x01, xbee_macaddress, 0xFF, 0xFE, 0x02, 0x44, 0x34, 0x04, 0x50 };
serialPort1.Write(bytesToSend5, 0, bytesToSend5.Length);
Anyone know if this is possible, if I should take another approach or otherwise have any suggestions/advice?