Code Monkey home page Code Monkey logo

Comments (23)

superwhd avatar superwhd commented on July 17, 2024

Could you share the command line output when you failed to install OTBR?

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

Alright I start from the start:
git clone https://github.com/openthread/ot-br-posix (connected ethernet cable, eth0)
cd ot-br-posix
./script/bootstrap

(i check the logs, I cant see any errors)
INFRA_IF_NAME=eth0 ./script/setup
image
image
image
image
image

Well I can see now that modprobe: FATAL: Module ip6table_filter not found in directory /lib/modules/4.9.56 could be the main reason for my problem, please share your comments if this is the main reason.

Thanks

from ot-br-posix.

jwhui avatar jwhui commented on July 17, 2024

The error "FATAL: Module ip6table_filter not found in directory" indicates that the kernel module responsible for IPv6 firewalling is missing. Here's how you can fix it:

  1. Check Kernel Support:
  • IPv6 firewalling might not be compiled into your kernel. You can verify this by running:

    uname -r

    Then search online for your specific kernel version and see if it includes IPv6 firewall support.

  1. Load the Module (if supported):
  • If your kernel supports IPv6 firewalling, you can try loading the module manually using:

    sudo modprobe ip6_tables
  • Verify if the module loaded successfully with:

    lsmod | grep ip6

    This should show ip6_tables loaded.

  1. Reinstall iptables package:
  • A corrupted or missing iptables package could be the culprit. Reinstall it using your distribution's package manager:

    • Debian/Ubuntu:

      sudo apt install --reinstall iptables
    • RedHat/CentOS/Fedora:

      sudo yum reinstall iptables
  • This will ensure all necessary iptables components are installed correctly.

  1. Upgrade Kernel (last resort):
  • If none of the above work, consider upgrading your kernel to a version with built-in IPv6 firewall support. Upgrading the kernel is a more complex procedure, so make sure to research and back up your system before proceeding.

Additional Tips:

  • Always run these commands with sudo for administrative privileges.
  • If you're unsure about these steps, consult your distribution's documentation for specific instructions on managing iptables and kernel modules.

from ot-br-posix.

superwhd avatar superwhd commented on July 17, 2024

In the second screenshot:

cd : /root/ot-br-posix/build/otbr No such file or directory

This is also concerning. Could you check if the file exists?

If the file exists, then it implies it may not be configured with proper permission.
If the file doesn't exist, it implies you failed to build the otbr-agent.

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

Thanks for all the replies,
For ip6_tables i will have to install the kernel module (4.9).
/root/ot-br-posix/build/otbr No such file or directory ; I checked the build dir exists but its empty.
The directory has all the permissions.

If the build failed, then would it be safe to assume that ip6_tables is the main reason? or could there be any other reason?

Thanks

from ot-br-posix.

jwhui avatar jwhui commented on July 17, 2024

It would be helpful if you could provide the full build log in a text file. But I would start with fixing ip6_tables.

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

I agree, I tried to log the build to a text file but it only logged 4 lines.
I used the " filename >> log.txt" command
any suggestions?

from ot-br-posix.

jwhui avatar jwhui commented on July 17, 2024

Try to also capture both stdout and stderr:

command 2>&1 | tee -a output.log

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

bootstrap command log: bootstrap.log
script command log: eth0_script.log

PS: Has anyone tried setting up on the yocto sdk. I am able to add the recipe and build the image, but skeptical if the above procedures will run.

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

Well, I am trying to add the module ip6table_filter module but cant find the exact path in my menuconfig. Would any 1 of you guys be kind enough to let me know the correct file path.
Thanks!

Edit: I checked in my .config file ip6table_filter module does not exist.

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

UPDATE:
Hi guys,
I have added the ip6_tables in the my /lib/modules.. folder. and have inserted using insmod command.
image
I run ./script/bootstrap and notice the build directory is empty. I cant see any errors though.
bootstrap.log

I run INFRA_IF_NAME=wlan0 ./script/setup and uploaded the error log file for reference.
setup_wlan0.log

I also noticed a few more things, like failed services
image
I am not sure why dnsmasq fails here. I run on wlan1 interface and enable the bind-dynamic option.

systemctl status otbr-firewall.service
image

I am not sure why the services have failed.
Do you think its due my kernel specifications?
image

Please suggest me what I need to do in order to overcome this problem.

Thanks

from ot-br-posix.

superwhd avatar superwhd commented on July 17, 2024

As a quick workaround, you may try commenting out the firewall_uninstall and firewall_install in https://github.com/openthread/ot-br-posix/blob/main/script/setup and rerun the setup.

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

@superwhd Thanks for the quick reply, I tried and saw otbr and src in the build direcrtory. The issue right now seems to be the C++ internal compiler error.
image
Any ideas on why the error occurs?
setup_wlan0_v2.log

Any missing dependency or packages that I might need to install?

from ot-br-posix.

