JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

RPi2 UART Baud Rate

Mon Dec 28, 2015 3:10 am

Raspberry Pi 2 B
Arch Linux kernel 4.1.13

I've read in this thread: viewtopic.php?t=113753&p=778141 near the end (page 6 I believe) about changing the UART speed to accomodate MIDI.

I would like to change the baud rate of /dev/ttyAMA0 to a nonstandard value of 31250 baud (for MIDI). I've edited /boot/config.txt and /boot/cmdline.txt as follows -
/boot/config.txt includes this:

Code: Select all

init_uart_clock=2441000
init_uart_baud=38400
dtparam=uart0_clkrate=3000000
/boot/cmdline.txt has this:

Code: Select all

bc2708.uart_clock=2441000
at the end of the line.

With or without this code, the bit timing of /dev/ttyAMA0 remains 38400 baud.

I know I can use a device like a MIDIsport USB MIDI interface, but I'd prefer to use the UART.

the output of dmesg | grep uart:

Code: Select all

[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1080 bcm2709.boardrev=0xa21041 bcm2709.serial=0xf617a3e7 smsc95xx.macaddr=B8:27:EB:17:A3:E7 bcm2708_fb.fbswap=1 bcm2709.uart_clock=2441000 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,38400 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,38400 elevator=noop bc2708.uart_clock=2441000
[    0.539350] bcm2709.uart_clock = 2441000
[    0.546127] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 83, base_baud = 0) is a PL011 rev2
[    9.233340] uart-pl011 3f201000.uart: no DMA platform data
The above looks like I've changed the UART clock, but measurement with a bitscope (sending a stream of upper case U characters) shows the baud rate to be that of 38400.

Any help greatly appreciated.

User avatar
karrika
Posts: 1063
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: RPi2 UART Baud Rate

Mon Dec 28, 2015 4:19 am

You have still 38400 bauds in your config.txt. Have you tried to set init_uart_baud=31250 ?

I am using 250000 as a non standard baud rate. So it works.

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Mon Dec 28, 2015 4:44 am

Yes, I did try to set the baud rate to 31250 with:

Code: Select all

stty -F /dev/ttyAMA0 31250
which returns an error message: stty: invalid argument '31250'

I also tried to set it with init_uart_baud=31250 in config.txt

My understanding was that using 38400 with the default UART clock of 3000000 would give 38400 and with the UART clock 2144000 the same setting should give close to 31250. My stty appears to reject nonstandard baud rates. I also tried this in /boot/cmdline.txt.

User avatar
karrika
Posts: 1063
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: RPi2 UART Baud Rate

Mon Dec 28, 2015 5:26 am

The stty does not understand non-standard baud rates. But setting them at boot time does not require running stty.

I also get the message: setting non-standard baud rates is deprecated when I try to set the speed fron C-code. But the default speeds set at boot time (clocks and baud) still works.

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Mon Dec 28, 2015 11:09 am

I've tried it several times and it does not work for me to set it to 31250 at boot time. When I try that (which I just now did), I measure the bit time at 52 uSec which is equivalent to 19200 baud, not 31250 (which should be 32 uSec). So there is something else that is happening that prevents this. I set the baud rate is 3 places, once in config.txt as

Code: Select all

init_uart_baud=31250
and twice on the single line in cmdline.txt as

Code: Select all

root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,31250 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,31250 elevator=noop bcm2708.uart_clock=2441000
I've also tried leaving the uart clock set to 3000000 with the baud set to 31250 and the results are always the same.

Are you using a Rpi or Rpi2? And what kernel? I've got an Rpi2B with Arch Linux kernel 4.1.13.

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Mon Dec 28, 2015 3:08 pm

Quite by accident, I discovered a workaround for this problem.

I found some python code someone blogged for testing a serial connection and from it I made a simple baud rate setting program.

Measuring the bit time (using bitscope) gives the desired result of 32 uSec per bit.

This appears to be a work around for the problem I am having.

The baud rate setting code is:

Code: Select all

#!/usr/bin/env python
import serial

ser = serial.Serial(
port='/dev/ttyAMA0',
baudrate = 31250,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=1
)
Once the program is run, it sets the baud rate to 31250 and leaves it that way. The UART clock settings in /boot/config.txt and /boot/cmdline.txt were removed to allow the default 3.0 MHz (3000000) clock.

danjperron
Posts: 3391
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: RPi2 UART Baud Rate

Mon Dec 28, 2015 11:44 pm

I was thinking the same way but in C.

mybaud.c

Code: Select all

include <stdlib.h>
#include <string.h>
#include <asm/termios.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>

