RPI2-GPIO
#1
I want to set up a serial connection from raspberry pi 2 bus but don't know what the device would be called in regards to /dev/tty*. It is wired correctly but because the raspberry pi is different to pine64 system the tutorial stopped there.
  Reply
#2
hi mus1c,  the answer to your question depends on whether the serial console has been enabled. It also depends on what you're going to use the PI end of things for. 

The Pine board is better, and the system is more consistent , and especially from a serial point of view. On the Pine uartx is ttySx ie  uart0 is ttyS0

On the PI the device is either serial0  or  ttyAMA0;  and this depends on whether serial is enabled and whether the serial console is enabled. You will want to read the PI forum posts (mine and others) and make sure you understand how to enable serial comm on the PI. 

You can use raspi-config to disable the serial console on the PI. You may also manually edit the config and command line files. Ultimately, if you want to use the serial uart pin(8) & pin(10) GPIO14 &GPIO15 for serial comm you will need to disable the serial console. 

The device is either serial0 , or ttyAMA0  depending.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#3
(09-21-2016, 02:58 PM)MarkHaysHarris777 Wrote: hi mus1c,  the answer to your question depends on whether the serial console has been enabled. It also depends on what you're going to use the PI end of things for. 

The Pine board is better, and the system is more consistent , and especially from a serial point of view. On the Pine uartx is ttySx ie  uart0 is ttyS0

On the PI the device is either serial0  or  ttyAMA0;  and this depends on whether serial is enabled and whether the serial console is enabled. You will want to read the PI forum posts (mine and others) and make sure you understand how to enable serial comm on the PI. 

You can use raspi-config to disable the serial console on the PI. You may also manually edit the config and command line files. Ultimately, if you want to use the serial uart pin(8) & pin(10) GPIO14 &GPIO15 for serial comm you will need to disable the serial console. 

The device is either serial0 , or ttyAMA0  depending.

is raspi-config built-in debian image?
  Reply
#4
(09-21-2016, 05:25 PM)mus1c Wrote: is raspi-config built-in debian image?

raspi-config is only for the Raspberry Pi. There is no such tool for the Pine64 (yet, although there was some work on a similar tool some time ago).
  Reply
#5
(09-21-2016, 05:25 PM)mus1c Wrote:
(09-21-2016, 02:58 PM)MarkHaysHarris777 Wrote: hi mus1c,  the answer to your question depends on whether the serial console has been enabled. It also depends on what you're going to use the PI end of things for. 

The Pine board is better, and the system is more consistent , and especially from a serial point of view. On the Pine uartx is ttySx ie  uart0 is ttyS0

On the PI the device is either serial0  or  ttyAMA0;  and this depends on whether serial is enabled and whether the serial console is enabled. You will want to read the PI forum posts (mine and others) and make sure you understand how to enable serial comm on the PI. 

You can use raspi-config to disable the serial console on the PI. You may also manually edit the config and command line files. Ultimately, if you want to use the serial uart pin(8) & pin(10) GPIO14 &GPIO15 for serial comm you will need to disable the serial console. 

The device is either serial0 , or ttyAMA0  depending.

is raspi-config built-in debian image?

Yes, raspi-config is a built-in for raspbian.  You may enable or disable the serial console on the PI with rasp-config;  or you may edit the /boot/config.txt and /boot/cmdline.txt files manually. When you get around to setting up the PI see me on irc chat and I'll help you. In the mean time you may of course visit the PI forum and read about configuring the uart on the PI to be either serial console or normal uart comm port.

You have more options open to you on the Pine board.  Leave the serial console alone uart0, ttyS0.  Only use ttyS0 for serial console.  For normal comm uart2, uart3, and uart4 are available ttyS2 ttyS3 and ttyS4.

Again, pls see me on the irc chat for assistance ;  also, you may visit the forum several of us have posted helps for using the serial uart ports ( I have one showing how to cross link two pines ( or PI(s) ) with a cat5 cable as medium.

PS We are in the process of building a pine-config tool ( similar in most respects to the raspi-config tool ) but it is not yet ready. Be watching the forum for news.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#6
(09-21-2016, 02:40 PM)mus1c Wrote: I want to set up a serial connection from raspberry pi 2 bus but don't know what the device would be called in regards to /dev/tty*. It is wired correctly but because the raspberry pi is different to pine64 system the tutorial stopped there.

The serial port on the pins 8 and 10 on the PI-2-BUS is UART2; it shows up in the Debian Linux systems as /dev/ttyS2.  This would be the PineA64's equivalent of the main serial port, which usually has the device-file /dev/ttyAMA0 on Raspberry Pi.

UARTs 0. 3, and 4 have pins available on the Euler and Expansion connectors, and UART1 is used for Bluetooth, and the device numbering for these follows the same pattern, /dev/ttyS0 thru /dev/ttyS4.
  Reply
#7
I want to thank everyone's hard work for answering a very difficult question. If anyone else is reading threads like this, please take the the time rate the people in the thread accordingly.
Let Pine64 rise,
mus1c
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  RPi.GPIO python module for Pine A64/A64+ aquilegia 98 129,305 12-15-2022, 08:40 PM
Last Post: Fadazo
  fm transmitter with gpio weasel18 2 4,731 09-10-2019, 04:28 AM
Last Post: desai_amogh
  How to use dts or other setup to declare gpio pin Interrupt (e.g. a button)? dkebler 1 3,531 06-12-2019, 10:37 AM
Last Post: dkebler
Lightbulb Sample GPIO codes highlighting RPi.GPIO-PineA64 and the PI bus MarkHaysHarris777 6 10,918 06-07-2019, 12:37 AM
Last Post: tllim
Star GPIO, SPI and I2C C++ Lib databit 7 11,012 02-04-2019, 05:45 AM
Last Post: Jeff R
Information Howto: Controlling Pine64 GPIO via the filesystem (sysfs) on linux pfeerick 4 11,735 01-24-2019, 03:36 AM
Last Post: Fifth
  GPIO and SPI SamR1 20 31,078 03-15-2018, 10:32 AM
Last Post: jomoengineer
Question GPIO shockr 7 14,545 03-11-2018, 01:52 AM
Last Post: jomoengineer
  Read GPIO problem shworker 14 20,828 08-17-2017, 01:21 PM
Last Post: martinayotte
  GPIO fiq capability joseph 3 5,989 11-10-2016, 06:07 PM
Last Post: joseph

Forum Jump:


Users browsing this thread: 1 Guest(s)