mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Include MAC address in noise hello (#8551)
This commit is contained in:
		
				
					committed by
					
						 Jesse Hills
						Jesse Hills
					
				
			
			
				
	
			
			
			
						parent
						
							7c4ab7abfe
						
					
				
				
					commit
					2c499b326a
				
			| @@ -311,6 +311,10 @@ APIError APINoiseFrameHelper::state_action_() { | ||||
|     const std::string &name = App.get_name(); | ||||
|     const uint8_t *name_ptr = reinterpret_cast<const uint8_t *>(name.c_str()); | ||||
|     msg.insert(msg.end(), name_ptr, name_ptr + name.size() + 1); | ||||
|     // node mac, terminated by null byte | ||||
|     const std::string &mac = get_mac_address(); | ||||
|     const uint8_t *mac_ptr = reinterpret_cast<const uint8_t *>(mac.c_str()); | ||||
|     msg.insert(msg.end(), mac_ptr, mac_ptr + mac.size() + 1); | ||||
|  | ||||
|     aerr = write_frame_(msg.data(), msg.size()); | ||||
|     if (aerr != APIError::OK) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user