int main(int argc, char * argv[])
{
struct termios2 tio;
int handle;
long baud;
char deviceName[256];

printf("argc = %d\n",argc);
if(argc!=3)
 {
   printf("usage:\n\tmybaud deviceName BaudRate\n");
   return  -1;
 }

strncpy(deviceName,argv[1],255);
baud = atol(argv[2]);
printf("Try to set %s to %d baud.\n",deviceName,baud);

handle = open(deviceName,O_RDWR);

ioctl(handle, TCGETS2, &tio);
tio.c_cflag &= ~CBAUD;
tio.c_cflag |= BOTHER;
tio.c_ispeed = baud;
tio.c_ospeed = baud;
ioctl(handle, TCSETS2, &tio);

close(handle);

return 0;
}
compile it

Code: Select all

gcc -o mybaud mybaud.c
and set the speed

Code: Select all

./mybaud /dev/ttyAMA0 31250
B.T.W. I do have my baud clock at 64M baud in config.txt

Code: Select all

init_uart_clock=64000000

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Tue Dec 29, 2015 4:49 am

That's interesting - are you using the serial port for MIDI? Have you had success?

I've just finished making a little adapter with an optoisolator and hooked it up to the Pi2. So far, I get garbage when I send messages with a MIDI controller keyboard. Can't say why yet, oscope says the signal looks clean so I can only assume that there's a baud rate problem. I've downloaded and compiled ttymidi which makes the serial port available as an ALSA recognized MIDI device that currently spews garbage data and doesn't play ZynAddSubFX (which does work with a MIDIsport 2x2). I will write something simple to just display the data as hex numbers. I'll work on this again tomorrow, hopefully with success.

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Tue Dec 29, 2015 4:00 pm

Some negative progress it seems.

Since I was able to compile and setup ttymidi and make ALSA connections to it, I thought it would be simple to get MIDI data from a keyboard into the Pi2 to (for example) play ZynAddSubFX or other MIDI capable synth. All I got was garbage, but I had started ttymidi without specifying baud rate. ttymidi defaults to 115200, so garbage would be expected. I tried to start it with 31250 specified as baud rate, but ttymidi issues an error message about non supported baud rate.

Since I have the source code, I'm considering finding the place where baud rate is set (or perhaps where all of the configuration of the port is done) and prevent that from executing. My hope is that I can set 31250 and then run ttymidi without it clobbering the previous baud rate setting.

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Wed Jan 06, 2016 3:33 pm

For the time being, I've given up on changing the UART baud rate to nonstandard 31250. I tried to modify ttymidi with no success. Since I really need only MIDI input to the Pi2, I've decided to just build a little PIC board to do baud rate conversion from a MIDI input to a serial (logic level) output at 115.2 kBaud sent to the Pi2 UART.

User avatar
karrika
Posts: 1063
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: RPi2 UART Baud Rate

Wed Jan 06, 2016 4:19 pm

Could it be that you still have a serial console active that is setting the baud rate to 38400?

User avatar
joan
Posts: 14195
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: RPi2 UART Baud Rate

Wed Jan 06, 2016 4:27 pm

JovianPyx wrote:For the time being, I've given up on changing the UART baud rate to nonstandard 31250. I tried to modify ttymidi with no success. Since I really need only MIDI input to the Pi2, I've decided to just build a little PIC board to do baud rate conversion from a MIDI input to a serial (logic level) output at 115.2 kBaud sent to the Pi2 UART.
It's not clear what you want to do on the Pi.

pigpio will bit bang midi baud rates.

Python bb_serial_read_open, bb_serial_read, and bb_serial_read_close

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Wed Jan 06, 2016 5:38 pm

joan wrote:
JovianPyx wrote:For the time being, I've given up on changing the UART baud rate to nonstandard 31250. I tried to modify ttymidi with no success. Since I really need only MIDI input to the Pi2, I've decided to just build a little PIC board to do baud rate conversion from a MIDI input to a serial (logic level) output at 115.2 kBaud sent to the Pi2 UART.
It's not clear what you want to do on the Pi.

pigpio will bit bang midi baud rates.

Python bb_serial_read_open, bb_serial_read, and bb_serial_read_close
I want to write MIDI synthesizer software in C, for use under Linux, but I also want to work with bare metal (also in C and assembly). ttymidi is a program that collects MIDI protocol data from a serial port (such as /dev/ttyAMA0) running at a standard baud rate and presents an ALSA compatible MIDI connector. With this and a hardware baud rate converter between MIDI input and the UART, I should be able to use hardware MIDI data from a MIDI controller keyboard or external PC running a sequencer. My thoughts are that for bare metal, a UART driver will be far easier to write than a driver for USB MIDI devices and my physical interface will still be 5 pin DIN MIDI. ttymidi runs under Linux so is not a serious option for bare metal. Both purposes would be served by a hardware baud rate converter.

