Serial Device issues

tom82tom82 Junior MemberPosts: 17
Hi all,

I've taken the plunge into Java/Duet development, and am going the whole way on this project - attempting to write the whole thing in Java. I'm having a fair degree of success after a few initial hurdles, but have hit one thing that has me completely stumped:

I'm trying to control a device over serial, but the feedback never makes it into my Java class. I can send commands fine, and the notifications window shows the response, but not my Java code. I assumed it would just come in as a data event into handleDataEvent(), but apparently not. Probably a related issue is that I also never see the 'ONLINE' event, in fact all I ever get into my handleDataEvent() function is a D_STRING8 "NX-1200" once the port is online.

As you may have noticed, I am doing this on an NX controller and in Java 1.7 just to confuse matters! Does anyone have any advice?


  • tom82tom82 Junior Member Posts: 17
    Ok, I figured it out. For anyone else who has this problem: I'd put my call to addDataListener after initialize - school boy error! This is what it should look like:
    device = new SerialDevice(dps, false);
Sign In or Register to comment.