Multiple Tags with One Listener using Python

[color=#333333]Hello Everyone[/color]

[This problem is not solved so posting again]

[color=#333333]I have configured 4 anchors and 3 tags along with 1 listener connected to my pc. I am using python to read the data. When there is only one tag I am getting the data without any problem. But the tag numbers are increased to two or three the data transmission is not following any pattern. I have checked the same with tera term. It is working fine and the data transmission follows the below pattern.[/color]

[color=#333333]POS,0,9404,0.98,4.05,2.14,0,xA7[/color]
[color=#333333]POS,1,1D0E,0.98,4.05,2.14,0,xA7[/color]
[color=#333333]POS,2,90BA,0.98,4.05,2.14,0,xA7[/color]

[color=#333333]This repeats in the same way . But in python with lep command the data transmission is as shown below [/color]

[color=#333333]b’POS,0,9404,1.40,8.51,-0.38,77,xF6\r\n’
[/color]
[color=#333333]b’POS,0,9404,1.39,8.53,-0.36,66,xF7\r\n’[/color]
[color=#333333]b’POS,0,9404,1.35,8.56,-0.37,100,xF8\r\n’[/color]
[color=#333333]b’POS,0,9404,1.19,8.50,-0.34,100,xF9\r\n’[/color]
[color=#333333]b’POS,0,9404,1.15,8.45,-0.29,99,xFA\r\n’[/color]
[color=#333333]b’POS,0,9404,1.20,8.61,-0.38,50,xFB\r\n’[/color]
[color=#333333]b’POS,0,90BA,0.98,8.64,0.18,50,xD5\r\n’[/color]
[color=#333333]b’POS,0,90BA,1.03,8.72,0.12,50,xD6\r\n’[/color]
[color=#333333]b’POS,0,9404,1.09,8.64,-0.38,50,xFE\r\n’[/color]
[color=#333333]b’POS,0,9404,1.15,8.67,-0.37,50,xFF\r\n’[/color]
[color=#333333]b’POS,0,9404,1.17,8.72,-0.38,84,x00\r\n’[/color]

[color=#333333]And there are no different index numbers also. From my understanding the number after POS, should be 0,1,2 as three tags are configured.[/color]
[color=#333333]Why is it working fine with TeraTerm but not with Python[/color]
[color=#333333]Python code I wrote is mentioned below.[/color]

[color=#333333]import serial, time[/color]
[color=#333333]ser = serial.Serial()[/color]
[color=#333333]#ser.port = ‘/dev/ttyACM0’[/color]
[color=#333333]ser.port = ‘COM10’[/color]
[color=#333333]ser.baudrate = 115200[/color]
[color=#333333]ser.bytesize = serial.EIGHTBITS [/color]
[color=#333333]ser.parity =serial.PARITY_NONE [/color]
[color=#333333]ser.stopbits = serial.STOPBITS_ONE [/color]
[color=#333333]ser.timeout = 1[/color]
[color=#333333]ser.open()[/color]
[color=#333333]ser.write(b’\r\r’)[/color]
[color=#333333]time.sleep(1)[/color]
[color=#333333]ser.write(b’lep\r’)[/color]

[color=#333333]ser.close()[/color]

[color=#333333]while True:[/color]
[color=#333333] try:[/color]
[color=#333333] ser.open()[/color]
[color=#333333] value=ser.readline()[/color]
[color=#333333] ser.close()[/color]

[color=#333333] print(value)[/color]
[color=#333333] except KeyboardInterrupt:[/color]
[color=#333333] ser.flushInput() [/color]
[color=#333333] ser.flushOutput()[/color]
[color=#333333] ser.close()[/color]
[color=#333333] print(“Connection closed”)[/color]
[color=#333333] break[/color]
[color=#333333] except Exception as e:[/color]
[color=#333333] ser.close()[/color]
[color=#333333] print(e)[/color]
[color=#333333] print("")[/color]

[color=#333333]Please look it into and tell me if I am making any mistake.[/color]

[color=#333333]Thanks & Regards[/color]
[color=#333333]Shiva[/color]