Teensy emulating a Monome/Arduinome for use with serialosc *Solution Needed!!!**

Status
Not open for further replies.

brianlight

New member
Hello I'm trying to emulate a Monome/Arduinome device on a teensy 3.1
I have a working firmware with button presses and LED lights working almost perfectly emulating what a monome does using four Adafruit Trellis button pads soldered in a 8x8 grid. Arduino sketch can be found here

I've been using serial-pyio to handle serial communications from: and to: the teensy & have been able to use this on both Linux on windows. On windows by just selecting the correct teensy com port & on linux by slightly modifying the python code to look for my device in the right place ttyACM0



but... I would like to utilize serialosc mostly because all modern monome apps are now designed to work with this newish serial to osc bridge. I've also noticed that both serialosc and an application that used libmonome with the functionality of MLR called Rove seem to compile & run on my Raspberry Pi

The Goal of my project is to make a self contained Monome/Arduinome with the only computer needed neatly tucked away in it's enclosure & eliminate the need to lug around a laptop computer or any other mobile computing platform netbook or tablet.



Question: Apparently you can get serialosc to recognize an Arduino Uno by flashing the ATmega chip with a Monome or arduino serial number along with changing other items. Following the instructions here.

I've changed what felt appropriate in my teensy's 'usb_desc.h' but serialosc daemon does not detect my device as a monome when I connect
Here are the changes I've made am I missing something??? Has someone accomplished something along the lines of what I'm doing?


Code:
#if defined(USB_SERIAL)
  #define VENDOR_ID		0x03eb
  #define PRODUCT_ID		0x2ff7
  #define DEVICE_CLASS		2	// 2 = Communication Class
  #define MANUFACTURER_NAME	{'A','r','d','u','i','n','o','m','e'}
  #define MANUFACTURER_NAME_LEN	7
  #define PRODUCT_NAME		{'a','4','0','h','-','0','0','1'}
  #define PRODUCT_NAME_LEN	8
  #define EP0_SIZE		64
  #define NUM_ENDPOINTS		4
  #define NUM_USB_BUFFERS	12
  #define NUM_INTERFACE		2
  #define CDC_STATUS_INTERFACE	0
  #define CDC_DATA_INTERFACE	1
  #define CDC_ACM_ENDPOINT	2
  #define CDC_RX_ENDPOINT       3
  #define CDC_TX_ENDPOINT       4
  #define CDC_ACM_SIZE          16
  #define CDC_RX_SIZE           64
  #define CDC_TX_SIZE           64
  #define CONFIG_DESC_SIZE	(9+9+5+5+4+5+7+9+7+7)
  #define ENDPOINT2_CONFIG	ENDPOINT_TRANSIMIT_ONLY
  #define ENDPOINT3_CONFIG	ENDPOINT_RECEIVE_ONLY
  #define ENDPOINT4_CONFIG	ENDPOINT_TRANSIMIT_ONLY
 
Last edited:
Is your device sending OSC messages ?

I think I'd have to dig a little through the monome forum to find out how serialosc really works.
The OSCuino library can send OSC messages through SLIP the protocol ove USB IIRC.

I am just not sure how serialosc determines that a connected device can talk OSC, unless the connected device discovers (ZeroConf, Bonjour, DNS-SD) the _monome._udp service that serialosc advertises.
 
Right now my teensy is speaking to the computer using the 40h serial protocol non osc http://monome.org/docs/tech:serial:series
 
Last edited:
Question: Apparently you can get serialosc to recognize an Arduino Uno by flashing the ATmega chip with a Monome or arduino serial number along with changing other items. Following the instructions here.

I've changed what felt appropriate in my teensy's 'usb_desc.h' but serialosc daemon does not detect my device as a monome when I connect


Not sure if this is useful, but on max osx at least, once you connect a usb device it will remember the name of that device forever, even if you go and change all the usb descriptors, flush your cache etc. There may well be a way, but I haven't found it. Try it on a machine you have never plugged that teensy into.
 
I would not be too surprised if - on a mac - this information is stored in the PRAM/NVRAM.
support.apple.com lists the following as being stored in PRAM in earlier macs :

  • Serial Port Configuration and Port definition


Newer intel based macs don't have PRAM but NVRAM.
 
Last edited:
Having the USB device recognized by serialosc is definitely the key if you want to use USB cable. However, you could also use a very different approach.
Serialosc recognizes a momone device and then registers a _monome._udp service per mDNS/Bonjour. Software such as MaxMSP then can discover this service and connect to it.
You could connect your Teensy to a WIZ820io for example and use the EtherntBonjour library to register a monome service without the use of the serialosc server. This could even work wirelessly if you connect a little pocket router to the WIZ820io.

Either way, in order to have the Teensy talk OSC the OSCuino library is your best bet.
 
Thanks for all the suggestions I've been considering rewriting my current firmware found here to send out OSC messages directly. But.. I'm going to comb through the source code for serialosc to see If I can figure out a way for it to detect the teensy as an arduinome based monome first due to my firmware being base upon the original arduinome firmware found at http://flipmu.com reportedly works with serialosc
 
Last edited:
Hi brianlight...

what's the status of your project? I just had a similar idea and found this post. I'm curious to see if you got OSC working
 
Sending and receiving OSC messages and bundles is fairly straight forward. The trick is to have the software on the PC or Mac side recognize your device as a monome. That's what serialosc is for.
 
Yes, the discovery process for serial ports is hard to do well and different for each platform. I recently succeeded at naming setting up a custom OSC configured Esplora so that the device name was sensible on OS/X and Linux. Windows still wanted to rename it COM5 etc.
 
I have a teensy 2.0 ++ powering an arduniome successfully. I used the vanilla arduinome firmware and just had to match up the pins to the unsped logic shield I'm using. I haven't messed with the adadfruit trellis so don't know how that works.
 
Status
Not open for further replies.
Back
Top