1. Home
  2. Docs
  3. J10 Document
  4. BLE protocol and client c...
  5. another python example ,in English

another python example ,in English

the python code is : https://www.jhearing.com/web2/docs/j10_cmd_v2.py

below is sample output

C:\work2024>python j10_cmd_v2.py --name "J10 2024"
2024-08-12 08:31:47,096 main INFO: starting scan…
2024-08-12 08:31:47,503 main INFO: connecting to device…
2024-08-12 08:31:49,971 main INFO: Connected
2024-08-12 08:31:49,971 main INFO: Change Memory A:
2024-08-12 08:32:10,187 main INFO: Write Memory A:bytearray(b'\xaa\x01\x01\x03')
2024-08-12 08:32:20,283 main INFO: Read Memory A:: bytearray(b"\x00\x03\x00\x1c\xc1\n\x002\x00\x03J10 2024\x00\x00(2222222(2222222\x14\x19\x19\x1e\x1e\x19\x19\x14________\n\n\n\n\n\n\n\nnnnnnnnn\x00\x00\x00\x00\'D\x00\x00\x00\x00\x00\x00\r\x05\x05\x01\x01\x02\x05\x08\x00\x00?\xff\x00\x00\x00\x00\x00\x00\x00\x00")
2024-08-12 08:32:30,285 main INFO: Current Memory;0
2024-08-12 08:32:30,285 main INFO: Volume;-3 dB
2024-08-12 08:32:30,288 main INFO: EQ: -13 dB, -5 dB, -5 dB, -1 dB,-1 dB, -2 dB, -5 dB ,-8 dB
2024-08-12 08:32:30,290 main INFO: WDRC expansion rate:0.1* 40 0.1* 50 0.150 0.150 0.150 0.150 0.150 0.150
2024-08-12 08:32:30,291 main INFO: WDRC expansion knee: 40 50 50 50 50 50 50 50
2024-08-12 08:32:30,292 main INFO: WDRC lineargain: 20 25 25 30 30 25 25 20
2024-08-12 08:32:30,293 main INFO: WDRC Compression Knee: 95 95 95 95 95 95 95 95
2024-08-12 08:32:30,294 main INFO: WDRC CR: 0.110 0.110 0.110 0.110 0.110 0.110 0.110 0.110
2024-08-12 08:32:30,295 main INFO: WDRC Limiter: 110 110 110 110 110 110 110 110
2024-08-12 08:32:30,296 main INFO: Write Memory A:bytearray(b'\xaa$\x08\x14\x19\x19\x1e\x1e\x19\x19\x14')
2024-08-12 08:32:40,302 main INFO: Write Memory A:bytearray(b'\xaa\x1c\x08(2222222')
2024-08-12 08:32:50,463 main INFO: Read Memory A:: bytearray(b"\x00\x03\x00\x1c\xc1\n\x002\x00\x03J10 2024\x00\x00(2222222(2222222\x14\x19\x19\x1e\x1e\x19\x19\x14________\n\n\n\n\n\n\n\nnnnnnnnn\x00\x00\x00\x00\'D\x00\x00\x00\x00\x00\x00\r\x05\x05\x01\x01\x02\x05\x08\x00\x00?\xff\x00\x00\x00\x00\x00\x00\x00\x00")
2024-08-12 08:33:00,473 main INFO: Current Memory;0
2024-08-12 08:33:00,473 main INFO: Volume;-3 dB
2024-08-12 08:33:00,476 main INFO: EQ: -13 dB, -5 dB, -5 dB, -1 dB,-1 dB, -2 dB, -5 dB ,-8 dB
2024-08-12 08:33:00,479 main INFO: WDRC expansion rate:0.1* 40 0.1* 50 0.150 0.150 0.150 0.150 0.150 0.150
2024-08-12 08:33:00,480 main INFO: WDRC expansion knee: 40 50 50 50 50 50 50 50
2024-08-12 08:33:00,481 main INFO: WDRC lineargain: 20 25 25 30 30 25 25 20
2024-08-12 08:33:00,482 main INFO: WDRC Compression Knee: 95 95 95 95 95 95 95 95
2024-08-12 08:33:00,485 main INFO: WDRC CR: 0.110 0.110 0.110 0.110 0.110 0.110 0.110 0.110
2024-08-12 08:33:00,485 main INFO: WDRC Limiter: 110 110 110 110 110 110 110 110
2024-08-12 08:33:00,487 main INFO: Change Memory B:
2024-08-12 08:33:10,685 main INFO: Read Memory B:: bytearray(b"\x01\x03\x00\x1c\xc1\n\x002\x00\x03J10 2024\x00\x00\x03\x03\x03\x03\x03\x03\x03\x0372222222&&$$$$$$________\n\n\n\n\n\n\n\nnnnnnnnn\x00\x00\x00\x00\'I\x00\x00\x00\x00\x00\x00\x10\x05\x05\x02\x02\x04\r\r\x00\x00?\xff\x00\x00\x00\x00\x00\x00\x00\x00")
2024-08-12 08:33:20,690 main INFO: Current Memory;1
2024-08-12 08:33:20,691 main INFO: Volume;-3 dB
2024-08-12 08:33:20,693 main INFO: EQ: -16 dB, -5 dB, -5 dB, -2 dB,-2 dB, -4 dB, -13 dB ,-13 dB
2024-08-12 08:33:20,696 main INFO: WDRC expansion rate:0.1* 3 0.1* 3 0.13 0.13 0.13 0.13 0.13 0.13
2024-08-12 08:33:20,697 main INFO: WDRC expansion knee: 55 50 50 50 50 50 50 50
2024-08-12 08:33:20,698 main INFO: WDRC lineargain: 38 38 36 36 36 36 36 36
2024-08-12 08:33:20,699 main INFO: WDRC Compression Knee: 95 95 95 95 95 95 95 95
2024-08-12 08:33:20,699 main INFO: WDRC CR: 0.110 0.110 0.110 0.110 0.110 0.110 0.110 0.110
2024-08-12 08:33:20,701 main INFO: WDRC Limiter: 110 110 110 110 110 110 110 110
2024-08-12 08:33:20,701 main INFO: Write Mode B:
2024-08-12 08:33:20,702 main INFO: Write Memory B:bytearray(b"\x01\x06\x00\x1c\xc1\n\x002\x00\x03J10 2024\x00\x00\x03\x03\x03\x03\x03\x03\x03\x0372222222(($$$$$$________\n\n\n\n\n\n\n\nnnnnnnnn\x00\x00\x00\x00\'I\x00\x00\x00\x00\x00\x00\x10\x05\x05\x02\x02\x04\r\r\x00\x00?\xff\x00\x00\x00\x00\x00\x00\x00\x00")
Disconnected callback called!

How can we help?