iCommand 0.6 Bugwatch Thread

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

Moderators: 99jonathan, roger, imaqine

bluetooth close does not work for me.

Postby fschuett » Thu Nov 01, 2007 10:46 am

Hallo,
I wrote a small program that
connects via bluetooth,
turns some motors on and off and
finally disconnects with the
NXTCommand.close operation.

I ran into two issues:
1.
The close operation somehow leaves the nxt in a state that
allows no new connect via open.
After each program run I have to switch the nxt
off and on again to make connection work.
If the connection doesn't work, the messages are:
-------------------------
NXTCommand.open(): Error while connecting ...
icommand.nxt.comm.BlueZException: Can't connect: Connection refused (111)
at icommand.nxt.comm.NXTCommBluez.rcSocketConnect(Native Method)
at icommand.nxt.comm.NXTCommBluez.open(Unknown Source)
at icommand.nxt.comm.NXTCommBluez.open(Unknown Source)
at icommand.nxt.comm.NXTCommand.open(Unknown Source)
at et.ETframe.Verbindung_actionPerformed(ETframe.java:137)
at et.ETframe_Verbindung_actionAdapter.actionPerformed(ETframe.java:276)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:273)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
-------------------------
(I do work with JBuilder 2005 on a openSUSE Linux machine.)

2.
If the connection fails, a BlueZException is thrown but caught in the
library itself and the program is terminated afterwards.
I would like to be able to catch the Exception and give an error message
and keep my program running. (This is a wish from me, so it should
probably be on a wish list instead a bug thread.)

Bye,
Frank
________
iolite vaporizer
Last edited by fschuett on Tue Feb 01, 2011 5:59 pm, edited 1 time in total.
fschuett
New User
 
Posts: 4
Joined: Thu Oct 25, 2007 2:59 pm
Location: Salzhemmendorf, Germany

Re: bluetooth close does not work for me.

Postby bbagnall » Sun Nov 04, 2007 7:02 pm

fschuett wrote:1.
The close operation somehow leaves the nxt in a state that
allows no new connect via open.

This is an ongoing problem with iCommand that I hope to resolve. For now you have to turn the brick on/off each time. With NXJ as firmware I think I have a solution for this, but it isn't in the current release.
fschuett wrote:2.
If the connection fails, a BlueZException is thrown but caught in the
library itself and the program is terminated afterwards.
I would like to be able to catch the Exception and give an error message
and keep my program running. (This is a wish from me, so it should
probably be on a wish list instead a bug thread.)

This has been fixed in the next release (coming very soon hopefully). NXTCommand.open() now throws a Runtime exception, so it's optional to put a try-catch block around it. This should make it better for people who want to develop their own applications using iCommand.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Pilot class bug when calling rotate(0)

Postby Julian » Wed Jan 02, 2008 2:21 pm

When calling rotate(0) on a Pilot object my robot seems to reverse forever. Does anyone else have this problem?
Julian
New User
 
Posts: 2
Joined: Wed Jan 02, 2008 2:08 pm

Re: Pilot class bug when calling rotate(0)

Postby bbagnall » Wed Jan 02, 2008 6:06 pm

Julian wrote:When calling rotate(0) on a Pilot object my robot seems to reverse forever. Does anyone else have this problem?

I haven't seen that specific problem but the old Pilot class (both NXJ and iCommand) had a few problems. We replaced it with some new code and you should see some improvement in the upcoming release.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Re: Pilot class bug when calling rotate(0)

Postby Julian » Sun Jan 06, 2008 4:57 pm

I have downloaded and compiled the files from svn and the problem is still present. I am using the latest lego firmware version. Is it worth me using the lejos firmware or am I not using the latest icommand files?
Julian
New User
 
Posts: 2
Joined: Wed Jan 02, 2008 2:08 pm

Postby bbagnall » Fri Feb 01, 2008 12:18 am

Hi Julian, I put out a newer version on January 19 (sorry for the delay). Give this a try and see if it works better now.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Previous

Return to NXJ Software

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests

more stuff