DIY monome compatible grid w/ Adafruit NeoTrellis

Thanks on the LED thing - I thought that’s what it would be!

Looking at the port config, this is what I see:


Does this seem right?

Using the Arduino IDE Serial Monitor I can see that button presses indeed cause serial communication. I installed a COM sniffer and got the following on random button presses when opening the device from the sniffer:

00000086|2020-06-05 08:11:10,8821223|+0,7011613|IRP_MJ_READ|UP|0x00000102|21 03 00 |!..|
00000088|2020-06-05 08:11:11,0801440|+0,1975726|IRP_MJ_READ|UP|0x00000102|20 03 00 | ..|
00000090|2020-06-05 08:11:14,7869764|+3,7067970|IRP_MJ_READ|UP|0x00000102|21 06 06 |!..|
00000092|2020-06-05 08:11:15,0121115|+0,2251029|IRP_MJ_READ|UP|0x00000102|20 06 06 | ..|
00000094|2020-06-05 08:11:15,4932107|+0,4810698|IRP_MJ_READ|UP|0x00000102|21 08 06 |!..|
00000096|2020-06-05 08:11:15,7174669|+0,2241464|IRP_MJ_READ|UP|0x00000102|20 08 06 | ..|
00000098|2020-06-05 08:11:15,9995250|+0,2814511|IRP_MJ_READ|UP|0x00000102|21 09 04 |!..|
00000100|2020-06-05 08:11:16,1975568|+0,1979924|IRP_MJ_READ|UP|0x00000102|20 09 04 | ..|
00000102|2020-06-05 08:11:17,1738970|+0,9763108|IRP_MJ_READ|UP|0x00000102|21 0a 02 |!..|
00000104|2020-06-05 08:11:17,3438142|+0,1698731|IRP_MJ_READ|UP|0x00000102|20 0a 02 | ..|

Other than that I tried sniffing while restarting the serialoscd service (with and without opening the device from the sniffer) and cannot see any ongoing communication other than the device connecting.

00000000	2020-06-05 08:19:50,6219408		PnP Event: Connect	DOWN	0x00000000	5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 …	\.?.?.\.U.S.B.#.V.I.…

But to be honest I’m not sure I’m doing this right.

00000000|2020-06-05 08:28:12,8276411||PnP Event: Connect|DOWN|0x00000000|5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 …|\.?.?.\.U.S.B.#.V.I.…
00000001|2020-06-05 08:28:12,8276758|+0,0000347|IRP_MJ_CREATE - process 16668 (Studio.exe)|DOWN|0x00000000|||
00000002|2020-06-05 08:28:12,8277239|+0,0000481|IRP_MJ_CREATE|UP|0x00000000|||
00000019|2020-06-05 08:28:12,8303765|+0,0000079|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE|DOWN|0x00000000|00 c2 01 00 |....|
00000020|2020-06-05 08:28:12,8333531|+0,0029766|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE|UP|0x00000000|||
00000021|2020-06-05 08:28:12,8333596|+0,0000065|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_RTS|DOWN|0x00000000|||
00000022|2020-06-05 08:28:12,8333615|+0,0000019|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_RTS|UP|0x00000000|||
00000023|2020-06-05 08:28:12,8333684|+0,0000069|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR|DOWN|0x00000000|||
00000024|2020-06-05 08:28:12,8342937|+0,0009253|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR|UP|0x00000000|||
00000025|2020-06-05 08:28:12,8343001|+0,0000064|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL|DOWN|0x00000000|00 00 08 |...|
00000026|2020-06-05 08:28:12,8373562|+0,0030561|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL|UP|0x00000000|||
00000027|2020-06-05 08:28:12,8373615|+0,0000053|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS|DOWN|0x00000000|00 00 00 00 36 42 |....6B|
00000028|2020-06-05 08:28:12,8373634|+0,0000019|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS|UP|0x00000000|||
00000029|2020-06-05 08:28:12,8373662|+0,0000028|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW|DOWN|0x00000000|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030|2020-06-05 08:28:12,8373673|+0,0000011|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW|UP|0x00000000|||
00000031|2020-06-05 08:28:12,8373716|+0,0000043|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS|DOWN|0x00000000|0a 00 00 00 00 00 00 00 00 00 00 00 0a 00 00 00 2c 01 00 00 |................,...|
00000032|2020-06-05 08:28:12,8373729|+0,0000013|IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS|UP|0x00000000|||
00000034|2020-06-05 08:28:25,7562630|+12,9188454|IRP_MJ_READ|UP|0x00000102|21 07 05 !..|
00000036|2020-06-05 08:28:25,9542996|+0,1979938|IRP_MJ_READ|UP|0x00000102|20 07 05 | ..|
00000038|2020-06-05 08:28:27,1595552|+1,2052309|IRP_MJ_READ|UP|0x00000102|21 07 04 |!..|
00000040|2020-06-05 08:28:27,3574773|+0,1978825|IRP_MJ_READ|UP|0x00000102|20 07 04 | ..|
00000042|2020-06-05 08:28:28,0537446|+0,6962420|IRP_MJ_READ|UP|0x00000102|21 07 02 |!..|
00000044|2020-06-05 08:28:28,1957698|+0,1419931|IRP_MJ_READ|UP|0x00000102|20 07 02 | ..|
00000046|2020-06-05 08:28:28,9538625|+0,7580688|IRP_MJ_READ|UP|0x00000102|21 05 02 |!..|
00000048|2020-06-05 08:28:29,0958580|+0,1419719|IRP_MJ_READ|UP|0x00000102|20 05 02 | ..|

