Giter VIP home page Giter VIP logo

Comments (21)

bukepo avatar bukepo commented on May 23, 2024

I think so.

Fedora uses rpm other than dpkg as package manager, dependencies cannot be installed through script/bootstrap. However, I think you may add scripts to install dependencies with rpm within install_packages_rpm() in script/bootstrap.

The code itself doesn't depend on dpkg. After filling the scripts to install dependencies, it may build successfully following the README.md.

from ot-br-posix.

beriberikix avatar beriberikix commented on May 23, 2024

It's worth noting that according to the Artik 5 datasheet the current 520 module uses the EM3587, which is not supported by OpenThread nor does it use the open standardized Spinel protocol.

from ot-br-posix.

taotaodong527 avatar taotaodong527 commented on May 23, 2024

That's ture that current 520 module uses the EM3587。
Actually we have a plan to use CC2538 which is supported by OpenThread connected with ARTIK520 using /dev/ttyUSB0.
How do you think?

from ot-br-posix.

beriberikix avatar beriberikix commented on May 23, 2024

Ya, that should work if you follow @bukepo's suggestion.

from ot-br-posix.

taotaodong527 avatar taotaodong527 commented on May 23, 2024

Thanks for your reply.
With @bukepo's suggestion, I modify the bootstrap scripts and it seems that all the dependencies are successfully installed(including CppUTest and uncrustify-0.64);
Running setup scripts, below error occurs (with root):
[root@localhost script]# ./setup
Current platform is fedora
---------------start otbr uninstall-----------------------
/bin/systemctl
Failed to stop otbr-web.service: Unit otbr-web.service not loaded.
Failed to stop otbr-agent.service: Unit otbr-agent.service not loaded.
Failed to stop wpantund.service: Unit wpantund.service not loaded.
Failed to get unit file state for otbr-web.service: No such file or directory
Failed to get unit file state for otbr-agent.service: No such file or directory
Failed to get unit file state for wpantund.service: No such file or directory
otbr-web: no process found
otbr-agent: no process found
/bin/systemctl
--------------start wpantund unistall-----------------------
wpantund: no process found
-----------------start nat64_uninstall---------------------------
-----------------start nat64_stop---------------------------
/bin/systemctl
Failed to stop tayga.service: Unit tayga.service not loaded.
/bin/systemctl
otbr-nat44.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig otbr-nat44 off
which: no update-rc.d in (/home/development/OpenThread/borderrouter-master/._stage/usr/bin:/home/development/OpenThread/borderrouter-master/._stage/usr/sbin:/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
-----------------start ipforward_uninstall---------------------------
removed ?.etc/sysctl.d/60-otbr-ip-forward.conf?
-----------------start ipforward_install---------------------------
net.ipv6.conf.all.forwarding = 1
net.ipv4.ip_forward = 1
-----------------start nat64_install---------------------------
. /lib/lsb/init-functions
. /lib/init/vars.sh
case "$1" in
start)
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop|status)
# No-op
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
/bin/systemctl
Failed to stop tayga.service: Unit tayga.service not loaded.
*** ERROR: Unable to stop tayga service!

from ot-br-posix.

bukepo avatar bukepo commented on May 23, 2024

could you please run these scripts with a normal user whose has sudo privilege? These scripts will run sudo to get root access when needed.

from ot-br-posix.

taotaodong527 avatar taotaodong527 commented on May 23, 2024

Thanks, I will have a try.

from ot-br-posix.

taotaodong527 avatar taotaodong527 commented on May 23, 2024

