Forums > MaxMSP

Problem identifying specific consonants using a neural network

August 20, 2007 | 7:29 pm


August 22, 2007 | 2:20 pm

hi,

i have been trying to use a new witilt v2.5 with max/msp 4.6.3 on OS
10.4.8. it is switched on and set to RF. the antenna is the built-in chip,
and i am powering it with 4 new AAs. i am failing in several respect. i
have read every archive in the max/msp/jitter forums and the sparkfun
forum too on the subject.

1. bluetooth recognizes the device. here is the system profiler report:

Apple Bluetooth Software Version: 1.7.8f2
Hardware Settings:
mta-studio1:
Address: 00-14-51-92-4c-26
Manufacturer: Cambridge Silicon Radio
Firmware Version: 3.1965 (3.1965)
Bluetooth Power: On
Discoverable: Yes
HCI Version: 3 ($3)
HCI Revision: 1965 ($7ad)
LMP Version: 3 ($3)
LMP Subversion: 1965 ($7ad)
Device Type (Major): Computer
Device Type (Complete): Desktop Computer
Composite Class Of Device: 1057028 ($102104)
Device Class (Major): 1 ($1)
Device Class (Minor): 1 ($1)
Service Class: 129 ($81)
Requires Authentication: No
Services:
Bluetooth File Transfer:
Folder other devices can browse: ~/Public
Requires Authentication: Yes
State: Disabled
Bluetooth File Exchange:
Folder for accepted items: ~/Documents
Requires Authentication: No
When other items are accepted: Ask
When PIM items are accepted: Ask
When receiving items: Prompt for each file
State: Enabled
Devices (Paired, Favorites, etc):
peterskeyboard:
Name: peterskeyboard
Address: 00-0a-95-46-15-43
Type: Keyboard
Services: Apple Wireless Keyboard
Paired: Yes
Favorite: No
Connected: No
AppleWirelessMouse:
Name: AppleWirelessMouse
Address: 00-0a-95-11-42-33
Type: Mouse
Services: Apple Wireless Mouse
Paired: Yes
Favorite: No
Connected: No
SparkFun-BT:
Name: SparkFun-BT
Address: 00-a0-96-18-c2-90
Type: Unknown Device
Services: COM0
Paired: Yes
Favorite: No
Connected: No
Incoming Serial Ports:
Serial Port 1:
Name: Bluetooth-PDA-Sync
RFCOMM Channel: 3
Requires Authentication: No
Outgoing Serial Ports:
Serial Port 1:
Address:
Name: Bluetooth-Modem
RFCOMM Channel: 0
Requires Authentication: No
Serial Port 2:
Address: 00-A0-96-18-C2-90
Name: SparkFun-BT-COM0-1
RFCOMM Channel: 1
Requires Authentication: Yes

the bluetooth devices list in system preferences reads:

Device Name: SparkFun-BT

Device Address: 00-a0-96-18-c2-90
Device Type: Miscellaneous
Device Services: COM0

Paired: Yes
Configured: Yes
Favorite: No
Connected: No
Serial Port: Yes

the serial port settings for this device are:

[check] [Serial port with this name is checked]
Port name: SparkFun-BT-COM0-1
Device Service: COM0
Port type: RS-232
[check] Require pairing for security
[check] Show in Network Preferences

with this detected, the 1Hz LED blinks on the witilt.

2. creating the [serial c 57600] object yields the following error:

* error: serial: error opening serial port (/dev/cu.SparkFun-BT-COM0-1)

i checked /dev:

