Fantom issue - failure status code on getNXT()

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
ricardocrl
Posts: 117
Joined: 27 Dec 2010, 19:27

Fantom issue - failure status code on getNXT()

Post by ricardocrl »

Hello all,

I'm getting a strange status code, after calling getNXT() which is: 0xBFFF0015. I'm using Bluetooth.

It's not contemplated in the list of status codes of the Fantom documentation, but I found another source, on NI-VISA Programmer Reference Manual (http://www.ni.com/pdf/manuals/370132c.pdf) the meaning of the status code (page 375): "Timeout expired before operation completed."

The NXT is not connected with anything else, it is paired, Bluetooth is on. This problem doesn't happen all the time! Only sometimes. Does anyone have any clue of what it can be?

It has also happened once with sendDirectCommand().

I'm using the firmware 1.31 NBC/NXC enhanced. May there be any modification in this FW that is handling wrongly the bluetooth?

Thanks a lot,
Ricardo
PS: Tomorrow I'll check if I get the same problems with USB and I will also try previous firmwares.
lizard381
Posts: 44
Joined: 16 Nov 2010, 19:57

Re: Fantom issue - failure status code on getNXT()

Post by lizard381 »

Have you looked at NI's page on this error? It might be helpful. http://digital.ni.com/public.nsf/allkb/ ... 14005E82F7

You've gotten further than me with Bluetooth and fantom, I get some unpleasant NSAutoReleasePool errors when I try to use it on a Mac.

Kami
I haven't grown past my playing with Legos stage and I don't think I want to :)
Blog: http://nuhlikklebickle.blogspot.com
Kami
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Fantom issue - failure status code on getNXT()

Post by tcwan »

lizard381 wrote:Have you looked at NI's page on this error? It might be helpful. http://digital.ni.com/public.nsf/allkb/ ... 14005E82F7

You've gotten further than me with Bluetooth and fantom, I get some unpleasant NSAutoReleasePool errors when I try to use it on a Mac.

Kami
What programming language/environment are you using?
This typically is caused by not interfacing to the Cocoa Objective-C runtime correctly. Fantom on Mac OSX relies internally on Cocoa Foundation classes, I suspect at the NI-VISA level (it is not mentioned in the Fantom SDK docs).

E.g., I'm trying to using Python to wrap Fantom, and needed the following:
http://pyobjc.sourceforge.net/documenta ... ific-tasks

Code: Select all

    from AppKit import NSAutoreleasePool
...
    self.pool = NSAutoreleasePool.alloc().init()
lizard381
Posts: 44
Joined: 16 Nov 2010, 19:57

Re: Fantom issue - failure status code on getNXT()

Post by lizard381 »

tcwan wrote:What programming language/environment are you using?
This typically is caused by not interfacing to the Cocoa Objective-C runtime correctly. Fantom on Mac OSX relies internally on Cocoa Foundation classes, I suspect at the NI-VISA level (it is not mentioned in the Fantom SDK docs).
I'm using C++. I figured that Fantom relied on the Foundation classes, but I'm not sure how to do what you're doing, that is initialize a pool in C++ - do you happen to know? I was looking for a solution exactly like yours but haven't been able to find one. So far the only solution seems to be to switch to objective-c++ so that I can mix objective-c and c++, but I really didn't want to do that when I've done so much already in c++.

Kami
I haven't grown past my playing with Legos stage and I don't think I want to :)
Blog: http://nuhlikklebickle.blogspot.com
Kami
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Fantom issue - failure status code on getNXT()

Post by tcwan »

lizard381 wrote:
I'm using C++. I figured that Fantom relied on the Foundation classes, but I'm not sure how to do what you're doing, that is initialize a pool in C++ - do you happen to know? I was looking for a solution exactly like yours but haven't been able to find one. So far the only solution seems to be to switch to objective-c++ so that I can mix objective-c and c++, but I really didn't want to do that when I've done so much already in c++.

Kami
When I tried this about 2 months ago in XCode 3.x (not 4.0), I could build the Fantom SDK main.cpp example and run it just fine (I don't think there was any Autorelease Pool issues). I think I needed to install the NI-VISA Frameworks in order to build it (I think it is mentioned somewhere in the Fantom SDK docs).
What I did was to create a C++ Project in XCode and then add all the needed components (header files, Fantom and VISA Framework files).

However, I tried again yesterday and I'm getting Linker errors with the VISA Framework when building, so I couldn't test again. I'm not sure if 10.6.7 changed something.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests