1

I have a diplay w/ touch functionality, that communicates via either I2C, SPI or Serial (datasheet).

I want to use it in a mono-application.
The display has sufficient power and is connected correctly (triple-checked). As described in the specs it defaulted to some sort of terminal mode after boot and should display any chars it received via its interface.

To get to talk to it I've listed all 66 or so serial-ports known to arch and tried to open each.
As expected only /dev/ttyAMA0 could be opened. I set the baudrate from within the program and tried to communicate, but didn't get any results.

What am I missing?
Do I need to do any more preperations?

  • You say you want to use it in a MONO application. But you have no C#/VB code here at all? – Piotr Kula Jun 3 '14 at 13:04
1

As always, when something goes wrong first try so simplify it: remove layers until you find two similar situations, one that works one that does not work.

In this case, you should probably try things like

stty </dev/ttyAMA0 # to show current port settings
stty </dev/ttyAMA0 9600 # or whatever baud rate, so stty --help or man stty for other options like 8bit, parity, hard or soft flow control
cat /dev/ttyAMA0 & # starts continuous monitoring of incoming data from device
echo "some interesting string" > /dev/ttyAMA0 # send some data to device

And see if you get some reaction from the device.

  • If you get normal reaction, trouble is in the upper layers, check the mono side.
  • If you get no normal reaction, trouble is in the lower layers, check the uart side.

Don't forget to kill the 'cat' after the experiment or it will interfere

killall cat

If protocol is non-ascii you may use od -t x1 instead of cat but beware of delay (it buffers some bytes before you get any visible output).

To output non-ascii you may need things like echo -e '\007\077\0377' (octal codes) or a perl one-liner.

1

I see in the datasheet you linked to that the levels are CMOS level not true RS232 level. Have you checked that the serial hardware you use on the Raspberry Pi accepts these non-RS232 levels ? See also https://raspberrypi.stackexchange.com/questions/12850/raspberry-pi-serial-communication .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.