I don't know enough about Python to do what I want, however I did find some Python code that would run the UART's tx pin at 31250 (although I am going by what I saw on my oscope in terms of timing, it looked like 31250, but I don't know if it's accurate enough for MIDI). I was unable to test MIDI in from an external device, since ttymidi initializes the UART through the open() function which it must do. This replaces the Python program's settings with a standard baud rate.

User avatar
karrika
Posts: 1063
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: RPi2 UART Baud Rate

Wed Jan 06, 2016 5:52 pm

The best option would be to add the few popular rates to the list of standard speeds in the kernel. Midi 31250 and DMX 250000 comes to mind.

StuartF
Posts: 30
Joined: Sun Feb 02, 2014 5:41 pm

Re: RPi2 UART Baud Rate

Wed Jan 06, 2016 9:56 pm

This has worked for me using the standard bcm2709.uart_clock=3000000 clock setting in cmdline.txt with the ttyAMA0 default removed.

It uses mmap to directly set the PL011 registers according to the ARM datasheet.

The datasheet can be found here.
http://infocenter.arm.com/help/topic/co ... p5_trm.pdf
Sections 3.3.5 & 3.3.6 cover the baud rate registers, including the calculation.


I have cut it from a class, so it may want a few more basic includes adding.

Code: Select all

#include <termios.h>
#include <sys/mman.h>
#include <errno.h>

//#define UART_BASE   0x20201000 // PL011 USART -->B+
#define	UART_BASE   0x3F201000 // PL011 USART (PI2B+)

int fd = 0;   
int mem_fd = 0;
int errsv = 0;

volatile unsigned* uart = NULL;
void* uart_map = NULL;
void* IBRD = NULL;
void* FBRD = NULL;
void* LCRH = NULL;
void* UARTCR = NULL;
void* UARTFR = NULL;

uint32_t brd = 0;

struct termios termios_s; // save for restore
struct termios termios_p;

fd = open( "/dev/ttyAMA0", O_RDWR | O_NOCTTY | O_NONBLOCK );

if( fd > 0 ) // set the configuration for the terminal
{
   tcgetattr( fd, &termios_s );

   cfmakeraw( &termios_p );

   termios_p.c_lflag &= ~ISIG;      // no signals 
   termios_p.c_lflag &= ~ICANON;   // no canonical mode
   termios_p.c_lflag &= ~ECHO;   // no echo input
   termios_p.c_lflag &= ~NOFLSH;   // no flushing on SIGINT
   termios_p.c_lflag &= ~IEXTEN;   // no input processing

   termios_p.c_cc[VMIN] = 0;
   termios_p.c_cc[VTIME] = 0;

   tcsetattr( fd, TCSADRAIN, &termios_p );

   // enable the mmap
   if( ( mem_fd = open( "/dev/mem", O_RDWR | O_SYNC ) ) < 0 )
   {
      fprintf( stdout, "can't open /dev/mem for mmap(). Did you use 'sudo' ?\n" );
      return;
   }

   uart_map = mmap( NULL, BLOCK_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, mem_fd, UART_BASE );

   close( mem_fd );

   if( uart_map == MAP_FAILED )
   {
      errsv = errno;
      fprintf( stdout,"uart mmap failed\n" );
      fprintf( stdout, "error %d %s\n", errsv, strerror( errsv ) );
   }
   else
   {
      uart = (volatile unsigned*)uart_map;
      UARTFR = (void*)( (uint32_t)uart + 0x18 );
      IBRD = (void*)( (uint32_t)uart + 0x24 );
      FBRD = (void*)( (uint32_t)uart + 0x28 );
      LCRH = (void*)( (uint32_t)uart + 0x2C );
      UARTCR = (void*)( (uint32_t)uart + 0x30 );

      // first, disable the uart and flush the fifos
      brd = 0x00;
      memcpy( UARTCR, &brd, 4 );

      // check for completion of any tx/rx
      memcpy( &brd, UARTFR, 4 );
      while( brd & 0x08 )
      {
         usleep( 1 ); // wait a bit
         memcpy( &brd, UARTFR, 4 );
      }

      brd = 6; // 3000000 / ( 16 * 31250 ) = 6.0
      memcpy( IBRD, &brd, 4 );
      brd = 0;
      memcpy( FBRD, &brd, 4 );
      brd = 0x70; // 8 bit data, FIFO enabled
      memcpy( LCRH, &brd, 4 );

      // enable uart, tex, rex etc.
      brd = 0x0301;
      memcpy( UARTCR, &brd, 4 );
   }
}
else
{   
   errsv = errno;
   fprintf( stdout,"/dev/ttyAMA0 access failed\n" );
   fprintf( stdout, "error %d %s\n", errsv, strerror( errsv ) );
   fd = 0;
}
Then use read and write using fd as the file.
e.g. to read to a buffer called 'data'

