I tested the application on an Intel-based Mac Air Book. It works flawless for me. Are you using an Intel-based or Apple silicon-based machine?
Another related question. How large is your microp25rx_backup.ini file?
I don't have a way to test the Apple M1 silicon here.Macbook pro - silicon-based M1
I tested a configuration with 10x that size, so that isn't the issue.20KB in size
I think you are saying the <write config> with your backup.ini file cut-and-pasted into the GUI editor works fine. It sounds like everything is working well except for the <read config> operation. Acknowledgement / retries for USB read operation are not currently implemented. It does check for correct length and out-of-squence packets. That wouldn't explain why you are seeing a "lock-up", but I will try adding ack/retry functionality on reads next and see if it helps.Strangely, if I copy and paste the text from my backup and do a restore, it works perfect from the GUI.
I don't have a way to test the Apple M1 silicon here.
I tested a configuration with 10x that size, so that isn't the issue.
I think you are saying the <write config> with your backup.ini file cut-and-pasted into the GUI editor works fine. It sounds like everything is working well except for the <read config> operation. Acknowledgement / retries for USB read operation are not currently implemented. It does check for correct length and out-of-squence packets. That wouldn't explain why you are seeing a "lock-up", but I will try adding ack/retry functionality on reads next and see if it helps.
Nice work! Can you get it to work with a delay of less than 5000?I found a solution....it maybe just a race condition. I added a sleep for 5 seconds inside a try catch (changes in bold) and now it works perfect:
private void read_configActionPerformed(java.awt.event.ActionEvent evt) {
if(busy!=0) return;
System.out.println("read config");
total_bytes=0;
data_frame_off=0;
ta.setText(""); //clear all text
try{
//send_config causes the receiver to send BACKUP ini config information to port 6
packet_id=0; //increment this on ack for >1 frames
byte[] b = new String("send_config\r\n").getBytes();
send_frame( b, b.length, 0, 1, packet_id); //port 1 is a \n-terminated command string
Thread.sleep(5000);
} catch(Exception e) {
e.printStackTrace();
}
busy=1;
read_timeout=200;
}
Nice work! Can you get it to work with a delay of less than 5000?
Try replacing Thread.sleep(x) with parent.port_to=1200; Does that work with the delay?Thanks! 1 second sleep is too short, but 2 seconds seems to work every time for me.....I assume it depends on the total length of the config / bytes from flash memory on the device.
Try replacing Thread.sleep(x) with parent.port_to=1200; Does that work with the delay?
Thanks. I'll look to see if there is a way that I can add the Thread.sleep for the M1 platform only. It may have to be a configuration file or something.Tried it, but it only worked 1 out of 5 times...the other 4 times it froze.
Thanks. I'll look to see if there is a way that I can add the Thread.sleep for the M1 platform only. It may have to be a configuration file or something.
Tried it, but it only worked 1 out of 5 times...the other 4 times it froze.
Does the following work ok?
try {
//sleep on Mac M1 platform only
if( System.getProperty("os.arch").toLowerCase().equals("aarch64")) {
Thread.sleep(2000);
}
} catch(Exception e) {
}
Thanks. I committed the change to the github repo. v011001 is available as source.Yes working well......pasting my full code just to make sure it is what you expect:
private void read_configActionPerformed(java.awt.event.ActionEvent evt) {
if(busy!=0) return;
System.out.println("read config");
total_bytes=0;
data_frame_off=0;
ta.setText(""); //clear all text
//send_config causes the receiver to send BACKUP ini config information to port 6
packet_id=0; //increment this on ack for >1 frames
byte[] b = new String("send_config\r\n").getBytes();
send_frame( b, b.length, 0, 1, packet_id); //port 1 is a \n-terminated command string
try {
//sleep on Mac M1 platform only
if( System.getProperty("os.arch").toLowerCase().equals("aarch64")) {
Thread.sleep(2000);
}
} catch(Exception e) {
}
busy=1;
read_timeout=200;
}
Thanks. I committed the change to the github repo. v011001 is available as source.
This is the version of the MicroP25RXMon application. The Mon application currently does not show the firmware version of the hardware, yet.VER 2023010605