I am trying to connect the EV3 brick over Bluetooth to a Mac so I can use direct commands to send bytecodes. However, the Bluetooth connection remains active only through the Lego Mindstorms software. I can download programs from Mac over Bluetooth within the Lego Mindstorms software. However, once I close that app the bluetooth connection goes away. Without the Lego software open, if I try pairing EV3 to Mac, it pairs briefly and stays connected (according to Mac's preferences menu) for 2 seconds and then says "Not connected". I am using Macbook Pro early 2014 with Yosemite. I also upgraded the firmware on EV3 to 1.08. Please help.
Bluetooth communication from the Mac to the EV3 is done using RFCOMM. This means that the EV3 appears as a serial port on the Mac. Namely
/dev/tty.EV3-SerialPort. To send and receive messages from the EV3, you read and write to this virtual file. Bluetooth will show as "connected" as soon as you open this file. You can find some code examples here.