Welcome! Log In Create A New Profile

Advanced

Re: Java io error

Posted by nipper 
Re: Java io error
January 16, 2014 01:22PM
Hello,

I'm new here and neither a computer nor electronics whizz so simple, clear advice please!

The mechanical build of the printer has gone OK, with a few minor glitches, but I'm having problems commissioning the electronics and software. I can use 'bossac' in the command prompt to flash new firmware to the board (... after soldering up the two unsoldered lugs on the USB port) and the board appears in the Device Manager as 'Arduino Due (COM6)'. However, when I try and talk to the board using 'Arduino IDE' no joy. I wait ... and I wait ... but not a peep from the board. If I try and send any kind of GCode command (like 'M115') from the serial monitor I get the following error message:

java.io.IOException: Input/Output error in writeArray
at gnu.ioRXTXPort.writeArray(NativeMethod)
etc ....

I'm presuming that the USB port and power can't be the problem as I can flash the firmware to the board and it confirms that the write went OK, so presumably it must be a software issue?

Any suggestions would be greatly appreciated!

Edited 1 time(s). Last edit at 01/16/2014 01:33PM by nipper.
Re: Java io error
January 16, 2014 01:47PM
1. If you right-click on that COM port in Device Manager and select Properties, does everything look OK?

2. Which version of Windows are you using? There are some issues with Windows 8, see [forums.reprap.org].

Edited 1 time(s). Last edit at 01/16/2014 01:47PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Java io error
January 16, 2014 02:19PM
Are you sure you have flashed a valid firmware?
The size of the binary should be about 168KB.

One of the common errors is downloading from GitHub without using the RAW button,
you then accidentally download a HTML file that flashes and verifies without problems...

Edited 1 time(s). Last edit at 01/16/2014 02:27PM by 3D-ES.


RS-Online Ormerod #263, Kossel mini with Minitronics, Prusa i3 MK2
Re: Java io error
January 16, 2014 02:53PM
@dc42

I'm totally sure what I should be looking for ... but superficially it looks OK. It says the device is working properly, the manufacturer etc looks fine, the driver version is 5.1.2600.0, the driver file is 'C\\windows\system32\DRIVERS\usbser.sys'. Do you suggest there anything I should be looking for in particular?

@3D-ES

I checked that again and the file I flashed is the 165kb bin file as per instructions. Presumably if it was an html file it would say so when I right click on the file and look at 'properties'? I'll double check though.

Thanks to both of you for your suggestions.
Re: Java io error
January 16, 2014 02:57PM
@nipper

Also are you aware that the COM Port used for flashing the duet board is different that the one used when using the board with Arduino and Pronterface.
This could also give that same error.

Paul


RS Ormerod No 436
Re: Java io error
January 16, 2014 03:48PM
@TMD_RS436

Yes, I got that. Maybe I should start by reinstalling the drivers? Suggestions welcome!
Re: Java io error
January 16, 2014 03:58PM
Oh, I forgot to mention that if the Ethernet isn't setup etc you have to wait a minute or two before you can do anything.

So when it shows up in the list of devices you have to have Arduino or Pronterface connect to it and just wait for data to be sent from the duet board then at that point you know its now connected.

Paul


RS Ormerod No 436
Re: Java io error
January 16, 2014 04:54PM
@TMD_RS436

Yes, I understand. That was in the instructions and I patiently waited ... and waited ... and waited ... but no joy.
Re: Java io error
January 16, 2014 05:10PM
@dc42

I forgot to say - Windows XP on a Lenovo Thinkpad X60.
Re: Java io error
January 16, 2014 05:45PM
Perhaps your laptop does not deliver enough energy...?
Do you have a wall connected USB hub to power it with?


RS-Online Ormerod #263, Kossel mini with Minitronics, Prusa i3 MK2
Re: Java io error
January 16, 2014 06:44PM
Hi Nipper

I think we've been talking on email, and I know you've flashed the board successfully. I know this all sounds obvious, but please check anyway...

