MDEK1001 TeraTerm and Running Issues

Hi everyone,

We have a listener to get coordinates from MDEK1001 tags. Also, we have a code that shows these coordinates but when the first opening, we should first open the Tera Term and then run the code. Also, it runs at first run but not at second run but again runs at third run.

Do you have any suggestions?

SerialPort serialPort = (SerialPort) commPort;
serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);

            InputStream in = serialPort.getInputStream();
            OutputStream out = serialPort.getOutputStream();

            bw = new BufferedWriter(new OutputStreamWriter(out));
            
            bw.write("\r\r");
            bw.write("lec\r");
            bw.flush();
            
           
            (new Thread(new SerialWriter(out))).start();

            serialPort.addEventListener(new SerialReader(in));
            serialPort.notifyOnDataAvailable(true);

Can you share the full code, I am also looking for something similar to this. Can dig more together

Hi Guys,

I would add a delay of a second after sending \r twice. Also, once you’ve sent \r twice, the dwm1001 enters the shell mode. If you reconnect to the virtual comport without exiting the shell mode (sending “quit”), or reseting the device (sending “reset” or power cycle), then the dwm1001 will still be in shell mode and sending another “\r\r” may cause an issue.

I have some python code doing something similar and working fine. I can distribute it if you are interested.

Thanks
Yves

Hi Yves,
I am interested in the python code , do you mind sharing .