Only one programm anytime I boot my PC

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

Only one programm anytime I boot my PC

Postby Teacher » Fri Jun 10, 2011 10:16 pm

Hi ,
I´ve searched this forum and the web an doesn´t find any clue why the folllowing happend (it´s always possible i missed something)
I started to program the nxt with the eclipse IDE, i´ve done all the things the tutorial says and i´ve been succesfull but i can only upload one programm.
If I boot my laptop it find the nxt, can flash the firmware, knows the name off it and i can upload and run any program i want.
But when i try to upload another programm or want to flash it the pc doesn´t find the nxt. It recognize that there is an nxt but it doesn´t know its name
nor can it upload anything. When i try to flash it the programm terminated with the following appears:
The following NXT devices have been found:
1: Unknown 0016530D364D
Select the device to update, or enter 0 to exit.
1
Device number to update (0 to exit): Attempting to reboot the device.
flashing the firmware failed
lejos.pc.comm.NXTCommException: Failed to open device in command mode.
See Eclipse error log for detailed stack trace.

And the Eclipse error log shows eclipse.buildId=M20110210-1200
java.version=1.6.0_25
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Framework arguments: -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product -data C:\Users\Jan\workspace -product org.eclipse.epp.package.java.product


Error
Sat Jun 11 00:01:26 CEST 2011
Failed to open device in command mode.