Just for completeness’ sake, here’s the full traffic when connecting the device from the sniffer itself and then pressing a few random buttons.

Do you remember what buttons you were pressing. I think the data there should match (20 and 21 are button press/release) - the numbers after should be x,y

What seems to be missing is the connection handshake. I wonder if some delay in the startup process might help?

Here I’m pressing the buttons on the USB port side in sequence:

00000036|2020-06-05 09:06:16,6228518|+10,4613142|IRP_MJ_READ|UP|0x00000102|21 0f 07 |!..|
00000038|2020-06-05 09:06:16,8490056|+0,2261098|IRP_MJ_READ|UP|0x00000102|20 0f 07 | ..|
00000040|2020-06-05 09:06:18,3063087|+1,4572825|IRP_MJ_READ|UP|0x00000102|21 0f 06 |!..|
00000042|2020-06-05 09:06:18,5052583|+0,1989223|IRP_MJ_READ|UP|0x00000102|20 0f 06 | ..|
00000044|2020-06-05 09:06:19,1785046|+0,6732137|IRP_MJ_READ|UP|0x00000102|21 0f 05 |!..|
00000046|2020-06-05 09:06:19,3765226|+0,1979789|IRP_MJ_READ|UP|0x00000102|20 0f 05 | ..|
00000048|2020-06-05 09:06:20,0225827|+0,6460431|IRP_MJ_READ|UP|0x00000102|21 0f 04 |!..|
00000050|2020-06-05 09:06:20,2496342|+0,2270175|IRP_MJ_READ|UP|0x00000102|20 0f 04 | ..|
00000052|2020-06-05 09:06:20,9449810|+0,6952480|IRP_MJ_READ|UP|0x00000102|21 0f 03 |!..|
00000054|2020-06-05 09:06:21,1720252|+0,2270142|IRP_MJ_READ|UP|0x00000102|20 0f 03 | ..|
00000056|2020-06-05 09:06:21,6771319|+0,5050822|IRP_MJ_READ|UP|0x00000102|21 0f 02 |!..|
00000058|2020-06-05 09:06:21,8481642|+0,1710054|IRP_MJ_READ|UP|0x00000102|20 0f 02 | ..|
00000060|2020-06-05 09:06:22,6883306|+0,8401339|IRP_MJ_READ|UP|0x00000102|21 0f 01 |!..|
00000062|2020-06-05 09:06:22,8873053|+0,1989498|IRP_MJ_READ|UP|0x00000102|20 0f 01 | ..|
00000064|2020-06-05 09:06:23,7285196|+0,8411796|IRP_MJ_READ|UP|0x00000102|21 0f 00 |!..|
00000066|2020-06-05 09:06:23,8986632|+0,1701165|IRP_MJ_READ|UP|0x00000102|20 0f 00 | ..|

Looks ok, right?

I can try adding a delay in the code directly, right? Where should I place it?
There’s a commented out delay on line 142 of the main .ino file - should I try that one? Or at the end of setup()?

By the way: You rock for being so responsive - Thanks a whole lot!

Looks right.
I’ll have to look at the code tomorrow to make suggestions.

If you could dm me a dump of everything you get when you plug in, that might be helpful (maybe plug/unplug a couple times)

Missed a notification and real life got in the way yesterday - sorry for the delay.

Here is a dump from connecting/disconnecting a couple of times. studio.exe is the capturing tool. Note that this was done while listening in on studio.exe “artificially” opening serial communication.

