@@ -276,6 +276,7 @@ def validate_args(args):
276
276
check_int_range (args .product_id , 0x0000 , 0xFFFF , 'Product id' )
277
277
check_int_range (args .vendor_id , 0x0000 , 0xFFFF , 'Vendor id' )
278
278
check_int_range (args .hw_ver , 0x0000 , 0xFFFF , 'Hardware version' )
279
+ check_int_range (args .discovery_mode , 0b000 , 0b111 , 'Discovery-Mode' )
279
280
280
281
check_str_range (args .serial_num , 1 , 32 , 'Serial number' )
281
282
check_str_range (args .vendor_name , 1 , 32 , 'Vendor name' )
@@ -566,9 +567,10 @@ def any_base_int(s): return int(s, 0)
566
567
parser .add_argument ('-cf' , '--commissioning-flow' , type = any_base_int , default = 0 ,
567
568
help = 'Device commissioning flow, 0:Standard, 1:User-Intent, 2:Custom. \
568
569
Default is 0.' , choices = [0 , 1 , 2 ])
569
- parser .add_argument ('-dm' , '--discovery-mode' , type = any_base_int , default = 1 ,
570
- help = 'Commissionable device discovery networking technology. \
571
- 0:WiFi-SoftAP, 1:BLE, 2:On-network. Default is BLE.' , choices = [0 , 1 , 2 ])
570
+ parser .add_argument ('-dm' , '--discovery-mode' , type = any_base_int , default = 2 ,
571
+ help = '3-bit bitmap representing discovery modes for commissionable device discovery \
572
+ Bit 0:WiFi-SoftAP, Bit 1:BLE, Bit 2:On-network. Default is BLE. Specify values between 0-7' )
573
+
572
574
parser .set_defaults (generate_bin = True )
573
575
574
576
return parser .parse_args ()
0 commit comments