Hi bukepo,I have tried running the scripts with normal user "usr". Unfortunately,I still meat the problem below:
[usr@localhost script]$ ./setup
Current platform is fedora
---------------start otbr uninstall-----------------------
/bin/systemctl
[sudo] password for usr:
Failed to stop otbr-web.service: Unit otbr-web.service not loaded.
Failed to stop otbr-agent.service: Unit otbr-agent.service not loaded.
Failed to stop wpantund.service: Unit wpantund.service not loaded.
Failed to get unit file state for otbr-web.service: No such file or directory
Failed to get unit file state for otbr-agent.service: No such file or directory
Failed to get unit file state for wpantund.service: No such file or directory
otbr-web: no process found
otbr-agent: no process found
/bin/systemctl
--------------start wpantund unistall-----------------------
wpantund: no process found
-----------------start nat64_uninstall---------------------------
-----------------start nat64_stop---------------------------
/bin/systemctl
Failed to stop tayga.service: Unit tayga.service not loaded.
/bin/systemctl
otbr-nat44.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig otbr-nat44 off
which: no update-rc.d in (/home/usr/openthread/borderrouter-master/._stage/usr/bin:/home/usr/openthread/borderrouter-master/._stage/usr/sbin:/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
-----------------start ipforward_uninstall-------------------------
removed ‘/etc/sysctl.d/60-otbr-ip-forward.conf’
-----------------start ipforward_install---------------------------
net.ipv6.conf.all.forwarding = 1
net.ipv4.ip_forward = 1
-------------------start nat64_install---------------------------
. /lib/lsb/init-functions
. /lib/init/vars.sh

case "$1" in
start)
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop|status)
# No-op
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
/bin/systemctl
Failed to stop tayga.service: Unit tayga.service not loaded.
*** ERROR: Unable to stop tayga service!
Anything else could I have a try? Is it possible to share with the correct bootstrap and setup log file?

from ot-br-posix.

bukepo avatar bukepo commented on May 23, 2024

I tried on fedora 22, finding that how fedora manages tayga is quite different from debian-based system. Are you going to use NAT64? If not, you may comment out the lines in scripts handling NAT64 configuration.
Here's the changes I made to make script/setup work.

diff --git a/script/bootstrap b/script/bootstrap
index 656b612..00fe902 100755
--- a/script/bootstrap
+++ b/script/bootstrap
@@ -73,7 +73,16 @@ install_packages_opkg()

 install_packages_rpm()
 {
-    echo 'rpm not supported currently' && false
+    sudo yum install -y gcc gcc-c++ libtool automake autoconf autoconf-archive git
+    sudo yum install -y cmake
+    sudo yum install -y dbus-devel
+    sudo yum install -y avahi avahi-devel
+    sudo yum install -y doxygen
+    sudo yum install -y ctags
+    sudo yum install -y boost-devel boost-filesystem boost-system
+    sudo yum install -y tayga iptables
+    sudo yum install -y jsoncpp-devel
+    sudo yum install -y wget
 }

 install_packages_brew()
diff --git a/script/setup b/script/setup
index 2e21d04..3372af2 100755
--- a/script/setup
+++ b/script/setup
@@ -41,11 +41,11 @@ main()
     . $BEFORE_HOOK
     otbr_uninstall
     wpantund_uninstall
-    nat64_uninstall
+    #nat64_uninstall
     ipforward_uninstall

     ipforward_install
-    nat64_install
+    #nat64_install
     wpantund_install
     otbr_install
     . $AFTER_HOOK

However, if you are going to use NAT64, you may have to manually configure tayga(refer to https://github.com/openthread/borderrouter/wiki/NAT64)for the moment, or you may refine the script script/_nat64 to support handling tayga in fedora.

from ot-br-posix.

taotaodong527 avatar taotaodong527 commented on May 23, 2024

@bukepo Thanks for your advice.
Now it seems that the wpantund,otbr-web,otbr-agent has been successfully started(I also checked with systemctl)
usr@localhost script]$ ./server
Current platform is fedora

  • Applying /usr/lib/sysctl.d/00-system.conf ...
    net.bridge.bridge-nf-call-ip6tables = 0
    net.bridge.bridge-nf-call-iptables = 0
    net.bridge.bridge-nf-call-arptables = 0
    kernel.shmmax = 4294967295
    kernel.shmall = 268435456
  • Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...
  • Applying /usr/lib/sysctl.d/50-coredump.conf ...
    kernel.core_pattern = |/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e
  • Applying /usr/lib/sysctl.d/50-default.conf ...
    kernel.core_uses_pid = 1
    net.ipv4.conf.default.rp_filter = 1
    net.ipv4.conf.all.rp_filter = 1
    net.ipv4.conf.default.accept_source_route = 0
    net.ipv4.conf.all.accept_source_route = 0
    net.ipv4.conf.default.promote_secondaries = 1
    net.ipv4.conf.all.promote_secondaries = 1
    fs.protected_hardlinks = 1
    fs.protected_symlinks = 1
  • Applying /etc/sysctl.d/60-otbr-ip-forward.conf ...
    net.ipv6.conf.all.forwarding = 1
    net.ipv4.ip_forward = 1
  • Applying /etc/sysctl.d/99-sysctl.conf ...
  • Applying /etc/sysctl.conf ...
    /bin/systemctl
    activating
    active
    activating