superwhd avatar superwhd commented on July 17, 2024
FAILED: src/dbus/client/CMakeFiles/otbr-dbus-client.dir/thread_api_dbus.cpp.o 
/usr/bin/c++  -DOTBR_ENABLE_BACKBONE_ROUTER=1 -DOTBR_ENABLE_BORDER_AGENT=1 -DOTBR_ENABLE_BORDER_ROUTING=1 -DOTBR_ENABLE_BORDER_ROUTING_COUNTERS=1 -DOTBR_ENABLE_DBUS_SERVER=1 -DOTBR_ENABLE_DHCP6_PD=0 -DOTBR_ENABLE_DNSSD_DISCOVERY_PROXY=1 -DOTBR_ENABLE_DNS_UPSTREAM_QUERY=1 -DOTBR_ENABLE_EPSKC=1 -DOTBR_ENABLE_LINK_METRICS_TELEMETRY=0 -DOTBR_ENABLE_NAT64=1 -DOTBR_ENABLE_NOTIFY_UPSTART=1 -DOTBR_ENABLE_PUBLISH_MESHCOP_BA_ID=1 -DOTBR_ENABLE_REST_SERVER=1 -DOTBR_ENABLE_SRP_ADVERTISING_PROXY=1 -DOTBR_ENABLE_SRP_SERVER_AUTO_ENABLE_MODE=1 -DOTBR_ENABLE_VENDOR_INFRA_LINK_SELECT=0 -DOTBR_MESHCOP_SERVICE_INSTANCE_NAME="\"OpenThread BorderRouter\"" -DOTBR_PACKAGE_NAME=\"OpenThread_BorderRouter\" -DOTBR_PACKAGE_VERSION=\"0.3.0-thread-reference-20230710-287-g5bba00e43e-dirty\" -DOTBR_PRODUCT_NAME=\"BorderRouter\" -DOTBR_SYSLOG_FACILITY_ID=LOG_USER -DOTBR_VENDOR_NAME=\"OpenThread\" -I/usr/include/dbus-1.0 -I/usr/lib/aarch64-linux-gnu/dbus-1.0/include -I../../include -I../../src -Ithird_party/openthread/repo/etc/cmake -I../../third_party/openthread/repo/etc/cmake -I../../third_party/openthread/repo/include -I../../third_party/openthread/repo/src/posix/platform/include -I../../third_party/openthread/repo/src -Wall -Wextra -Werror -Wfatal-errors -Wuninitialized -Wno-missing-braces -std=c++11 -MD -MT src/dbus/client/CMakeFiles/otbr-dbus-client.dir/thread_api_dbus.cpp.o -MF src/dbus/client/CMakeFiles/otbr-dbus-client.dir/thread_api_dbus.cpp.o.d -o src/dbus/client/CMakeFiles/otbr-dbus-client.dir/thread_api_dbus.cpp.o -c ../../src/dbus/client/thread_api_dbus.cpp
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,

Looks like your compiler had an internal issue and crashed. Is it possible to upgrade your compiler?

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

image
This is my current version 7.5.0.
If its possible then I will give it a try.
Let me know if anything else is needed or if you have any commands that can help me update my compilers.
Thanks

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

image
I have updated on gcc & g++ to 9.4.0 and tried to run once again but still the same error. Do you think I am missing any dependencies?

from ot-br-posix.

superwhd avatar superwhd commented on July 17, 2024

I haven't met a similar error before but this may be worth trying: https://stackoverflow.com/questions/30887143/make-j-8-g-internal-compiler-error-killed-program-cc1plus.

Let's see if you can find anything suspicious in dmesg.

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

EDIT: It checked the error could be due to less resources. I have 1GB RAM currently. How much more is needed to build successfully? How much RAM do you guys have in your system?

from ot-br-posix.

superwhd avatar superwhd commented on July 17, 2024

For development purpose I'd suggest to use a larger one. For raspberry pi I know that 8GB is enough but I don't know the minimum requirement.

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

Well, i am trying the stackoverflow link you shared and it seems to be complete.
image
I will now proceed with the next steps and keep you guys posted for new developments.

Thanks

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

Well I have flashed the rcp code in the the zigbee chipset connected to port ttyS2 and then updated the otbr-agent file
OTBR_AGENT_OPTS="-I wpan0 -B wlan0 spinel+hdlc+uart:///dev/ttyS2 trel://wlan0"
Then reboot the device.
sudo service mdns status is active.
sudo service otbr-agent status is activating.
sudo service otbr-web status is active.
sudo systemctl --failed shows the following failed status.
image

I see error at step 6: Verify RCP
sudo ot-ctl state
image
sudo ot-ctl reset also throws the same error.

Let me know if you guys have an idea of whats going wrong here. Maybe the rcp file is not correct?
Thanks

from ot-br-posix.

hassan-xy avatar hassan-xy commented on July 17, 2024

Guys its been 2 weeks. Please let me know if I am wrong somewhere. Also does it support linux yocto environement.

from ot-br-posix.

superwhd avatar superwhd commented on July 17, 2024

The error you got from sudo ot-ctl state indicates that otbr-agent is not running normally.

You may need to take a look at otbr-agent logs from /var/log/syslog.

from ot-br-posix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.