1. If it's showing up in the Device Manager as an Arduino, that's good.
2. Download Arduino IDE 1.5.5 BETA from [arduino.cc] - make absolutely sure it's 1.5.5 BETA not 1.0.5.
3. MANUALLY load the drivers (ie don't rely on Windows to find the driver), as per: [arduino.cc]
4. Open Arduino IDE 1.5.5
5. Select Tools->Board menu and select ‘Arduino Due (Native UScool smiley
6. Select Tools->Port menu and select the USB port of Duet
7. Select Tools->Serial Monitor. Make sure the speed is set to 115200 (bottom right) and that Newline is selected (next to the speed).

I think point 3 might help.

Ian
RepRapPro tech support
Re: Java io error
January 17, 2014 05:10AM
@3D-ES, @Ian

I just installed the Arduino IDE on my works desktop and the board responds just fine - so that's really good news. So I'm hoping that it's USB power on the laptop (... and as explained more than once in the instructions ...). As a matter of interest could it be the low power output of the laptop USBs (... despite being plugged into the mains) or do laptops have 'power saving' routines that might affect the functionality of USB ports? Could this also cause problems?
Re: Java io error
January 17, 2014 07:54AM
I just found this regards the same error for a different Arduino board:

'... What is happening is that the external process you are trying to write to has closed the pipe connected to its standard input stream.'

So in other words the computer can send a command to the board but the board is mute - so perhaps a power issue?

Edited 1 time(s). Last edit at 01/17/2014 07:54AM by nipper.
Re: Java io error
January 18, 2014 12:36PM
@3D-ES

OK, I tried a powered USB hub but it didn't work. I plugged the board into a powered USB hub and the red LED near the micro USB port shines just a little bit brighter, but it still won't communicate with the Lenovo X60 laptop. Is there anyone out there who knows about Java RXTX?

Any suggestions welcome!

Edited 1 time(s). Last edit at 01/18/2014 12:36PM by nipper.
Re: Java io error
January 18, 2014 12:50PM
You said it worked fine from other PCs, just not on the laptop, and now the USB hub.

Have you tried powering it from the ATX supply? For safety, remove the motor and heater connections from the Duet. Connect the ATX supply, and put a jumper on JP9, as outlined in the instructions: [www.reprappro.com]

Also have a close look at the USB socket. I think I've already emailed you about it potentially being loose. There may be a solder bridge between the connectors.

Ian
RepRapPro tech support.
Re: Java io error
January 18, 2014 01:11PM
@droftarts

Yes, that's right - I resoldered the USB port and the board works perfectly when plugged into my desktop running Windows 7 but I can't get it to work with the Lenovo X60 laptop running Windows XP, with or without powered USB hub. The printer is for my lab and I don't want it grinding away next to my regular works computer so I really would like it to work with the laptop.

I will try as you suggest but since the board works I would say this isn't a problem with the board - it's a problem with my laptop. I've found some online guides to checking that RXTX is working properly and that Java can establish serial communication with the FTDI chip and I will follow these through too. In the meantime I'd really like to find someone who knows about RXTX and how it works.
Re: Java io error
January 18, 2014 01:20PM
We don't use an FTDI chip on the Duet, that's for older Arduino boards. The Due/Duet uses on-board USB interface. I don't really know much about it, unfortunately.

Does your laptop work on the same USB port for other devices? Have you tried deleting Java, and reloading/updating it? Or do you have a special version and/or dependencies?

Ian
RepRapPro tech support
Re: Java io error
January 18, 2014 02:06PM
Since your device seems to be connected as COM6 on your XP laptop,
you have a second opinion available to you that is called HyperTerminal.

Start->Programs->Accessories->Communications->HyperTerminal

Set "Bits per second" to 115200, and try if it responds to input...


RS-Online Ormerod #263, Kossel mini with Minitronics, Prusa i3 MK2
Re: Java io error
January 18, 2014 02:39PM
@droftarts

Oh darn - now I'm confused how the USB port is emulating a serial port (any clues? I thought that RXTX was used to talk to serial ports - and it's RXTX that gives the error). Yes, the USB port works fine and I tried the board on the other USB ports on the laptop with the same non-result. As for the laptop being 'special' - apparently yes, it is. Plan B is to make an executive decision and stick it on somebody elses computer (smiling smiley).

@3D-ES

OK, I gave it a shot and set the Baud rate as suggested - no joy. One more Sunday morning of tinkering and then I'll shelve it and got for Plan B.

Edited 4 time(s). Last edit at 01/18/2014 03:12PM by nipper.
Re: Java io error
January 19, 2014 05:17AM
@ everyone

Problem solved, although I'm not entirely sure how. I changed the 'COM' number to a lower value and lowered the 'transmit' and 'receive' buffers to lower values and it works.

Thanks for all your suggestions ... and now, onwards!

Edited 3 time(s). Last edit at 01/19/2014 09:28AM by nipper.
Re: Java io error
January 19, 2014 07:02AM
thumbs up
Another curious one to try and remember, if it comes up again...

Ian
RepRapPro tech support

Edited 1 time(s). Last edit at 01/19/2014 07:03AM by droftarts.
Re: Java io error
January 19, 2014 07:21AM
Then I don't understand that HyperTerminal did not work!?

I have had problems with Java and RXTX in the past,
serial ports other than COM1, COM2, COM3 or COM4
could not be used...

Changing the COM port to a lower number solved that...


RS-Online Ormerod #263, Kossel mini with Minitronics, Prusa i3 MK2
Re: Java io error
January 19, 2014 07:27AM
@droftarts, @3D-ES

It seems my experience ties in as I changed from 'COM6' to 'COM2' - so maybe that was what did the trick. Thanks once again for your help.

Edited 1 time(s). Last edit at 01/19/2014 07:28AM by nipper.
Sorry, only registered users may post in this forum.

Click here to login