00000000	2020-06-07 09:39:18,8619390		PnP Event: Connect	DOWN	0x00000000	5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 …	\.?.?.\.U.S.B.#.V.I.…
00000001	2020-06-07 09:39:45,1550581	+26,2931191	PnP Event: Disconnect	DOWN	0x00000000	5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 …	\.?.?.\.U.S.B.#.V.I.…
00000002	2020-06-07 09:39:48,2957015	+3,1406434	PnP Event: Connect	DOWN	0x00000000	5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 …	\.?.?.\.U.S.B.#.V.I.…
00000003	2020-06-07 09:39:49,3386964	+1,0429949	IRP_MJ_CREATE - process 8528 (studio.exe)	DOWN	0x00000000		
00000004	2020-06-07 09:39:49,3387462	+0,0000498	IRP_MJ_CREATE	UP	0x00000000		
00000007	2020-06-07 09:39:49,3388833	+0,0001265	IRP_MJ_CLOSE	DOWN	0x00000000		
00000008	2020-06-07 09:39:49,3390634	+0,0001801	IRP_MJ_CLOSE	UP	0x00000000		
00000009	2020-06-07 09:40:04,3229221	+14,9838587	PnP Event: Disconnect	DOWN	0x00000000	5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 …	\.?.?.\.U.S.B.#.V.I.…
00000010	2020-06-07 09:40:09,1077359	+4,7848138	PnP Event: Connect	DOWN	0x00000000	5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 …	\.?.?.\.U.S.B.#.V.I.…
00000011	2020-06-07 09:40:10,1337950	+1,0260591	IRP_MJ_CREATE - process 8528 (studio.exe)	DOWN	0x00000000		
00000012	2020-06-07 09:40:10,1338463	+0,0000513	IRP_MJ_CREATE	UP	0x00000000		
00000015	2020-06-07 09:40:10,1340017	+0,0001451	IRP_MJ_CLOSE	DOWN	0x00000000		
00000016	2020-06-07 09:40:10,1341002	+0,0000985	IRP_MJ_CLOSE	UP	0x00000000		
00000017	2020-06-07 09:40:46,3389171	+36,2048169	PnP Event: Disconnect	DOWN	0x00000000	5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 …	\.?.?.\.U.S.B.#.V.I.…
00000018	2020-06-07 09:40:49,2397458	+2,9008287	PnP Event: Connect	DOWN	0x00000000	5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 …	\.?.?.\.U.S.B.#.V.I.…
00000019	2020-06-07 09:40:50,2982572	+1,0585114	IRP_MJ_CREATE - process 8528 (studio.exe)	DOWN	0x00000000		
00000020	2020-06-07 09:40:50,2982984	+0,0000412	IRP_MJ_CREATE	UP	0x00000000		
00000023	2020-06-07 09:40:50,2985071	+0,0001992	IRP_MJ_CLOSE	DOWN	0x00000000		
00000024	2020-06-07 09:40:50,2991341	+0,0006270	IRP_MJ_CLOSE	UP	0x00000000		
00000025	2020-06-07 09:41:11,7470117	+21,4478776	PnP Event: Disconnect	DOWN	0x00000000	5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 …	\.?.?.\.U.S.B.#.V.I.…
00000026	2020-06-07 09:41:16,1995147	+4,4525030	PnP Event: Connect	DOWN	0x00000000	5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 …	\.?.?.\.U.S.B.#.V.I.…
00000027	2020-06-07 09:41:17,2414674	+1,0419527	IRP_MJ_CREATE - process 8528 (studio.exe)	DOWN	0x00000000		
00000028	2020-06-07 09:41:17,2415182	+0,0000508	IRP_MJ_CREATE	UP	0x00000000		
00000031	2020-06-07 09:41:17,2416794	+0,0001498	IRP_MJ_CLOSE	DOWN	0x00000000		
00000032	2020-06-07 09:41:17,2421645	+0,0004851	IRP_MJ_CLOSE	UP	0x00000000		

If I don’t connect using studio.exe, it’s just:
00000000 2020-06-07 09:52:34,9652835 PnP Event: Connect DOWN 0x00000000 5c 00 3f 00 3f 00 5c 00 55 00 53 00 42 00 23 00 56 00 49 00 … \.?.?.\.U.S.B.#.V.I.…

Just FYI I added some delays here and there (e.g. after Serial.begin), so the timings might be different from what you’d expect. Still, same results.