mta-studio1:~ peter$ ls /dev/*Spark*
/dev/cu.SparkFun-BT-COM0-1 /dev/tty.SparkFun-BT-COM0-1

further, if i change it to [serial b 9600] i get the same error:

error: serial: error opening serial port (/dev/cu.Bluetooth-Modem)

i don’t have a modem, so perhaps that is normal. and i don’t know if it is
a serial device.

3. |print|->[serial c 57600] yields:

port a: Bluetooth-PDA-Sync
port b: Bluetoot-Modem
port c: SparkFun-BT-COM0-1

4. for some reason, when i was playing around yesterday with the patch
below, whenever i’d change the serial letter identifier to what i thought
was the correct serial port (sometimes including what seemed like the
initally correct one), the order of serial ports changed. upon doing so,
the continuous status LED would sometimes turn oon, sometimes the 1Hz
blink LED would stop blinking, and on occasion the green BT LED would
light up. i cannot reproduce this behavior today. also, sometimes with the
PDA port (presumably serial), i’d get a dump of "read 0", sometimes "read
-1", and once or twice i got a dump of around 50 values. the Connected
line of the bluetooth system preferences Devices for the SparkFun-BT
device would sometimes say "Yes".

the patch:

===

I was talking to Stefan Prosky at SIGGRAPH and he turned me on to the
WiTilt from Spark Fun, which I’ve been playing with a little bit over
the last few days. Stefan mentioned that he was having trouble
parsing the data, and Tom Igoe’s article at ITP mentioned something
similar. So, here’s a little patch that does simple parsing of the
raw data coming out of the thing. Might be useful to someone out there.

jb

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 154 387 100 196617 Z;
#P comment 117 387 100 196617 Y;
#P toggle 82 185 15 0;
#P newex 82 203 29 196617 gate;
#P toggle 184 185 15 0;
#P newex 184 203 29 196617 gate;
#P comment 287 78 100 196617 < - end transmit;
#P number 152 367 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 116 367 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 80 367 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 80 342 67 196617 unpack 0 0 0;
#P newex 337 268 20 196617 t b;
#P newex 296 211 40 196617 t clear;
#P newex 337 242 67 196617 match 10 13;
#P newex 337 179 48 196617 bucket 2;
#P message 265 77 20 196617 32;
#P newex 32 315 202 196617 regexp .*X=(\\d+).*Y=(\\d+).*Z=(\\d+);
#P newex 142 279 40 196617 itoa;
#P newex 142 250 67 196617 zl group 240;
#P message 265 51 20 196617 49;
#P toggle 77 48 15 0;
#P newex 77 71 57 196617 qmetro 20;
#P newex 82 226 54 196617 print data;
#P newex 184 226 63 196617 print status;
#P newex 142 116 71 196617 serial e 9600;
#P comment 288 51 100 196617 < - start transmit;
#P comment 78 387 100 196617 X;
#P window linecount 4;
#P comment 269 363 169 196617 This patch simply reads the default
data out of the WiTilt. In the other modes of the device , it could
serve as a resonable model for extension.;
#P connect 10 0 11 0;
#P connect 7 0 6 0;
#P connect 11 1 17 0;
#P connect 17 0 18 0;
#P connect 25 0 24 0;
#P connect 24 0 5 0;
#P fasten 3 0 24 1 147 192 106 192;
#P connect 17 1 19 0;
#P connect 6 0 3 0;
#P fasten 12 0 3 0 270 98 147 98;
#P fasten 8 0 3 0 270 71 147 71;
#P connect 3 0 9 0;
#P fasten 16 0 9 0 342 294 281 294 281 173 147 173;
#P connect 9 0 10 0;
#P connect 17 2 20 0;
#P connect 23 0 22 0;
#P connect 22 0 4 0;
#P connect 3 1 22 1;
#P connect 13 0 15 0;
#P fasten 3 0 13 0 147 137 342 137;
#P connect 13 0 14 0;
#P connect 13 1 14 0;
#P connect 15 0 14 0;
#P connect 14 0 16 0;
#P window clipboard copycount 28;

Keith McMillen
BEAM Foundation
http://www.beamfoundation.org/
510.502.5310

===

what might i do to get closer to having this thing work?

also, the witilt documentation talks about accessing a configuration menu.
what is that all about?

i’m clearly no expert at dealing with external devices, so i apologize for
the noob question.

any help would be appreciated.

thanks,
peter


September 30, 2007 | 10:03 am

Hello,

Great share ! I spent all the day having it work yesterday but no luck… Before I was using W2O which was made for the Witilt (bridging bluetooth and OSC) but for a strange reason it doesn’t seem to work anymore… Anyone can try and confirm ? You can download it here : http://ccrma.stanford.edu/~woony/software/w2o/

It is actually the easiest way to have the data parsed and ready for work. It even includes the patch for Max/MSP.

As for the configuration, I personally use an applescript with the screen command in the terminal (credit to Macosxhint) ;

set baudList to {1200, 2400, 4800, 4800, 9600, 19200, 38400, 57600, 115200, 230400}
set baudRate to (choose from list baudList default items {57600})

tell application "Terminal"
set serialDevices to (do shell script "ls /dev/cu*")
set theDeviceList to (paragraphs of serialDevices) as list
set theDevice to (choose from list theDeviceList default items {"/dev/cu.SparkFun-BT-COM0-1"})
do script "screen " & theDevice & " " & baudRate

set number of rows of window 1 to 50
set number of columns of window 1 to 100
set background color of window 1 to "black"
set normal text color of window 1 to "green"
set custom title of window 1 to "SerialOut"
end tell

all the best, Nicolas


Viewing 3 posts - 1 through 3 (of 3 total)