Code: Select all

int32_t i = 0;
i = read( fd, data, 128 );
if( i == -1 )
{
    errsv = errno;
    fprintf( stdout, "serial failed read\n" );
    fprintf( stdout, "error %d %s\n", errsv, strerror( errsv ) );
}
'i' will contain the number of bytes read.

Don't forget to tidy up once you have finished.

Code: Select all

if( uart_map ) munmap( uart_map, BLOCK_SIZE ); // close mmap

if( fd )
{
   tcsetattr( fd, TCSANOW, &termios_s ); // restore saved settings
   close( fd );
}

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Thu Jan 07, 2016 1:04 am

Thank you for posting that.

Funny that I see this just after completing the hardware baud rate converter which works like a champ - however, the C code you posted looks promising and I think I'll take another look at modifying how ttymidi opens /dev/ttyAMA0. At least I now know that my compiled ttymidi works. I'd far prefer to use a code method such as what you posted since the baud rate converter board is actually bigger than the Pi2. I already have a little opto-isolator board, so it's a matter of making your suggested changes to the source of ttymidi and give it a shot. I believe the method shown in those files is what the Python code uses, applying a divisor of 6 against the UART clock of 3000000 to get the nonstandard 31250 baud. I will post success/fail in this thread.

toucyy
Posts: 1
Joined: Tue Jan 05, 2016 7:20 am

Re: RPi2 UART Baud Rate

Thu Jan 07, 2016 9:57 am

I could success to get the midi message on RPI2 (kernel 4.1.15) with following way to change uart0_clock rate.

I used ttymidi.

1. linux/arch/arm/mach-bcm2709/include/mach/platform.h

Code: Select all

#define UART0_CLOCK      3692307
2. linux/arch/arm/boot/dts/bcm2708_common_dtsi

