@@ -78,7 +78,7 @@ def check_required_files(cert_dir):
7878 print (f"Error: Missing required certificate files: { missing_files } " )
7979 return False
8080
81- print (f"✅ All required certificate files found in { cert_dir } " )
81+ print (f"[OK] All required certificate files found in { cert_dir } " )
8282 return True
8383
8484def generate_wifi_config (ssid , bssid , channel = 6 , band = 1 , auth_mode = 5 ,
@@ -142,6 +142,7 @@ def generate_wifi_config(ssid, bssid, channel=6, band=1, auth_mode=5,
142142
143143 # Handle EAP-TLS mode
144144 if cert_dir is not None :
145+ # Check if all required files exist
145146 if not check_required_files (cert_dir ):
146147 return None
147148
@@ -155,10 +156,10 @@ def generate_wifi_config(ssid, bssid, channel=6, band=1, auth_mode=5,
155156 client_cert2_data = read_cert_file (os .path .join (cert_dir , 'client2.pem' ))
156157 private_key2_data = read_cert_file (os .path .join (cert_dir , 'client-key2.pem' ))
157158
158- print ("✅ Successfully read all certificate files" )
159+ print ("[OK] Successfully read all certificate files" )
159160
160161 # Create EnterpriseCertConfig
161- # MbedTLS uses null-terminator to distinguis b/w PEM and DER formats
162+ # MbedTLS uses null-terminator to distinguish b/w PEM and DER formats
162163 def add_null_terminator (data ):
163164 if data and not data .endswith (b'\0 ' ):
164165 return data + b'\0 '
@@ -177,30 +178,30 @@ def add_null_terminator(data):
177178 cert_config .password = password
178179
179180 wifi_config .certs .CopyFrom (cert_config )
180- print ("✅ EAP-TLS mode configured" )
181+ print ("[OK] EAP-TLS mode configured" )
181182
182183 # Handle Personal mode
183184 elif passphrase is not None :
184185 wifi_config .passphrase = passphrase .encode ('utf-8' )
185- print ("✅ Personal mode configured" )
186+ print ("[OK] Personal mode configured" )
186187
187188 else :
188- print ("❌ Error: Must specify either --cert-dir (EAP-TLS) or --passphrase (Personal)" )
189+ print ("[ERROR] Error: Must specify either --cert-dir (EAP-TLS) or --passphrase (Personal)" )
189190 return None
190191
191192 # Create Request
192193 request = Request ()
193194 request .op_code = OpCode .SET_CONFIG
194195 request .config .CopyFrom (wifi_config )
195196
196- print ("✅ Successfully created protobuf message" )
197+ print ("[OK] Successfully created protobuf message" )
197198 return request
198199
199200 except ValueError as e :
200- print (f"❌ Error creating configuration: { e } " )
201+ print (f"[ERROR] Error creating configuration: { e } " )
201202 raise # Re-raise ValueError to be caught by caller
202203 except Exception as e :
203- print (f"❌ Error creating configuration: { e } " )
204+ print (f"[ERROR] Error creating configuration: { e } " )
204205 return None
205206
206207def main ():
@@ -291,12 +292,12 @@ def main():
291292 from google .protobuf .json_format import MessageToDict
292293
293294 json_data = MessageToDict (request , preserving_proto_field_name = True )
294- print ("📄 JSON Configuration:" )
295+ print ("[JSON] JSON Configuration:" )
295296 print (json .dumps (json_data , indent = 2 ))
296297 print ()
297298
298299 # Always show encoded protobuf string
299- print ("🔧 Encoded Protobuf (Base64):" )
300+ print ("[PROTO] Encoded Protobuf (Base64):" )
300301 print (base64 .b64encode (serialized ).decode ('utf-8' ))
301302 print ()
302303
@@ -309,14 +310,14 @@ def main():
309310 json_data = MessageToDict (request , preserving_proto_field_name = True )
310311 with open (args .output , 'w' ) as f :
311312 json .dump (json_data , f , indent = 2 )
312- print (f"✅ JSON configuration written to: { args .output } " )
313+ print (f"[OK] JSON configuration written to: { args .output } " )
313314 else :
314315 # Save as binary protobuf
315316 with open (args .output , 'wb' ) as f :
316317 f .write (serialized )
317- print (f"✅ Binary protobuf written to: { args .output } " )
318+ print (f"[OK] Binary protobuf written to: { args .output } " )
318319
319- print (f"📊 Protobuf size: { len (serialized )} bytes" )
320+ print (f"[INFO] Protobuf size: { len (serialized )} bytes" )
320321
321322 # Get auth mode name based on proto AuthMode enum (backward compatible)
322323 auth_names = {
0 commit comments