UNSOLVED Installing DSF on a Banana-Pi-M3 with Raspbian OS
-
@bearer
The bananapi runs an ARMv7 processor, so it "should" work
Duet Software Framework resembles a collection of programs to control an attached Duet3D board from a Linux-based mini computer (SBC). Since it is using .NET Core, it requires an ARM processor that supports ARMv7 instructions processor is required
For clarity: I'm successfully running a banana-pi with DSF and i followed the guide the OP listed so im not sure why it worked for me but not him.
-
uname -a :
Linux bpi-iot-ros-ai 3.4.39-BPI-M3-Kernel #1 SMP PREEMT Sat May 26 10:03:38 UTC 2018 arm7l GNU/Linux
cat /proc/cpuinfo:
Processor : ARMv7 Processor rev 5 (v71) processor : 0 BogoMIPS : 4800 processor : 1 BogoMIPS : 4800 processor : 2 BogoMIPS : 4800 processor : 3 BogoMIPS : 4800 processor : 4 BogoMIPS : 4800 processor : 5 BogoMIPS : 4800 processor : 6 BogoMIPS : 4800 processor : 7 BogoMIPS : 4800 Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt CPU implementer : 0x41 CPU architecture : 7 CPU Variant : 0x0 CPU Part : 0xc07 CPU Revision : 5 Hardare : sun8i Revision : 0000 Serial : 50300102008add2ed0e
@CaLviNx
you say you have this running on a bananapi, would you be able to share your image if that is even possible.
-
I'm not sure how to do that!
My banana-pi is an older M2 (says its an ARMv7 too though)
EDIT: im running Debian not raspbian (dont know if that makes a difference or not)
-
@JayJay said in Installing DSF on a Banana-Pi-M3 with Raspbian OS:
Linux bpi-iot-ros-ai 3.4.39-BPI-M3-Kernel
That's not raspbian/raspios is it?
-
@bearer
well im not sure what its telling you, im a new user to linux in general , I just downloaded the version of raspbian from the bananapi forum my thinking was that if I used a bananapi version of raspbian I would have a better chance of success .
-
@JayJay you may be able to succeed with armbian
-
i will try it thank you
-
So progress or a sort.
two steps forward and five back...
I installed armbian THANK YOU @jay_s_uk which successfully allowed me to install DSF.
I set the buffer size as requested, and according to the bananapi docs the M3 has the same pinout as a Rpi.
I now get a new issue !!
When I run : sudo systemctl start duetcontrolserver
It outputs the following:Dec 20 19:30 bananapim3 DuetControlServer [724] : Started Duet control Server
Dec 20 19:30 bananapim3 DuetControlServer [724] : Duet control Server v3.1.1
Dec 20 19:30 bananapim3 DuetControlServer [724] : Written by Christian Hammacher for Duet3D
Dec 20 19:30 bananapim3 DuetControlServer [724] : Licensed under the terms of the GNU Public License Version 3
Dec 20 19:30 bananapim3 DuetControlServer [724] : [info] Settings Loaded
Dec 20 19:30 bananapim3 DuetControlServer [724] : [Info] Environment initialized
Dec 20 19:30 bananapim3 DuetControlServer [724] : [fatal] Could not connect to Duet (error 517. Cannot put line into event mode)And that then starts a loop
Ideas ?
-
You might need the gpio library used? (Sorry can't remember the name, but if you look for the loopback test thread i think it's mentioned there).
edit: found the reference when on computer, so maybe try
sudo apt-get install gpiod
? -
@bearer
I installed the library and still no go.
i invited a friend over who has a raspberry-pi (3b+) we plugged that in with a copy of official Raspbian image and that worked perfect, so i now know its not the Duet-3 .
i tried to get into armbian-config to set the spi but armbian-config->system->hardware throws up an error :
armbian-config hardware error expected at least 6 tokens for checklist have 4 use --help to list options. submodule.
-
@bearer
So i got raspbian to actaully install the DSF package but i now have an error which is evidently linked to the SPI connection not being activated.
As i get the following error
[Fatal] could not connecto to Duet (error 2 cannot open GPIO device file '/dev/gpiochip0/
I am not a linux user and I am not that good with coding so i really need a idiots step by step guide on what i need to do to enable the SPI
on the banana-pi (even with raspbian) there is NO section in raspi-config to enable the SPI
so im at a loss as to how i go about enabling it and i looked at some of the online guides on how to do this and i became very very lost as it is all greek to me.
i installed RPI.GPIO but how to actually use it and configure things again all greek to me.
is anyone able to advise ?
-
Thank you to those that tried to assist.
I am somewhat dissapointed that no-one from the duet team offered any assistance whatsoever.
The only option left is to run the board in standalone mode, i dont want to go with a raspberry pi.
-
@JayJay said in UNSOLVED Installing DSF on a Banana-Pi-M3 with Raspbian OS:
The only option left is to run the board in standalone mode, i dont want to go with a raspberry pi.
Out of interest why don't you want to use a raspberry pi?
-
@gloomyandy said in UNSOLVED Installing DSF on a Banana-Pi-M3 with Raspbian OS:
@JayJay said in UNSOLVED Installing DSF on a Banana-Pi-M3 with Raspbian OS:
The only option left is to run the board in standalone mode, i dont want to go with a raspberry pi.
Out of interest why don't you want to use a raspberry pi?
I feel it's a even worse a proposition than the bannana pi, I have used the raspberry pi for a lot of home automation projects that used raspbain and with that the GPIO thing was never an issue but hardware wise I found the raspberry pi's burned out very quickly, making them less cost effective.
So I was looking for an alternative to the raspberry pi I had high hopes for the bannana pi.
This being my first one it now seems I should just bite the bullet and pay once for the software/hardware to run all my home automation from a central win pc over a network.
From reading the forum many people are having connection issues with the Duet 3 to raspberry pi so I am getting the feeling the whole single board computer interface idea is more than a little half baked.
The lack of support from duet for anything other than a raspberry pi is as i said is dissapointing, and I know the reply to that will be "if you cant work it out on your own you should not be near it" and that too shows the attitude towards its users.
-
I'd be hesitant to say the Raspberries burn out quickly as a general statement, certainly doesn't match my experience.
But yes, single board computer interface is half baked and intended for OEMs and enthusiasts to build on. What is your end goal with the Pi, be it raspberry, banana, orange or whatnot?
-
This post is deleted! -
@JayJay Your last attempt looked good but I suspect you have to change the GPIO number for the transfer ready pin in
/opt/dsf/conf/config.json
(keyTransferReadyPin
). But because I currently don't have access to my BananaPi I can't tell you to which value.DSF uses the same GPIO driver like gpiod (i.e.
/dev/gpiochip*
), so I suggest you rungpioinfo
after installinggpiod
on your system. That should help you identify which GPIO# has to be set.You must have a /dev/gpiochip node on your system and adjust the DCS config, else DSF will not be able to communicate with the Duet.
-
I'm trying to do the same thing but using an OrangePi4B SBC (RK3399 SoC)
On this SBC, the pin 22 of the GPIO header is mapped to
GPIO0_B5
.
This SoC has 5 GPIO controllers.
Each controller controls 32 lines and each line is 32 bits.
So, in order to find the GPIO number of portGPIO0_B5
, I have to use this formula :0 * 32 + 1 * 8 + 5 = 56
(A=0, B=1, C=2, D=3, E=4).
Pin 22 (GPIO0_B5
) is GPIO number56
.
GPIO number 56 is also the line26
of the 2nd GPIO controller/dev/gpiochip1
.I tried to connect a wire from pin 1 (3.3V) to pin 22 and use
gpioget gpiochip1 26
. I got 0 while not connected and 1 while connected so that's ok.I also had to change the SPI device because SPI bus 1 is exposed on pins 19, 21, 23 and 24.
Also needed to decreaseSpiBufferSize
.I modified
/opt/dsf/conf/config.json
as follows:"SpiDevice": "/dev/spidev1.0", "SpiBufferSize": 4096, "SpiTransferMode": 0, "SpiFrequency": 8000000, "SpiConnectTimeout": 500, "SpiTransferTimeout": 500, "SpiConnectionTimeout": 4000, "MaxSpiRetries": 3, "SpiPollDelay": 25, "GpioChipDevice": "/dev/gpiochip1", "TransferReadyPin": 26,
But I still have no luck with communication.
Aftersystemctl restart duetcontrolserver.service
, I get the following error injournalctl -xe
:Jan 28 21:45:23 orangepi4 DuetControlServer[2311]: [fatal] Could not connect to Duet (Timeout while waiting for transfer ready pin) Jan 28 21:45:23 orangepi4 DuetControlServer[2311]: [debug] System.OperationCanceledException: Timeout while waiting for transfer ready pin Jan 28 21:45:23 orangepi4 DuetControlServer[2311]: at DuetControlServer.SPI.DataTransfer.WaitForTransfer(Boolean inTransfer) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetCo Jan 28 21:45:23 orangepi4 DuetControlServer[2311]: at DuetControlServer.SPI.DataTransfer.ExchangeHeader() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/SPI/Dat Jan 28 21:45:23 orangepi4 DuetControlServer[2311]: at DuetControlServer.SPI.DataTransfer.PerformFullTransfer(Boolean connecting) in /home/christian/Duet3D/DuetSoftwareFramework/src/Du Jan 28 21:45:23 orangepi4 DuetControlServer[2311]: at DuetControlServer.SPI.DataTransfer.Init() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/SPI/DataTransfer. Jan 28 21:45:23 orangepi4 DuetControlServer[2311]: at DuetControlServer.Program.Main(String[] args) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Program.cs:li Jan 28 21:45:23 orangepi4 systemd[1]: duetcontrolserver.service: Failed with result 'protocol'. Jan 28 21:45:23 orangepi4 systemd[1]: Failed to start Duet Control Server.
Not sure what I miss here.
EDIT:
I also tried"TransferReadyPin": 56,
just in case ...
But I get the following error :Jan 28 22:07:48 orangepi4 DuetControlServer[2403]: [fatal] Could not connect to Duet (Error 22. Cannot put line into event mode.)
So I think the
TransferReadyPin
configuration is correct. -
Please check out my last post, you must use the
gpioinfo
utility to find the right GPIO device + number. Decreasing the SPI buffer size is a really bad idea because that requires a custom RRF build, without that the communication may fail unexpectedly whenever large chunks of data are transferred. See here for the right way to configure the SPI buffer size under Linux.PS: If the line cannot be put into event mode, it's probably already allocated by something else (e.g. the sysfs driver) and
gpioinfo
will report it as[used]
. In that case you must free it before DCS can use it. -
@chrishamm I don't understand how
gpioinfo
could help me.
I decreased the SPI buffer size because I had a warning about it but I will check later how to increase that.Also, I think the line cannot be put in event mode because 56 is an invalid number for gpiochip1. It's only 0 to 31 because it only have 32 lines.