Code: Select all

		clk_uart0: [email protected] {
			compatible = "fixed-clock";
			reg = <2>;
			#clock-cells = <0>;
			clock-output-names = "uart0_pclk";
			clock-frequency = <3692307>;
3. kernel compile for RPI2 (kernel 4.1.15)
4. reboot RPI2
5. check if RPI2 receive the midi message with command below

Code: Select all

ttymidi -s /dev/ttyAMA0 -b 38400 -v &
**No additional comment are needed for /boot/config.txt **


I'm still investigating why this could work. clock rate is higher (not 2441406) but I could get 32us bit rate for MIDI message.

I believe it is valid for using uart0 for midi interface.

Now I'm checking if Both of No1 and No2 modification are needed.

I will inform later when i have time to look it.

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Thu Jan 07, 2016 11:48 am

Thanks, but I'm reluctant to modify the kernel. I use an already modified kernel (I downloaded, not compiled) because I use the Cirrus/Element14 audio board. If I can do it the way StuartF described, there's no need to modify the kernel.

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Thu Jan 07, 2016 5:25 pm

StuartF wrote:This has worked for me using the standard bcm2709.uart_clock=3000000 clock setting in cmdline.txt with the ttyAMA0 default removed.

It uses mmap to directly set the PL011 registers according to the ARM datasheet.
I've been able to resolve all of the compiler problems except for BLOCK_SIZE which is undefined. I read the man pages on mmap() function, but I don't understand what BLOCK_SIZE should be. Help?

StuartF
Posts: 30
Joined: Sun Feb 02, 2014 5:41 pm

Re: RPi2 UART Baud Rate

Thu Jan 07, 2016 7:39 pm

Sorry about that.

Code: Select all

#define BLOCK_SIZE		4096

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Thu Jan 07, 2016 8:29 pm

StuartF wrote:Sorry about that.

Code: Select all

#define BLOCK_SIZE		4096
Absolutely no need to apologize StuartF - with your helpful code, I've been able to modify ttymidi to run with a baud rate of 31250 and it works!! No more hardware baud rate converter needed.

I had to mess with the code a bit, VMIN needed to be set to 1, but all in all, what you posted was the answer I needed.

I send you my warmest "Thank You Sir".

Bernstein
Posts: 1
Joined: Fri Feb 12, 2016 3:10 pm

Re: RPi2 UART Baud Rate

Fri Feb 12, 2016 3:20 pm

JovianPyx wrote: I send you my warmest "Thank You Sir".
another "Thank you Sir!" from me

Got the same problem and spend way too many hours solving it. With the code provided above it´s finally running!

bubu53
Posts: 2
Joined: Tue Feb 09, 2016 5:38 pm

Re: RPi2 UART Baud Rate

Fri Feb 12, 2016 3:35 pm

Hi,

I tried for weeks to use Uart with speed > 115200 baud.
It was possible with an old pi and kernel 3.x but know with my up to date pi B 2, impossible to set UART more than 115200.

I set dtparam=uart0_clkrate=64000000 in config.txt.
I see it in dmesg
But when I try to speed up UART,
stty -F /dev/ttyAMA0 500000
stty: /dev/ttyAMA0: unable to perform all requested operations

Is it a bug of last version, or the version B of pi ?
Do you have any ideas ?

Regards,

JovianPyx
Posts: 50
Joined: Fri Nov 20, 2015 9:34 pm

Re: RPi2 UART Baud Rate

Thu Feb 25, 2016 5:17 pm

Raspberry Pi 2 B, Arch Linux kernel 4.1.13

Now that I have the console UART running at 31250 baud, I've been able to develop a MIDI polysynth that works - almost. The problem is that I had expected the MIDI data bytes to come to the read() function no quicker than one every 320 uSec. Given a period size of 8 frames at 44.1 ksps, I had been using the fact that a period is about 3.5 times as long as a 2 byte MIDI message to poll a message-ready flag, act on the message and clear the flag (before the next complete MIDI message arrives). However, because the MIDI bytes (I assume due to driver buffering) can come much closer together than one every 320 uSec, I am seeing the ready flag still set when the next MIDI message arrives. I wrote time-stamp code to prove it to myself and I see little bursts of bytes separated by between 3 and about 20 uSec. This results in the MIDI controller code seeing it's message-ready flag still set when another message is assembled.

I know that I can FIFO this to eliminate the problem superficially, but I'm concerned about the latency that's introduced by this buffering. Is anyone here aware of a way to eliminate the driver's buffering? I'm using non-canonical processing settings with c_cc[VMIN] and c_cc[VTIME] both set to zero. c_cc[VMIN] being zero stops read() from blocking so I have it in a tight loop watching for a return of more than zero, but the timing of the bytes (according to my timestamps is still the same at 3 to 20 uSec between bytes delivered by read(). I don't see a solution for this in this how-to: http://tldp.org/HOWTO/Serial-Programming-HOWTO/ but perhaps I just don't know what I'm looking for.

My question then becomes: How can I control the size of the buffer that the driver uses and (hopefully) set it to 1 character? Or am I on the wrong track?

----------- EDIT ADDENDUM -----------
One solution I thought of might be to (if possible) completely disable the interrupt driven kernel UART driver and code a way of using polling to access the UART in receive only mode. The code would run as part of my MIDI controller in an isolated core. This way, all buffering could be avoided. However, I'm not finding much information on how to do these things.

bimole
Posts: 6
Joined: Fri Mar 06, 2015 10:22 pm

Re: RPi2 UART Baud Rate

Mon Feb 29, 2016 9:22 am

Hi all,

I'm also trying to change the UART baud rate in order to MIDIfy my RPi 2 through RX & TX GPIO pins.
My previous attempt on RPi B+ was working with the well known cmdline.txt and config.txt hacks, but this does not seem to be so simple on RPi 2 unfortunately :x ...
I have now the 4.1.18 kernel on the NOOBS dist. I have tested many combinations of init_uart_clock, init_uart_baud and bcm2709.uart_clock without succes, even if bcm2709.uart_clock is effectively changing the clock rate (verified with dmesg | grep uart).
I've read the thread concerning this issue reported after the 4.0 kernel update but I must say that neither 4.1 nor 3.18 kernels were working accurately on my system with MIDI messages :( .
ttymidi always outputs shit (pitch bend change, programm change, unknown MIDI msg... but no note ON nor note OFF) on key strikes :x . It's incredibly frustrating since it was working like a charm with RPi mk1!

I've carefully read this thread but I'm not sufficiently qualified with coding to understand the trick proposed by StuartF which is apparently working.

So, what is the state of this hack ? Is there a chance to run it smooth and receive correct MIDI messages with ttymidi ?

Thank you in advance, your help is very appreciated!

JBF

Return to “Interfacing (DSI, CSI, I2C, etc.)”