lejos.pc.comm.NXTCommException: Failed to open device in command mode.
at lejos.pc.tools.NXJFlashUpdate.resetDevice(NXJFlashUpdate.java:250)
at lejos.pc.tools.NXJFlash.openDevice(NXJFlash.java:87)
at lejos.pc.tools.NXJFlash.run(NXJFlash.java:142)
at lejos.pc.tools.NXJFlash.start(NXJFlash.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.lejos.nxt.ldt.actions.LeJOSUploadFirmwareAction.flashFirmware(LeJOSUploadFirmwareAction.java:70)
at org.lejos.nxt.ldt.actions.LeJOSUploadFirmwareAction.access$0(LeJOSUploadFirmwareAction.java:53)
at org.lejos.nxt.ldt.actions.LeJOSUploadFirmwareAction$1.run(LeJOSUploadFirmwareAction.java:46)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Ok, i`m clueless. If i reboot the pc than everything is fine until i upload one program. The first on is ok, and then it occurs again.
I hope my problem is understandable, i know i have to improve my english...
Teacher
New User
 
Posts: 5
Joined: Wed May 18, 2011 10:30 pm

Re: Only one programm anytime I boot my PC

Postby gloomyandy » Sat Jun 11, 2011 6:05 am

Make sure you have the latest fantom driver installed. You can get the latest version from the lego mindstorms site. What version of leJOS are you using? What version of windows? What happens if you unplug the nxt and thsn plug it in again?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3634
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Only one programm anytime I boot my PC

Postby Teacher » Sat Jun 11, 2011 6:52 pm

The operating system is Win 7, lejos 0.9.0, the lastest Fantom driver is installed. When i unplug the nxt and then plug it in again the pc sounds that an usb device is plugged in but the situation is unchanged. If i plug the nxt in an other pc all all functions are available and i can upload as much programs as I want. But when i plug another nxt in my pc (Acer Travelmate 5735Z installed at wednesday) the same as mentioned above happend, i've tried it with three nxt's. I'm clueless...
Teacher
New User
 
Posts: 5
Joined: Wed May 18, 2011 10:30 pm

Re: Only one programm anytime I boot my PC

Postby gloomyandy » Sat Jun 11, 2011 7:18 pm

What version of the fantom driver do you have?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3634
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Only one programm anytime I boot my PC

Postby Teacher » Sun Jun 12, 2011 8:38 am

1.1.3.
I´ve installed the same setup on several other pc´s and notebooks of my pupils and no one of them have the same problem.

The output of the system (last lines), i hope it will useful for anybody
leJOS NXJ> Uploading...
leJOS NXJ> Failed to load USB comms driver: cannot load library C:\Program Files\leJOS NXJ\lib\pc\native\windows\x86\jfantom.dll
leJOS NXJ> Searching for MMG3 using Bluetooth inquiry
leJOS NXJ> Search Failed: BluetoothStack not detected
leJOS NXJ> Failed to find any NXTs
leJOS NXJ> Failed to connect to any NXT
No NXT found - is it switched on and plugged in (for USB)?
linking and uploading the file failed with exit status 1

But one minute ago the program was able to upload the USB comms driver.
Before these test i had de- an reinstalled the fantom driver.
It seems as if the first upload ditsurbed the connection between the nxt and the pc.
Teacher
New User
 
Posts: 5
Joined: Wed May 18, 2011 10:30 pm

Re: Only one programm anytime I boot my PC

Postby gloomyandy » Sun Jun 12, 2011 11:19 am

Hi,
Is there anything different about the PC you are using? Does it have anything like USB 3.0 ports? I don't think I've ever seen any reports like this one before... Sorry not much help I know! Also do you have any other Bluetooth drivers on this PC that could be getting triggered by the NXT device (unfortunately some manufacturers do not use a properly registered USB ID)...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3634
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Only one programm anytime I boot my PC

Postby skoehler » Sun Jun 12, 2011 12:34 pm

Teacher wrote:1.1.3.
I´ve installed the same setup on several other pc´s and notebooks of my pupils and no one of them have the same problem.

The output of the system (last lines), i hope it will useful for anybody
leJOS NXJ> Uploading...
leJOS NXJ> Failed to load USB comms driver: cannot load library C:\Program Files\leJOS NXJ\lib\pc\native\windows\x86\jfantom.dll
leJOS NXJ> Searching for MMG3 using Bluetooth inquiry
leJOS NXJ> Search Failed: BluetoothStack not detected
leJOS NXJ> Failed to find any NXTs
leJOS NXJ> Failed to connect to any NXT
No NXT found - is it switched on and plugged in (for USB)?
linking and uploading the file failed with exit status 1


So you're using the eclipse plug-in, right? Does it work with the command line?
Does the upload work after you restart Eclipse?

Would you be willing to test a snapshot? "cannot load library C:\Program Files\leJOS NXJ\lib\pc\native\windows\x86\jfantom.dll" is most certainly caused by some other error, that we can't see at the moment and I can send you a snapshot which will produce more verbose error output.
skoehler
leJOS Team Member
 
Posts: 1350
Joined: Thu Oct 30, 2008 4:54 pm

Re: Only one programm anytime I boot my PC

Postby Teacher » Sun Jun 12, 2011 8:24 pm

The Computer has no Bluetooth.
No USB 3.0.
It´s a low Budget PC, so theres no up-to-date technic installed.
I use the eclipse plug in.
If I try to upload the Programs via command line the same error occurs.
And I would be willing to make an Snapshot test.
A restart of eclipse doesn´t change a thing only a reboot helps for one time...
Sometimes I think unusual errors are my speciality
Teacher
New User
 
Posts: 5
Joined: Wed May 18, 2011 10:30 pm

Re: Only one programm anytime I boot my PC

Postby skoehler » Sun Jun 12, 2011 10:05 pm

I've moved you thread to "NXJ Software", since it's not really about (Lego/NXT) hardware.

Now to further investigate your issue, I'd like you to download a snapshot and run nxjupload for a few times. Here's a step by step guide:
Code: Select all
cd c:\folder_of_your_choice\snapshot\bin
set "NXJ_HOME="  (comment: this will unset NXJ_HOME, which is intended)
nxjupload -u file_of_your_choice
nxjupload -u file_of_your_choice
...


So actually, the second nxjupload would have failed in the past, right?

Now if the second nxjupload does still not work with the snapshot, there's no need to try Eclipse. However, if it does work, then please try using the snapshot with the Eclipse plugin. Just change the path in the preferences of Eclipse to c:\folder_of_your_choice\snapshot and try uploading stuff to the NXT.

In case of an error, please post the output.
skoehler
leJOS Team Member
 
Posts: 1350
Joined: Thu Oct 30, 2008 4:54 pm

Re: Only one programm anytime I boot my PC

Postby Teacher » Wed Jun 15, 2011 7:18 pm

Thanks for the answer, i was a little busy in the last days, sorry for the late answer:
This time the first upload don´t work. But this time the output was different (The NXT was on and i tried it different times):

leJOS NXJ> Error: Failed to load USB comms driver.
leJOS NXJ> Caused by lejos.pc.comm.NXTCommException: Cannot load USB driver
leJOS NXJ> at lejos.pc.comm.NXTCommFactory.createNXTComm(NXTCommFactory.jav
a:70)
leJOS NXJ> Caused by lejos.util.jni.JNIException: cannot load library C:\Users\J
an\leJOSNXJProjects\Jan\snapshot\lejos-snapshot\snapshot\lib\pc\native\windows\x
86\jfantom.dll
leJOS NXJ> at lejos.util.jni.JNILoader.loadLibrary(JNILoader.java:112)
leJOS NXJ> Caused by java.lang.UnsatisfiedLinkError: C:\Users\Jan\leJOSNXJProjec
ts\Jan\snapshot\lejos-snapshot\snapshot\lib\pc\native\windows\x86\jfantom.dll: C
an't find dependent libraries
leJOS NXJ> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
leJOS NXJ> Failed to find any NXTs
leJOS NXJ> Failed to connect to any NXT
No NXT found - is it switched on and plugged in (for USB)?

In the hope that this will enlighten you...
Teacher
New User
 
Posts: 5
Joined: Wed May 18, 2011 10:30 pm

Re: Only one programm anytime I boot my PC

Postby skoehler » Wed Jun 15, 2011 8:14 pm

Teacher wrote:leJOS NXJ> Caused by java.lang.UnsatisfiedLinkError: C:\Users\Jan\leJOSNXJProjects\Jan\snapshot\lejos-snapshot\snapshot\lib\pc\native\windows\x86\jfantom.dll: Can't find dependent libraries


This can only mean one thing:
The fantom driver is not installed (or not installed properly).

Do you have a file called fantom.dll in c:\windows\system32 or c:\windows\syswow64?

Also try to uninstall all previous version of the Fantom driver. Then install version 1.1.3 from here:
http://mindstorms.lego.com/en-us/suppor ... river.aspx
(maybe you want to install it last, after any other Lego software)

I believe you wrote that you've already installed the Fantom driver. But the error message is pretty clear: it's missing. There's a very small chance, that something else is the cause.

If you're keen enough, you can use the dependency walker from http://www.dependencywalker.com/ to analyze the situation. Open the jfantom.dll from the snapshot with that tool, and it will list the libraries jfantom.dll is depending on. If I'm right, the tool will show an error that fantom.dll is missing.
skoehler
leJOS Team Member
 
Posts: 1350
Joined: Thu Oct 30, 2008 4:54 pm


Return to NXJ Software

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

more stuff