Ticket #85 (closed bug report: invalid)

Opened 18 months ago

Last modified 6 months ago

Connection to NXT under Mac OSX 64 bit, Matlab 2011b

Reported by: anonymous Owned by: staas
Priority: none Milestone: vNo
Component: Driver / Hardware Keywords: Mac OSX 64 bit
Cc:

Description

Hey,

I cannot connect my NXT Brick using Matlab 2011b under Mac OSX 10.6.8. Using the integrated bluetooth tool the bluetooth connection cannot be found. I have connected it as serial device but I don't know how to do further adjustments (e.g. adjusting the port /dev/rfcomm0)

Furthermore I cannot connect with USB because the fantom library could not be found. I checked it, the newest version of the fantom driver is installed, maybe in the wrong directory?

Is there somebody using this nice toolbox under OSX?

Thanks,

Peter

Here the error messages:

bluetooth:

Error using COM_OpenNXTEx>BT_OpenHandle (line 511) Could not open bluetooth connection using port /dev/rfcomm0.

Error in COM_OpenNXTEx (line 299)

h = BT_OpenHandle(h, varargin{1});

Error in COM_OpenNXT (line 72)

handle = COM_OpenNXTEx('Any', , inifilename);

USB:

Error using COM_OpenNXTEx>USB_OpenHandle_Fantom (line 629) The "fantom" library could not be loaded. Make sure the official Mindstorms NXT driver is installed correctly!

Error in COM_OpenNXTEx>USB_OpenHandle (line 568)

hOut = USB_OpenHandle_Fantom(hIn, SuppressErrors?);

Error in COM_OpenNXTEx (line 303)

h = USB_OpenHandle(h, false);

Error in COM_OpenNXT (line 70)

handle = COM_OpenNXTEx('USB', );

Attachments

Change History

  Changed 18 months ago by anonymous

Hat niemand eine Idee oder Erfahrung???

follow-ups: ↓ 3 ↓ 7 ↓ 9   Changed 17 months ago by staas

  • owner changed from Matlab 2011b to staas
  • priority changed from high to none
  • status changed from new to assigned

Hey Peter,

we don´t offer official Mac support because we don´t have a Mac and can´t test the Code. Here are a few suggestions concerning the USB connection: - try loading the Fantom library in Matlab (with Matlab function "loadlibrary") - try this with "Fantom" and "fantom" - if this works look into the "COM_OpenNXTEx.m" and search for the MAC part. There the Fantom library is loaded with an "alias" name. Check if the matches the name you used with loadlibrary - if this doesn´t work check again if the Fantom driver is properly installed

Please report back if this solves the Problem (or not).

Cheers Martin

in reply to: ↑ 2   Changed 17 months ago by anonymous

Replying to staas:

Dear Martin,

thank you very much for your support. Unfortunately I am not familiar with the 'loadlibrary' function. I tried some things but I am not sure if I tried what you meant. When I try to load the library like in the COM_OpenNXTEx.m I get the error shown below. I also tried to find the library or to check if it is installed correctly but I am not sure where I should look for? I found a folder called Fantom which includes a folder called EasyIO. Here are files like EasyIOMapRead.vi, EasyDefrag?.vi, … I am afraid that this is not the fantom library because the 'loadlibrary' function looks for .dlib files on MAC. The path of this folder is:

/Applications/LEGO MINDSTORMS NXT/engine/TargettingVIs/Fantom/EasyIO/EasyDefrag.vi

Could you please let me know what exactly I shall type into Matlab to (loadlibrary(???? ????)) so I can test your advise? Do you have an idea how to test if the fantom library is installed correctly?

Thanks again and best regards,

Peter

Error message:

loadlibrary('Fantom', @fantom_proto,'alias','fantom');

Error using loadlibrary (line 421) There was an error loading the library "Fantom" Undefined function or variable 'fantom_proto'.

Caused by:

Error using feval Undefined function or variable 'fantom_proto'.

  Changed 17 months ago by anonymous

I forgot to write that I can find the function 'fantom_proto.m' in /Applications/Matlab/RWTHMindstormsNXT/private. I hope this helps…

  Changed 17 months ago by anonymous

Don't know if this helps, but: Apparently, there are people who could get it to work on Mac OS, see #74

  Changed 17 months ago by staas

Hey Peter,

we know that it can work, but for know only for 32bit systems. I dont have any information if it could run on Mac 64Bit system.

Here are a few things:

