MacOSX Setup

From IPRE Wiki

Jump to: navigation, search

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:

  1. Python-2.4
  2. Pyserial
  3. Python Imaging Library (PIL)
  4. Numpy
  5. Myro

Setup Bluetooth

  1. Attach the IPRE Fluke to the scribbler
  2. Turn on the scribbler
  3. Click on the bluetooth icon in the upper right of your toolbar, select "Set up Bluetooth Device"
  4. Follow the wizard, select "Any device" as the device type
  5. Select the IPRE-XXXXX where XXXXXX is your Fluke's serial number
  6. Enter the PIN code (1234)
  7. From the bluetooth menu in the toolbar select "Open Bluetooth Preference"
  8. Select Edit Serial Ports
    1. Add a serial port to the Fluke via the "+" button if you don't have one already
    2. If you already have a serial port listed, change the port name to "scribbler" all lowercase
    3. Click Apply
  9. Select Edit Serial Ports again
    1. Select the "Require pairing for security" button
    2. Click Apply
  10. 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.
  11. In Python:
 from myro import *
 upgrade("scribbler") #if you have a new scribbler without IPRE firmware
 initialize()

and type /dev/tty.scribbler when prompted

  1. If you get an RFCOMM error, go back to the Bluetooth Menu
  2. Click "Disconnect"
  3. Click "Edit Serial Ports"
    1. Select the "Require pairing for security" button
    2. Click Apply
  4. 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

  1. Install Mac-Python
    1. Run the "Update Shell Profile.command" script in Applications/MacPython (this is needed for installing pyserial and myro)
  2. Install PIL
  3. Install Numpy
  4. Install pyserial from source using python
    1. Unzip pyserial
    2. 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
  5. Install the latest myro
    1. Unzip myro
    2. 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.

  1. You will most likely need to open the Terminal application to install all the packages.
  2. You will need gcc (install xcode from Mac OS cds or web) for Numpy, PIL, and jpeg
  3. Install python2.4 mac package or using fink
    1. Mac DMG package: /Library/Frameworks/Python.framework/Versions/2.4/bin/python2.4
    2. For fink: /sw/bin/python2.4
  4. Install pyserial from source using python2.4
    sudo python setup.py install
  5. 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.
    1. download libjpeg http://www.ijg.org/files/jpegsrc.v6b.tar.gz
    2. untar that (tar -xvzf jpegsrc.v6b.tar.gz)
    3. cd jpeg-6b/
    4. ln -s `which glibtool` ./libtool
    5. export MACOSX_DEPLOYMENT_TARGET=10.4 (for tcsh or csh use setenv MAXOSX_DEPLOYMENT_TARGET 10.4)
    6. ./configure --enable-shared --prefix=/usr/local/
    7. if /usr/local/ /usr/local/include /usr/local/lib don't exist create them:
      1. sudo mkdir /usr/local/
      2. sudo mkdir /usr/local/lib/
      3. sudo mkdir /usr/local/include/
    8. make
    9. sudo make install-lib
    10. sudo make install-headers
    11. export MACOSX_DEPLOYMENT_TARGET=
  6. Install PIL
    1. 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.
  7. Install Numpy
    1. sudo python setup.py install
  8. Install the latest myro
    sudo python setup.py install
  9. Install optional packages from Linux Setup especially xmpppy (for chat, register, sendPicture).
    1. 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

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
Personal tools