OpenMarine
Set up issues. One SD card works. Another doesn't - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18)
+--- Thread: Set up issues. One SD card works. Another doesn't (/showthread.php?tid=4113)



Set up issues. One SD card works. Another doesn't - mgrouch - 2022-06-19

I have one BBN OS SD card working with pypilot. I think it was set up by Sean.
More recent version doesn't work.
PyPilot doesn't find motor controller although I can see it's probing /dev/ttyAMA0 port where controller is connected.
pypilot_hat also doesn't do anything when it starts on second SD card.

On the working image I see .pypilot/servodevice
and .pypilot/nmea0device configuration files. I can't find anything in docs about those files.
Here is content of those files.


Code:
cat servodevice
["\/dev\/ttyAMA0",38400]




Code:
cat nmea0device

["\/dev\/serial\/by-id\/usb-1a86_USB2.0-Serial-if00-port0",38400]




There is also whole ugfxfonts directory in
.pypilot

Nothing is said in docs about it.

Pypilot starts and shows heading fine in both cases.
However on second SD card image it doesn't find pypilot hat and even doesn't find motor controller.

We have included
/dev/ttyAMA0 into pypilot probing list. And disabled hci service to disable bluetooth.

Should we add

dtoverlay=disable-bt

into /boot/config.txt for pi4?

Any other clues to make servo and pypilot hat working?

We do have two SD cards. Config on another is working and config on second one is not fully working.
There is no (or we couldn't find) error messages in second case. IMU is fine. SignalK connection is fine.

Motor controller and HAT are not fine.


We are lost at this point.

Thanks for helping


RE: Set up issues. One SD card works. Another doesn't - stelian - 2022-06-19

Hi,

servodevice and nmea0device are created automatically as the code detects the motor controller (on the internal serial port) and an external NMEA device (on an USB serial adapter)

ugfxfonts contains the LCD fonts, is it also created automatically, no need to worry about it

And finally, yes you are correct about dtoverlay=disable-bt which needs to be present into /boot/config.txt (because if it isn't, the serial port is connected to the internal bluetooth chip present of the PI board, so you want to disable that).

You may also need to activate spi and i2c, which are also set into /boot/config.txt:

dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on
dtoverlay=disable-bt

Good luck !


RE: Set up issues. One SD card works. Another doesn't - mgrouch - 2022-06-20

Is

dtparam=i2s=on

really required?

Thanks


RE: Set up issues. One SD card works. Another doesn't - stelian - 2022-06-20

I don't think so, it's probably useful only to external i2s (audio) devices. I have this by default in my config.txt, not sure where it came from...


RE: Set up issues. One SD card works. Another doesn't - seandepagnier - 2022-06-20

You can test that the serial port is set correctly with:
ls -l /dev/serial0

It must point to /dev/ttyAMA0

As for the hat, ensure the pypilot_hat service is running. If you can connect (localhost:33333) or find it in ps aux | grep pypilot_hat, but the screen doesnt display, you may want to edit ~/.pypilot/hat.conf to correct the driver if it did not detect it.