I followed the instructions here to disable Bluetooth so that
/dev/ttyAMA0 is available, which it is.
I wrote a small Python script to open
/dev/ttyAMA0 and send some random data, and I could receive this data just fine on another computer.
Using .NET Framework and Mono, however, was not as successful.
I initially wrote a simple console application which just lists available ports with
SerialPort.GetPortNames(). This just displays
/dev/ttyS0, which is the Mini UART port with all its limitations.
I tried connecting to
/dev/ttyAMA0, even though it doesn't appear in the list, and this seems to work and I can write and read from it. Though, because it doesn't appear in
GetPortNames() I can't use some validation code to check that the port name the user has entered actually exists. And I'm sure this will come back to bite me at some point with something else that suddenly doesn't work as expected.
Why can't Mono see