I'm currently a leJOS developer. The fantom driver is not exactly the best piece of software, and it would be nice to bypass it using some native OSX USB API. However, I have no clue about OSX and any USB APIs that it might offer.
In the old nxtasy forums, somebody told me that there would be some piece of software which was using some native OSX USB API to access the NXT brick. However, I don't remember the name of the software or where I could get it.
tcwan wrote:Funny you should say that. I'm not sure when you refer to native OSX USB API, whether you meant using the Mac's USB Framework, or libusb?
tcwan wrote:Otherwise NI provides NI-VISA drivers to interface with the NXT, but that is a lower level interface (Fantom is built on NI-VISA), and you'd need to purchase the NI-VISA SDK ($$$) to really make use of it.
tcwan wrote:I've had zero success of using libusb on Mac OSX (via MacPorts: libusb-184.108.40.20601017, pyusb 1.0.0-a1, even libusb-legacy-0.1.12) to interface with the NXT. My testing was done using nxt-python (2.1.0) on Mac OSX 10.6.7 (Snow Leopard). Currently I'm working with Nicolas Schodet to interface the Fantom Drivers to Python http://git.ni.fr.eu.org/?p=pyfantom.git;a=summary since it is a lot more stable and reliable than libusb (or even lightaquablue for Bluetooth which only somewhat worked, but no longer after I upgraded to 10.6.7) on Mac OSX.
My testing of libusb on Windows XP with nxt-python was not successful either.
The only issue with Fantom drivers is that NI-VISA is 32-bit only, and no plans by NI to port VISA to 64-bit Mac OSX, so that may cause problems when Mac OSX Lion is shipped. I wonder if Fantom driver support in Lion would be an issue then (assuming that everything is going 64-bit in future).
tcwan wrote:Currently I'm stumped by iNXT::read() which will throw an exception if the number of bytes to be read is greater than the number of available bytes coming from the NXT, whereas iNXT::pollAvailableLength() keeps giving me a "Command mismatch in firmware response" exception. (I'm assuming that I can use iNXT::pollAvailableLength() to check the length of the buffer return by iNXT::read())
Here's our wrapper around the fantom API:
http://lejos.svn.sourceforge.net/viewvc ... iew=markup
We don't use the C-only API, not the C++ API (I wouldn't do so if I were you - you get all sorts of problems when using C++ across binaries created by different compilers).
In particular we use nFANTOM100_iNXT_read instead of iNXT::read().
are you trying to use the fantom driver for USB or Bluetooth? I seem to remember (I wrote the original version of the leJOS Fantom interface), that the two do different things. we only use Fantom for USB and looking at our code (it has been a while since I worked on this), it seems to me that we do not try and issue exact length reads. However I seem to remember that for Bluetooth you do have to issue exact length reads (which is one of the reasons we chose not to use Fantom for Bluetooth)...
Users browsing this forum: No registered users and 0 guests