Removed requirement to include HAP Protocol in Accessory Information Service
HAP Protocol does not appear to be needed anymore (as of iOS 15?)
This commit is contained in:
		
							parent
							
								
									17fa91da45
								
							
						
					
					
						commit
						92ece5413f
					
				|  | @ -1448,14 +1448,11 @@ SpanAccessory::SpanAccessory(uint32_t aid){ | ||||||
| void SpanAccessory::validate(){ | void SpanAccessory::validate(){ | ||||||
| 
 | 
 | ||||||
|   boolean foundInfo=false; |   boolean foundInfo=false; | ||||||
|   boolean foundProtocol=false; |  | ||||||
|    |    | ||||||
|   for(int i=0;i<Services.size();i++){ |   for(int i=0;i<Services.size();i++){ | ||||||
|     if(!strcmp(Services[i]->type,"3E")) |     if(!strcmp(Services[i]->type,"3E")) | ||||||
|       foundInfo=true; |       foundInfo=true; | ||||||
|     else if(!strcmp(Services[i]->type,"A2")) |     else if(aid==1)                             // this is an Accessory with aid=1, but it has more than just AccessoryInfo.  So...
 | ||||||
|       foundProtocol=true; |  | ||||||
|     else if(aid==1)                             // this is an Accessory with aid=1, but it has more than just AccessoryInfo and HAPProtocolInformation.  So...
 |  | ||||||
|       homeSpan.isBridge=false;                  // ...this is not a bridge device
 |       homeSpan.isBridge=false;                  // ...this is not a bridge device
 | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | @ -1465,11 +1462,6 @@ void SpanAccessory::validate(){ | ||||||
|     homeSpan.nFatalErrors++; |     homeSpan.nFatalErrors++; | ||||||
|   }     |   }     | ||||||
|     |     | ||||||
|   if(!foundProtocol && (aid==1 || !homeSpan.isBridge)){           // HAPProtocolInformation must always be present in Accessory if aid=1, and any other Accessory if the device is not a bridge)
 |  | ||||||
|     homeSpan.configLog+="   \u2718 Service HAPProtocolInformation"; |  | ||||||
|     homeSpan.configLog+=" *** ERROR!  Required Service for this Accessory not found. ***\n"; |  | ||||||
| //    homeSpan.nFatalErrors++;
 |  | ||||||
|   }     |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ///////////////////////////////
 | ///////////////////////////////
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Gregg
						Gregg