marcobergman / remote_pilot

Raspberry-based (wired) remote control sending out Seatalk commands for a Raymarine tiller pilot, or custom commands for a TinyPilot / ray.py interface.
10 stars 1 forks source link

question on serial port / uart #4

Open 1e-seizoen opened 3 years ago

1e-seizoen commented 3 years ago

Hi,

First of all thanks for sharing this code.
Second I would call this entry a question rather than an issue, but as i am new on github, i'm not sure what is the correct channel for questions. Apologies if this is the wrong channel for questions.

As i understand, most pi models have a full uart (PL011) and a 'mini' uart. Since I use a pi 3B and prefer to continue using bluetooth, my full uart is reserved for the on-board bluetooth.
I also understand that the mini uart does not support parity, which however is needed for seatalk1. rpi 3b;

Hence my questions;

  1. Would this work with the mini uart; I guess not.
  2. Would this work with a USB-to-serial dongle (e.g. PL2303 based). In which case do i only have to change the serial port definition from /dev/serial0 to the usb tty?
  3. Or is the easier option to use a usb bluetooth dongle and use the PL011 uart for seatalk?

Thanks for advising, Wim

marcobergman commented 1 year ago

Apology! I did not see this until now. I am afraid I don't know the answer to any of your questions, but if you found out in the meantime, please share!

marcobergman commented 1 year ago

I did find these notes I took at the time: https://github.com/pyserial/pyserial/issues/196 /dev/ttyS0 of Raspberry Pi 3 Model B does not support EVEN and ODD. So, you need to use /dev/ttyAMA0. However /dev/ttyAMA0 of Raspberry Pi 3 Model B is bound to Bluetooth module. In order to use /dev/ttyAMA0, you need to add the followings line into /boot/config.txt.

dtoverlay=pi3-miniuart-bt After reboot, you can use /dev/ttyAMA0 as physical serial port.