nxjupload freezes when used

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

Moderators: roger, 99jonathan, imaqine

nxjupload freezes when used

Postby NeoStark » Wed Aug 01, 2012 12:51 pm

Dear leJos community

I am having a problem when trying to upload *.nxj programs to the nxt brick. Using the terminal I type:
Code: Select all
nxjupload -r helloworld.nxj

the output says that it has found my brick then gives me the name and id code of the nxt:
Code: Select all
Found NXT: Nicholas 0016530E0DC1

but nothing happens. The nxt has not frozen, the nxjupload program seems to have stopped without exiting.

Any solutions?

using Linux 3.2.0-27-generic Ubuntu x86_64 GNU/Linux
NeoStark
New User
 
Posts: 1
Joined: Wed Aug 01, 2012 11:36 am

Re: nxjupload freezes when used

Postby skoehler » Wed Aug 01, 2012 3:31 pm

Did you flash the leJOS firmware to the brick?
If not, that is exactly what happens if you use the original LEGO firmware with Linux. There's a bug in LEGO's firmware. USB communication with a Linux host just stalls at some point.
skoehler
leJOS Team Member
 
Posts: 1113
Joined: Thu Oct 30, 2008 4:54 pm

Re: nxjupload freezes when used

Postby InmnP » Sun Aug 05, 2012 2:09 pm

I am facing the same problem, also on Linux 3.2.0-27-generic (Ubuntu 12.04). However, I tried an older version (3.2.0-23) and the problem was still present.
Using the Eclipse plugin to upload a program, I get the following output:
leJOS NXJ> Linking...
leJOS NXJ> Uploading...
Found NXT: NXT 0016531346FB
and then nothing, as described by NeoStark. Other applications, such as nxjbrowse or nxjcontrol, freeze when the "Connect" button is pressed. Actually, on second and subsequent tries the nxjcontrol freezes even sooner, when the "Search" button is pressed. On the first try, however, the NXT is found without problems.
(And yes, I have flashed the newest leJOS firmware to the brick about half an hour ago.)
InmnP
New User
 
Posts: 5
Joined: Mon Aug 22, 2011 8:08 pm

Re: nxjupload freezes when used

Postby skoehler » Sun Aug 05, 2012 9:25 pm

Put the NXT into firmware update mode manually, and install the leJOS firmware as described in the leJOS turotial:
http://lejos.sourceforge.net/nxt/nxj/tu ... nux.htm#12
skoehler
leJOS Team Member
 
Posts: 1113
Joined: Thu Oct 30, 2008 4:54 pm

Re: nxjupload freezes when used

Postby InmnP » Mon Aug 06, 2012 4:43 pm

That is exactly what I have done. Just to be sure, I've tried it again now, but nothing has changed.
InmnP
New User
 
Posts: 5
Joined: Mon Aug 22, 2011 8:08 pm

Re: nxjupload freezes when used

Postby skoehler » Mon Aug 06, 2012 5:18 pm

InmnP wrote:That is exactly what I have done. Just to be sure, I've tried it again now, but nothing has changed.


Ae you trying to upload via USB or bluetooth? In case of USB, here's what I need you to do:
1) plug-in NXT
2) try to upload a file via nxjupload (I assume it hangs?)
3) copy/paste the output of dmesg here (please use a code-block) or paste it at pastebin.com and post the link here

Also, please post the output of "dpkg -l |grep libusb"
skoehler
leJOS Team Member
 
Posts: 1113
Joined: Thu Oct 30, 2008 4:54 pm

Re: nxjupload freezes when used

Postby InmnP » Mon Aug 06, 2012 6:02 pm

I am using USB. "dpkg -l | grep libusb" gives output:
Code: Select all
ii  libusb-0.1-4                                   2:0.1.12-20                             userspace USB programming library
ii  libusb-1.0-0                                   2:1.0.9~rc3-2ubuntu1                    userspace USB programming library
ii  libusb-dev                                     2:0.1.12-20                             userspace USB programming library development files
ii  libusbmuxd1                                    1.0.7-2                                 USB multiplexor daemon for iPhone and iPod Touch devices - library

