MacOSX Setup
From IPRE Wiki
Contents |
What Packages Do I Need?
Myro depends on various python packages. You can find some binary installers online, install using fink or macports, or install them manually from source. See below for more detailed instructions.
Packages needed:
- Python-2.4
- Pyserial
- Python Imaging Library (PIL)
- Numpy
- Myro
Setup Bluetooth
- Attach the IPRE Fluke to the scribbler
- Turn on the scribbler
- Click on the bluetooth icon in the upper right of your toolbar, select "Set up Bluetooth Device"
- Follow the wizard, select "Any device" as the device type
- Select the IPRE-XXXXX where XXXXXX is your Fluke's serial number
- Enter the PIN code (1234)
- From the bluetooth menu in the toolbar select "Open Bluetooth Preference"
- Select Edit Serial Ports
- Add a serial port to the Fluke via the "+" button if you don't have one already
- If you already have a serial port listed, change the port name to "scribbler" all lowercase
- Click Apply
- Select Edit Serial Ports again
- Select the "Require pairing for security" button
- Click Apply
- You should now have a device like "/dev/tty.scribbler" that is the serial port to the scribbler. Confirm the actual name using the terminal application.
- In Python:
from myro import *
upgrade("scribbler") #if you have a new scribbler without IPRE firmware
initialize()
and type /dev/tty.scribbler when prompted
- If you get an RFCOMM error, go back to the Bluetooth Menu
- Click "Disconnect"
- Click "Edit Serial Ports"
- Select the "Require pairing for security" button
- Click Apply
- In Python:
initialize()
What OS Version?
Mac OS X 10.3 - manual install
Mac OS X 10.4 - manual or binary install
Mac OS X 10.5 - binary install
Although all the packages can be installed from source, the binary install instructions are simpler. Using myro with python-2.5 is in beta testing and may cause some strange problems with idle. Email us if you find anything strange.
Currently the gamepad() interface is not supported on mac because of a conflict with TK and pygame
Binary Installer (Use for Mac OS X 10.5)
The binary packages can be found here
- Install Mac-Python
- Run the "Update Shell Profile.command" script in Applications/MacPython (this is needed for installing pyserial and myro)
- Install PIL
- Install Numpy
- Install pyserial from source using python
- Unzip pyserial
- In a terminal type (Mac OS will hide your password as you type it for security reasons):
- cd pyserial-2.2
- sudo python setup.py install
- Install the latest myro
- Unzip myro
- In a terminal type:
- sudo python setup.py install
Manual Install
Note: to set up Myro on Macs, you'll need to follow the instructions here -- the CDROM setup is only for Windows.
- You will most likely need to open the Terminal application to install all the packages.
- You will need gcc (install xcode from Mac OS cds or web) for Numpy, PIL, and jpeg
- Install python2.4 mac package or using fink
- Mac DMG package: /Library/Frameworks/Python.framework/Versions/2.4/bin/python2.4
- For fink: /sw/bin/python2.4
- Install pyserial from source using python2.4
- sudo python setup.py install
- Install libraries to save and send your images as jpeg.
- If you have fink or macports try installing libjpeg that way
- (e.g. fink install libjpeg libjpeg-bin libjpeg-shlibs)
- Otherwise follow these instructions to install libjpeg from source.
- download libjpeg http://www.ijg.org/files/jpegsrc.v6b.tar.gz
- untar that (tar -xvzf jpegsrc.v6b.tar.gz)
- cd jpeg-6b/
- ln -s `which glibtool` ./libtool
- export MACOSX_DEPLOYMENT_TARGET=10.4 (for tcsh or csh use setenv MAXOSX_DEPLOYMENT_TARGET 10.4)
- ./configure --enable-shared --prefix=/usr/local/
- if /usr/local/ /usr/local/include /usr/local/lib don't exist create them:
- sudo mkdir /usr/local/
- sudo mkdir /usr/local/lib/
- sudo mkdir /usr/local/include/
- make
- sudo make install-lib
- sudo make install-headers
- export MACOSX_DEPLOYMENT_TARGET=
- Install PIL
- sudo python setup.py install
- If you have a problem when running savePicture() while running Mac OS X 10.4, you may need edit setup.py so the paths point to the right versions of freetype, jpeglib, and zlib. Run the above steps again.
- Install Numpy
- sudo python setup.py install
- Install the latest myro
- sudo python setup.py install
- Install optional packages from Linux Setup especially xmpppy (for chat, register, sendPicture).
- For intel mac you can't use snack mac binaries since they are for PPC so you need to build you're own from source
Intel Mac with Windows XP via Parallels
Setup Myro
- Follow the Windows instructions from Myro Installation Manual
Setup Bluetooth using USB Adapter
- For newest version of parallels: Connect a USB Bluetooth adapter
- Allow windows XP to access the bluetooth adapter via the toolbar on the bottom of the window
- Follow Windows instructions for Bluetooth Setup
Setup Bluetooth using old version of Parallels (shouldn't be necessary anymore)
- Getting the bluetooth to work with XP via parallels is a little tricky. Basically the built-in bluetooth adapter (at least in the macbook pro) needs extra drivers in XP. Instead, use the Cellink USB-bluetooth adapter since that doesn't require any extra drivers.
- First we have to remove the bluetooth drivers from the macbook so it releases the device to XP
sudo kextunload -b com.apple.driver.CSRUSBBluetoothHCIController sudo kextunload -b com.apple.driver.AppleUSBBluetoothHCIController
- Plug in the cellink USB bluetooth adapter
- Fire up XP in parallels
- Using the parallels interface, let XP control the "wireless adapter XX:XX:XX:XX" which is the bluetooth dongle
- The device should be seen by XP
- Follow regular windows instructions
- When finished, release the device from windows in parallels
- Unplug the adapter
- Reload the drivers to enable the device to be used from Mac OS
sudo kextload -b com.apple.driver.AppleUSBBluetoothHCIController sudo kextload -b com.apple.driver.CSRUSBBluetoothHCIController
