   if(!OTV0P2BASE::getPrimaryBuilding16ByteSecretKey(key))
     { OTV0P2BASE::serialPrintlnAndFlush(F("!TX key")); return(false); } // FAIL
   const OTRadioLink::SimpleSecureFrame32or0BodyTXBase::fixed32BTextSize12BNonce16BTagSimpleEnc_ptr_t e = OTAESGCM::fixed32BTextSize12BNonce16BTagSimpleEnc_DEFAULT_STATELESS;
-  uint8_t buf[OTRadioLink::SimpleSecureFrame32or0BodyTXBase::generateSecureBeaconMaxBufSize];
-  const uint8_t bodylen = secureTXState.generateSecureBeaconRawForTX(buf, sizeof(buf), lenTXID, e, NULL, key); // 2 byte ID.
+  uint8_t sbuf[OTRadioLink::SimpleSecureFrame32or0BodyTXBase::generateSecureBeaconMaxBufSize];
+  const uint8_t sbodylen = secureTXState.generateSecureBeaconRawForTX(sbuf, sizeof(sbuf), lenTXID, e, NULL, key); // 2 byte ID.
   // ASSUME FRAMED CHANNEL 0 (but could check with config isUnframed flag).
   // When sending on a channel with framing, do not explicitly send the frame length byte.
   // DO NOT attempt to send if construction of the secure frame failed;
   // doing so may reuse IVs and destroy the cipher security.
-  const bool success = (0 != bodylen) && PrimaryRadio.sendRaw(buf+1, bodylen-1);
+  const bool success = (0 != sbodylen) && PrimaryRadio.sendRaw(sbuf+1, sbodylen-1);
 #if 1 && defined(DEBUG)
   if(!success) { OTV0P2BASE::serialPrintlnAndFlush(F("!TX")); }
   else { OTV0P2BASE::serialPrintlnAndFlush(F("TX alert")); }

          if(!OTV0P2BASE::getPrimaryBuilding16ByteSecretKey(key))
            { OTV0P2BASE::serialPrintlnAndFlush(F("!TX key")); return(false); } // FAIL
          const OTRadioLink::SimpleSecureFrame32or0BodyTXBase::fixed32BTextSize12BNonce16BTagSimpleEnc_ptr_t e = OTAESGCM::fixed32BTextSize12BNonce16BTagSimpleEnc_DEFAULT_STATELESS;
          uint8_t buf[OTRadioLink::SecurableFrameHeader::maxSmallFrameSize];
          const uint8_t sbodylen = secureTXState.generateSecureOStyleFrameForTX(buf, sizeof(buf), OTRadioLink::FTS_RESERVED_Q, lenTXID, txbuf, bodylen, e, NULL, key);
          const bool success = (0 != sbodylen) && PrimaryRadio.sendRaw(buf+1, bodylen-1);
#if 1 && defined(DEBUG)
          if(!success) { OTV0P2BASE::serialPrintlnAndFlush(F("!TX Q")); }
          else { OTV0P2BASE::serialPrintlnAndFlush(F("TX Q")); }

// Support for secure TX side using FHT8V ID plus 0x80 padding from REV2 hub.
// (High bits of trailing bytes should be low for traffic TO node whose ID is in header.)
OTRadioLink::SimpleSecureFrame32or0BodyTXV0p2SuppliedID secureTXState(NULL);
// Set TX ID for target; two bytes of housecode padded with zeros (for reverse traffic).
static void setTXID(const uint8_t hc1, const uint8_t hc2)
  {
  uint8_t id[OTV0P2BASE::OpenTRV_Node_ID_Bytes];
  id[0] = hc1;
  id[1] = hc2;
  memset(id + 2, 0, OTV0P2BASE::OpenTRV_Node_ID_Bytes - 2);
  secureTXState.setTXID(id);
  }
#endif // defined(ALLOW_CC1_SUPPORT_RELAY)
#endif // defined(ENABLE_OTSECUREFRAME_ENCODING_SUPPORT)