I have read in the tutorial about libusb-1.0 incompatibility. I would have tried removing the package to see if it makes a difference, but I had been presented with a list of some dependent packages that would also be removed, so I'll wait and hope for a less drastic solution.
The output of dmesg (during a hung upload) exceeded the character limit, so here it is on pastebin: http://pastebin.com/XrByjALJ .
InmnP
New User
 
Posts: 5
Joined: Mon Aug 22, 2011 8:08 pm

Re: nxjupload freezes when used

Postby skoehler » Mon Aug 06, 2012 6:14 pm

Is the NXT connected to a USB 3.0 port? Does your computer have any USB 2.0 ports?
Can you provide me with the result of following?
1) Plug-in the NXT
2) execute lsusb, copy the output the the forums
3) execute strace -ff -o nxjupload.log nxjupload -u <some file>
4) I assume it hangs, so abort it with Ctrl+C after a while
5) upload the file nxjupload.log.<some number> which contains references to /dev/bus/usb to http://www.file-upload.net/ (the other nxjupload.log.* files are not important, hopefully)

Edit: fixed typo in strace command.
skoehler
leJOS Team Member
 
Posts: 1113
Joined: Thu Oct 30, 2008 4:54 pm

Re: nxjupload freezes when used

Postby InmnP » Tue Aug 07, 2012 10:40 am

I have only USB 3.0 ports.
Code: Select all
$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 002: ID 046d:c30e Logitech, Inc. UltraX Keyboard (Y-BL49)
Bus 003 Device 003: ID e0ff:0002 
Bus 001 Device 003: ID 8087:07da Intel Corp.
Bus 001 Device 004: ID 1bcf:2885 Sunplus Innovation Technology Inc.
Bus 003 Device 004: ID 0694:0002 Lego Group Mindstorms NXT

The other command did hang. Here is the log file: http://www.file-upload.net/download-464 ... .2956.html .
InmnP
New User
 
Posts: 5
Joined: Mon Aug 22, 2011 8:08 pm

Re: nxjupload freezes when used

Postby skoehler » Tue Aug 07, 2012 12:48 pm

I would like to report that I have good news. But I have not clue why there is this infinite loop, probably inside libusb, that nxjupload goes into.
I will try to figure that out. However, in the mean time, can you try another PC (probably with USB2.0 instead of 3.0?) with ubuntu 12.04? I will try from inside a virtual machine tonight, but it might not reproduce the problem because of the virtual hardware.
skoehler
leJOS Team Member
 
Posts: 1113
Joined: Thu Oct 30, 2008 4:54 pm

Re: nxjupload freezes when used

Postby InmnP » Thu Aug 09, 2012 1:57 pm

On my old laptop with USB 2.0 ports and Ubuntu 12.04 live USB (Linux ubuntu 3.2.0-23-generic-pae) everything works as expected. I'll perhaps try to use bluetooth instead of USB on the problematic machine, maybe it will work as a workaround.
Also, I have just realized that the Ubuntu version on this live USB is 32-bit, while the computer where problems are ocurring has 64-bit... could that be a problem?
InmnP
New User
 
Posts: 5
Joined: Mon Aug 22, 2011 8:08 pm

Re: nxjupload freezes when used

Postby skoehler » Thu Aug 09, 2012 1:59 pm

InmnP wrote:On my old laptop with USB 2.0 ports and Ubuntu 12.04 live USB (Linux ubuntu 3.2.0-23-generic-pae) everything works as expected. I'll perhaps try to use bluetooth instead of USB on the problematic machine, maybe it will work as a workaround.
Also, I have just realized that the Ubuntu version on this live USB is 32-bit, while the computer where problems are ocurring has 64-bit... could that be a problem?

I have been using Linux 64Bit for ages now. No problems.
It might be the USB 3.0 controllers. I'm not sure, if that's an NXT-side or host-side problem though.
skoehler
leJOS Team Member
 
Posts: 1113
Joined: Thu Oct 30, 2008 4:54 pm

Re: nxjupload freezes when used

Postby gloomyandy » Thu Aug 09, 2012 3:08 pm

I wonder if there is any problem using the NXT to a Windows system via a USB 3.0 port?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3004
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 5 guests

more stuff