- Try: "loadlibrary('Fantom');" and "loadlibrary('fantom');"

- if this does not work, try to copy all files from the Folder "private" to the Toolbox root Folder, then try: loadlibrary('Fantom', @fantom_proto,'alias','fantom');

Cheers Martin

in reply to: ↑ 2   Changed 17 months ago by anonymous

Hey Martin,

- loadlibrary('Fantom') and loadlibrary('fantom') do not work (Error message see below). - I copied all files from 'private' to the main window, then it seems to work but I get the error that the .dylib cannot be found. This is the extension loadlibrary usually looks for on Mac OSX. Now I am not sure if the fantom driver is installed correctly or if I have to tell loadlibrary to look for a different file. Do you know how the library should be called on Mac? In the fantom folder I can just find .vi files.

Thanks again,

Peter

loadlibrary('Fantom')

Error using loadlibrary>lFullPath (line 594) Could not find file Fantom.h.

Error in loadlibrary (line 219)

header=lFullPath(header);

  Changed 17 months ago by staas

Hey Peter,

Im afraid that i cant help you with this. I dont know how loadlibrary works under MAC and where you can find the files you need.

I keep my eyes open and post here if i find out anyway to solve your problem, but as we dont support Mac (and dont have one), i cant work on this myself.

Cheers Martin

in reply to: ↑ 2   Changed 17 months ago by anonymous

Hey Martin,

no worries and thank you for your support so far. At least the bluetooth connection works but I don't have the accumulator and the USB-connection is saving batteries. I contacted LEGO for information about the fantom library. If I get it working I will post it here!

Best regards,

Peter

  Changed 17 months ago by anonymous

Hi,

I have another hint concerning connecting the NXT via USB under MAC OS X 64 bit. I contacted LEGO and they told me that the fantom driver can only be installed in 32 bit mode (see response below). It is strange that the installer doesn't display an error message then… Id did not try it yet but I will post here if I did.

Response from LEGO:

Danke für Ihre Rückmeldung. Aufgrund einer Änderung in den Installer von Apple in OS 10.7, kann die NXT-Software nicht auf OS 10,7 (Lion) 64-Bit-Modus (Standard)installieren. Ändern Sie die Standard-Installation auf 32-Bit-Modus und NXT soll funktionieren. Der Fantom Treiber soll auch auf 32-Bit modus installiert werden.

- Mac OS Lion auf 32 Bit-Modus starten (SORRY, in German):

Mac OS X v10.67 Lion enthält einen 64-Bit-Kernel. Auf Hardware, die den 64-Bit-Kernel unterstützt, können Sie wählen, ob Ihr Mac mit dem neuen 64-Bit-Kernel oder dem älteren 32-Bit-Kernel gestartet werden soll.

Methode 1:Tastenkombination zum Starten (nur für das aktuelle Startvolume)

• Wenn Ihr Mac standardmäßig mit dem 64-Bit-Kernel funktioniert, können Sie den 32-Bit-Kernel verwenden, indem Sie beim Starten die Tasten 3 und 2 gedrückt halten.

Beim nächsten Neustart wird Ihr Mac auf den alten Standard-Kernel zurückgesetzt.

Methode 2: Volumeeinstellung (dauerhaft)

Zum Auswählen des 32-Bit-Kernels für das aktuelle Startvolume verwenden Sie im Terminal den folgenden Befehl:

sudo systemsetup -setkernelbootarchitecture i386

Hinweis: Diese Einstellung wird in der Datei /Library/Preferences/SystemConfiguration/com.apple.Boot.plist gespeichert und bei jedem Start von diesem Volume wirksam. Wenn Sie den Start von einem anderen Volume ausführen, gelten die Einstellungen dort oder die Standardeinstellungen der Hardware.

  Changed 16 months ago by behrens

  • component changed from Toolbox Function to Driver / Hardware

  Changed 16 months ago by behrens

  • milestone set to vNo

  Changed 6 months ago by atorf

  • status changed from assigned to closed
  • resolution set to invalid

It seems this thing is more driver/hardware related and nothing we could fix from MATLAB code. Hence I'm setting this to invalid. Once you have news on this, feel free to re-open. (Just a note on "invalid": We use "wontfix" for things we COULD actually fix and when we decide we won't do it, but in this case, we can't even fix it I think).

Sorry, but still best of luck with your project!

Add/Change #85 (Connection to NXT under Mac OSX 64 bit, Matlab 2011b)

Author



Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.