Compile success on Rpi Zero, 3+,4
Hi,
I success to fix the some problems i had and i m enjoy to share it here.
I notice there is a small bug (?) about the channel :
Its say that the value of channels can be in range from 0 to 127 but when i try to define a channel higher than 10 there is an error message who say "More than one valid value parsed from string '
Details : a. I have tested on Rpi 3+, 4 and Zero. b. I have used the distro Buster Lite. c. I have install all requierements :
- sudo raspi-config and enable SPI interface
- reboot
- git cmake build-essential libtclap-dev pkg-config
d. WiringPi git clone https://github.com/WiringPi/WiringPi.git cd WiringPi sudo ./build sudo ldconfig
cd WiringPi/examples make really-all sudo ./serialRead sudo ./serialTest If all is ok, you dont have to get error.
e. PIGPIO sudo apt-get install pigpio python-pigpio python3-pigpio Test : sudo /usr/bin/pigpiod -v
f. RF24 Its look that there is several packages to RF24. I have used this one : git clone https://github.com/tmrh20/RF24.git RF24
-- If you use an RPI4, modify ./configure file :
BCM2835)
flags="-marm -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard"
Replace by :
BCM2835)
flags=""
cd RF24
./configure
Result for PIZero for example :
[OK] machine detected: SoC=BCM2835, Type=RPi, CPU=armv6l.
[SECTION] Detecting DRIVER
[OK] DRIVER detected:RPi.
mkdir build
cd build
cmake ..
make
sudo make install
g. Compilation of NerfNet git clone https://github.com/aarossig/nrfnet cd nerfnet mkdir build cd build cmake .. make -j4 no warning, perfect.
---- Execution ------
- I have done 1 iso image and recover on SDCard. 1 for the primary and 1 for the secondery
Just to be sure, i reboot it
!!!! Be aware about the wirerings of the module Nrf24L01 and the gpio. Easy to do a mistake.
i have tried the commands :
On each RPI, prepare the command lines :
sudo ./nerfnet --secondary
I: tunnel 'nerf0' opened
I: tunnel 'nerf0' up
I: tunnel 'nerf0' configured with '<ip>' mask <netmask>'
sudo ./nerfnet --primary
I: tunnel 'nerf0' opened
I: tunnel 'nerf0' up
I: tunnel 'nerf0' configured with '<ip>' mask <netmask>'
Check if the tunnel interface is open on both side with the correct ip
sudo ifconfig nerf0
from primary, ping the seconday ip
ping 192.168.10.2
if you got ping answer, its means all is ok.
---- Now, for sure there is some tuning to do here.
Happy to share.
Thanks for the report. I have never tried this on a zero v1.1 - this was tested on a Pi 4.
It is possible that there could be compatibility issues. If you find a solution, I would gladly accept a pull request. I don't have a Pi Zero at the moment to test with or validate a fix on, unfortunately.
Hi Ansrew,
REally appreciate getting an answer.
I'm actually trying with another distro of Raspbian. For sure I will update you.
You have done amazing work. Thank you so much
Very best regards Alexander COSTE
On Wed, Jul 20, 2022 at 1:44 PM Andrew Rossignol @.***> wrote:
Thanks for the report. I have never tried this on a zero v1.1 - this was tested on a Pi 4.
It is possible that there could be compatibility issues. If you find a solution, I would gladly accept a pull request. I don't have a Pi Zero at the moment to test with or validate a fix on, unfortunately.
— Reply to this email directly, view it on GitHub https://github.com/aarossig/nrfnet/issues/6#issuecomment-1189853018, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWF6AKWJQWQPZBDRVCWIGTVU6G27ANCNFSM54AJLFYQ . You are receiving this because you authored the thread.Message ID: @.***>
Hi alcane2011. Thank you for your contribution. It has helped me for troubleshouting.
Were did you downloaded the distro Buster Lite? Is the standar raspbian one?
I am traying to set up the two versions (branch v2 and main) with a 4B RPi. Both compile with no error, but I get errors when starting the nerfnet:
leem@raspberrypi4b:~/nrf_test_v1/nrfnet/build/nerfnet/net $ sudo ./nerfnet --primary --ce_pin 8
I: tunnel 'nerf0' opened
I: tunnel 'nerf0' up
I: tunnel 'nerf0' configured with '192.168.10.1' mask '255.255.255.0'
./nerfnet: symbol lookup error: ./nerfnet: undefined symbol: _ZN4RF24C1Ettj
leem@raspberrypi4b:~/nrf_test_v2/nrfnet/build/nerfnet/net $ sudo ./nerfnet --ce_pin 8 --address 192.168.10.1
PARSE ERROR: Argument: (--address)
Couldn't read argument value from string '192.168.10.1'
Brief USAGE:
./nerfnet [--ce_pin <index>] [--channel <channel>] --address <address>
[--] [--version] [-h]
For complete USAGE and HELP type:
./nerfnet --help