1

Does anyone out there who has developed on a dev board attached to a Mac OSX machine's USB port know how to send AT tty modem commands to the board? Arduino folks? Anyone?

TL;DR

I purchased a development STEVAL-SPBT2ATV2 "USB Dongle for the Bluetooth class 2 SPBT2532C2.AT module", which, according to the docs and spec has "downloaded FW, enabling the user to create a Bluetooth link with simple AT commands."

Which would be great, except all the documentation is only for old MS Windows, and doesn't give any hints on how to program this device from OSX or Linux.

Do I need to install a driver of some sort? Everything I've tried is like talking to a brick wall: I send commands, but nothing comes back from the board.

Things I've tried:

  • /dev/tty.Bluetooth-Modem already existed. Didn't seem to do anything. I think that's the built-in bluetooth device.
  • /dev/tty.AmpedUp-AMP-SPP and /dev/cu.AmpedUp-AMP-SPP showed up when I went to "Network -> set up bluetooth device" - which is good (correct device name) but strange, why under network?
  • Then under Bluetooth I can add a "serial port used to connect to this computer" and get the choice of Modem or RS-232. I guessed Modem.
  • I really hope I don't have to mess with the /etc/tty files

Nothing. the device never seems to react, or send any data back. I've tried several ways to send data to the device. Silence.

echo "AT+AB GPIOConfig 2 O^M" > /dev/cu.AmpedUp-AMP-SPP  # ctrl-v ctrl-m for the ^M
screen /dev/tty.AmpedUp-AMP-SPP
cat /dev/tty.AmpedUp-AMP-SPP 
minicom # via brew
chat /dev/cu.AmpedUp-AMP-SPP 

From the docs: Each dongle has the following factory default:

  • UART: 115200 baud, no parity,1 stop bit,8 data bits
  • Local name: “Amp'ed UP!’
  • Class of device: Misc Device
  • Profile: SPP (serial port profile)
  • Service name: “AMP-SPP”
  • Deep sleep: disabled
  • Page and inquiry scan: 1.28s interval, 11 ms duration
  • Security: disabled
  • Bonding PIN: “1234”
  • Bonding allowed: always enabled
Benjamin H
  • 5,164
  • 6
  • 34
  • 42
  • 1
    If it's already in an operational mode, you may not need to do anything other than use posix serial APIs (or stty at the commandline) on the cu.whatever device. The cu. devices seem better behaved on OSX than the tty. devices which are a bit pedantic. If it's *not* already in operational mode, you are going to have fun figuring out how to kick it into such. – Chris Stratton May 22 '13 at 04:04

1 Answers1

0

I figured out where I was wayyy off-base with some help from a friend.

  • I thought that I was trying to establish a OSX->Terminal->Serial (Over USB)->Chip communication channel to program the chip.
  • When in reality, I was trying to establish a OSX->Terminal->Serial (over Bluetooth->Bluetooth) -> Chip channel to talk to the chip using the existing firmware, which includes enough defaults to have 4 GPIO/LED outputs. The USB only comes in later if I want to change the firmware.

Which means plugging the board into my laptop's USB port isn't necessary and only complicates the issue - better is plugging it into a spare USB charger next to my laptop.

... Which let me narrow down the problem to 2 things:

  1. OSX isn't holding an open bluetooth communication channel to the BT device, so of course I won't be able to talk to it, even if the serial port is set up right
  2. Even if I could talk to it, Apple iOS is so locked down that I won't be able to connect to it from an iPhone/iPad. :(
Benjamin H
  • 5,164
  • 6
  • 34
  • 42