A couple of things I noticed:

When I install ftdibus drivers, the device is called “USB Serial Port”. With Windows native/Arduino “USB Serial Device”.

I also took a look at the serialosc source code.

Its Windows implementation is referring to a folder subfolder “LOCALAPPDATA” (with fallback APPDATA) “\Monome\serialosc” which it names “sosc_get_default_config_dir”. For me “%LOCALAPPDATA%\Monome\serialosc” exists, but it is empty. It also creates this folder should it not exist. Should there be a default config file here?

It is also looking for a registry key to enum the devices, it seems, “SYSTEM\CurrentControlSet\Enum\FTDIBUS”. This does not exist for me.

Playing around with the FTDI drivers right now to see if I can get it to run.

EDIT:
I think that might be it. Serialosc is looking for an enum called “FTDIBUS” in the registry to find the ID of the device. This enum is not (no longer?) there, even if FTDIBUS drivers are installed.

Not sure how to fix this. What would be the right place to find out?

Thank you very much, okyeron. I just sent an order to ponoko for a combination norns shield case and grid, chopped and screwed from your two design files. Had some trouble with the .dxf files changing scale on me when I converted to .ai, but I’m pretty sure I had it sorted based on known measurements. When they arrive (ETA July 1st) and I confirm that I scaled correctly, I’ll be happy to upload the .ai files.

Sorry for the dxf troubles - I find them to be a pain, but i suppose they’re platform agnostic.

I have .ai files if people want those (as I’m doing everything in illustrator anyways). Just gotta ask.

Hey, any chance I have to learn new skills I’ll take these days, so I was happy to do it. Besides, I was doing in multiple acrylics, so it was good practice to swap designs and combine to save on costs, it’s been an age since I did vector work.

So I’m actually not sure: does the teensy 3.2 actually use an FTDI chip and the drivers should actually work? Or is it using something else instead?

Teensy writes directly to the USB buffer so it’s not the same as the the monome hardware that uses an FTDI USB-serial converter chip

On a standard Arduino, when you transmit with Serial.print(), the bytes are transmitted slowly by the on-chip UART to a FTDI USB-serial converter chip. The UART buffers 2 bytes, so Serial.print() will return when all but the last 2 bytes have been sent to the FTDI converter chip, which in turn stores the bytes into its own USB buffer.
On a Teensy, Serial.print() writes directly into the USB buffer. If your entire message fits within the buffer, Serial.print() returns to your sketch very quickly.

I see. That explains it then. So on the other platforms serialosc is not reliant on FTDI specific stuff? Then I hope it’s only for device ID discovery that serialosc is using FTDI-specific stuff (registry keys, in that case).

Currently I’m attempting to build the Windows version of serialosc, but failing miserably. I can build it on Ubuntu just fine, but can’t manage to cross compile it. I also did not manage to install it (liblo) with either make natively, or with MSYS2 (libmonome).

If anyone has any tips on the most effective setup for this, it would be very much appreciated.

this is super far out of my depth, i’m sorry i can’t be more directly helpful --@artfwo might have some insights, though, as he worked on the windows serialosc improvements over the years.

the current version builds fine with msys2, but you also have to build liblo, libmonome, etc. in the msys environment.

make sure that libmonome is configured with --enable-embedded-protos=no as i recall having problems on windows if configured otherwise.

2 Likes

Thanks, that will help a lot!

Currently I am still stuck on liblo, as you’ve seen in the other thread.

Alright, as recommended by @tehn in the other thread, I have started with an implementation of serialoscd on python.

Currently the OSC receiving part is implemented, and I am working on the interaction on the serial side of things right now. Afterwards, I will put the two together, and also have autodetection of devices if possible, using a modified version of the com-port-listing from pyserial.

@okyeron: I hope it is ok if I contact you in case of questions around the serial communication?

3 Likes

pssst… Mouser has some (27) Neotrellis boards in stock right now.

2 Likes

Made my order with mouser! Super excited to build this and fates. Parts were supposed to be here Wednesday, but now they say tomorrow (friday) so I’m reading up getting ready for the build! Too bad I’m away this weekend!

1 Like

Adafruit is showing back in stock for buttons and driver pcbs

I just received a Grid 3D printed enclosure, but I am scratching my head about the flexi pcb, and the USB breakout…
I need advice on how to connect them to the Teensy. I never used a flexi-pcb.
I think I don’t need to solder the flexi, right? But how do I secure it to the teensy and hold everything in place?
Do you have any picture showing how they are held together?
thanks!