Hi all,
I'm experiencing a perplexing problem with USB and BT connectivity. First off, I'm using 32-bit Matlab 2010b (and Simulink) to program for the NXT. My PC's OS is Windows 7 (64-bit). The NXT runs on an OS called nxtOSEK, which uses LeJOS device drivers. Using the Mindstorms software, I can exchange files between the PC and NXT via USB and BT. Within Matlab, I can also load files from the PC onto the NXT via USB. However, programs running on the NXT cannot seem to communicate with the PC via USB or BT. These programs are examples provided by a toolbox developer (see link below), so coding shouldn't be an issue. I've reinstalled the 64-bit Fantom driver, but it has made no difference. Anyone has a clue as to why this is?
http://www.mathworks.com.au/academia/le ... vulrt.html
Thanks and cheers.
Hippie
Strange problem with USB and Bluetooth
Re: Strange problem with USB and Bluetooth
Have you got an example code you can post and indicate the line that fails? What kind of error messages do you get?hippicurean wrote:Within Matlab, I can also load files from the PC onto the NXT via USB. However, programs running on the NXT cannot seem to communicate with the PC via USB or BT.[/url]
I'm not a Simulink user at all and I don't know the Villanova solution, but I can tell you that the Fantom driver is NOT a true 64bit driver, even though it installs on a 64bit machine. As a consequence, you can't use Fantom at all from a 64bit MATLAB.
We've just implemented a version of our toolbox for 64bit MATLAB using libusb_win32 (on both 32bit and 64bit OS). But again, I don't know how this relates to the VU toolbox or the LeJOS drivers.
If you want a workaround: Install MATLAB 32bit (it's possible on a 64bit OS), then use the regular Fantom (64bit installer as you did), and it should work.
RWTH - Mindstorms NXT Toolbox for MATLAB
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
-
- Posts: 19
- Joined: 12 Jun 2011, 20:51
Re: Strange problem with USB and Bluetooth
Hi linusa,
As I mentioned in my earlier post, I am indeed using 32-bit Matlab. It's just my OS that's 64-bit. Yes, I'm aware that the Fantom driver isn't truly 64-bit but is tweaked to work within a 64-bit OS. In fact, I learnt about it sometime ago from one of the bug reports on your (RWTH) website! The example that I'm using is a Simulink model and isn't in plain Matlab code. It's a pre-release version that I received from the developer himself. Prior to that, I made an even simpler model where I just generated data using increment blocks, converted them to the suitable type and sent them to the USB or BT transmitter block. You would have to install the VU-LRT blockset along with nxtOSEK to try it out.
I've also tried installing libusb-win32 as a device (not filter) driver. All it did was disable that specific USB port for the NXT. Even after removing the newly-created driver using PnPUtil, I still couldn't get that USB port to work with the NXT. I had to implement a system restore to rectify the problem.
Just to clarify, if the Mindstorms software is able to communicate with the NXT via USB and BT, that means Matlab shouldn't have a driver issue, yes? By the way, the RWTH toolbox was one of the firsts options I had looked at before I started my research project. I like the idea because it doesn't have the restriction of file size unlike the embedded solution. However, my model uses Simulink heavily alongside Matlab code, and RWTH doesn't directly support Simulink.
Cheers
Hippie
As I mentioned in my earlier post, I am indeed using 32-bit Matlab. It's just my OS that's 64-bit. Yes, I'm aware that the Fantom driver isn't truly 64-bit but is tweaked to work within a 64-bit OS. In fact, I learnt about it sometime ago from one of the bug reports on your (RWTH) website! The example that I'm using is a Simulink model and isn't in plain Matlab code. It's a pre-release version that I received from the developer himself. Prior to that, I made an even simpler model where I just generated data using increment blocks, converted them to the suitable type and sent them to the USB or BT transmitter block. You would have to install the VU-LRT blockset along with nxtOSEK to try it out.
I've also tried installing libusb-win32 as a device (not filter) driver. All it did was disable that specific USB port for the NXT. Even after removing the newly-created driver using PnPUtil, I still couldn't get that USB port to work with the NXT. I had to implement a system restore to rectify the problem.
Just to clarify, if the Mindstorms software is able to communicate with the NXT via USB and BT, that means Matlab shouldn't have a driver issue, yes? By the way, the RWTH toolbox was one of the firsts options I had looked at before I started my research project. I like the idea because it doesn't have the restriction of file size unlike the embedded solution. However, my model uses Simulink heavily alongside Matlab code, and RWTH doesn't directly support Simulink.
Cheers
Hippie
Re: Strange problem with USB and Bluetooth
Sorry, skipped that part where you said you were using a 32bit MATLAB already.hippicurean wrote: I've also tried installing libusb-win32 as a device (not filter) driver. All it did was disable that specific USB port for the NXT. Even after removing the newly-created driver using PnPUtil, I still couldn't get that USB port to work with the NXT. I had to implement a system restore to rectify the problem.
Just to clarify, if the Mindstorms software is able to communicate with the NXT via USB and BT, that means Matlab shouldn't have a driver issue, yes?
Yes, I think in theory you are right, it should work if the mindstorms software can connect. Here's a guide from John Hansen, maybe that helps? http://bricxcc.sourceforge.net/NXTFantomDriverHelp.pdf
Don't you have any error message at all? If you use the RWTH toolbox just for testing and use the command "DebugMode on" at the beginning, it will tell you exactly what failed during connection...
RWTH - Mindstorms NXT Toolbox for MATLAB
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
Who is online
Users browsing this forum: No registered users and 4 guests