From https://github.com/openthread/borderrouter/wiki/NAT64), I am wondering how to get access to Thread Board Router Agent through a PC or mobile phone?
1.Where to configure the server address?
2.Is there any example Andoind smart phone application?

from ot-br-posix.

bukepo avatar bukepo commented on May 23, 2024

Could you please tell me more about your requirement? Do you mean how to configure address for NAT64 service?
Thread group provides a android app for commissioning. Is that what you are looking for?

from ot-br-posix.

taotaodong527 avatar taotaodong527 commented on May 23, 2024

@bukepo Thanks for your quckily reply.

  1. Assume that I have successfully running board router on my artik5 with cc2538 working as NCP connnected, I want to use the Web GUI to manage Thread network as metioned in https://github.com/openthread/borderrouter/wiki. What am I supposed to do?
    2.Yes. Android app for commissioning (from Thread Group) is what I am looking for. I will check with Thead Group. By the way, Could this commissioning app work with openthread board router?

from ot-br-posix.

bukepo avatar bukepo commented on May 23, 2024
  1. You should use the ethernet or WiFi IP address to access the web gui. You may check if the border router's 80 port is listening.
  2. Yes, openthread border router works with the latest commissioner app from Thread Group.

from ot-br-posix.

taotaodong527 avatar taotaodong527 commented on May 23, 2024

@bukepo
When I try to complie the NCP firmware for CC2538. I got the below problem with the latest openthread:
"automake: command not found",but I do installed the automake which version is 1.14.1.
dongtaotao@testbed-desktop:/development/openthread-master$ ./bootstrap
/home/INSRD/dongtaotao/development/openthread-master/third_party/nlbuild-autotools/repo/scripts/bootstrap: line 280: --automake: command not found
dongtaotao@testbed-desktop:
/development/openthread-master$ which automake
/usr/bin/automake
dongtaotao@testbed-desktop:/development/openthread-master$ automake --version
automake (GNU automake) 1.14.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl-2.0.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey [email protected]
and Alexandre Duret-Lutz [email protected].
dongtaotao@testbed-desktop:
/development/openthread-master$

from ot-br-posix.

jwhui avatar jwhui commented on May 23, 2024

@leomvp527, do you have libtool installed?

from ot-br-posix.

taotaodong527 avatar taotaodong527 commented on May 23, 2024

@bukepo
I complie the latest openthread with “make -f examples/Makefile-cc2538 TMF_PROXY=1 BORDER_ROUTER=1 DISABLE_DOC=1 JOINER=1” and download the ot-ncp-ftd.bin to CC2538DK。Then connected to ARTIK5,but I have not seen any ttyUSB* through “sudo dmesg | grep ttyUSB*”。But when checking with “cat /sys/kernel/debug/usb/devices”,message showed as below
[root@ usb]# cat /sys/kernel/debug/usb/devices
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 8 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0403 ProdID=a6d1 Rev= 7.00
S: Manufacturer=TI
S: Product=Texas Instruments XDS100v3
S: SerialNumber=06EB12201E7A
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Anything else shoud I check again?

from ot-br-posix.

bukepo avatar bukepo commented on May 23, 2024

Is there any ttyACM*? You may also refer to https://github.com/contiki-os/contiki/tree/master/platform/cc2538dk#drivers

from ot-br-posix.

taotaodong527 avatar taotaodong527 commented on May 23, 2024

@bukepo
Thanks for your support.
Now it works, we could use board router runing on artik with cc2538 connected to creat a network working as a leader, and then a thread node joins this network successfully.
Could this environment used to test Thread Board Router function according the thread test spec?
And we also have a plan to develop a sample application, any advice shared with me?

from ot-br-posix.

bukepo avatar bukepo commented on May 23, 2024

Glad to hear that!

When testing communication between Thread network and external network, please make sure the the default route and On-Mesh prefix are properly configured in the Web GUI, more discussion on this can be found here

Besides, are you willing to submit a pull request to share your work on bringing up border router on fedora?

from ot-br-posix.

taotaodong527 avatar taotaodong527 commented on May 23, 2024

@bukepo
Thanks for your help.
Personally, I am willing to do so. But I am afraid that company's security policy does not allow me to submit a pull request. I am really sorry for this. If some guys who have problems depolying board router on Fedora, you could @ me and I am glad to help.

from ot-br-posix.

bukepo avatar bukepo commented on May 23, 2024

I submitted the PR to install dependencies through yum or dfn.

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.