Giter VIP home page Giter VIP logo

wisun-br-linux's Issues

ipv6_prefix from wsbrd command line

Starting wsbrd but not specifying the config file (with -F) result in the message:

You must specify a ipv6_prefix

However it seems there is no option to specify IPv6 prefix in the command line.

about using-ipv6-transparent-proxy

Hi, I'm using rpi3 for gateway tun0 forwarding eth0 and there's some uncertainty about how to configure it.

Refer to https://github.com/SiliconLabs/wisun-br-linux#using-ipv6-transparent-proxy

My expectation is to be able to supply the wisun device to other hosts on the LAN (egress to rpi's eth0 network card) and use my PC linux computer to access a device in the WISUN network within the RPI3 device under the current WIFI router.

Here's an excerpt of the main modifications to my wsbrd.conf:

### ipv6_prefix = fd12:3456::/64
ipv6_prefix = fe80::/64

#neighbor_proxy=eth0
neighbor_proxy=eth0

After I modify the above configuration, I will find that the network condition of rpi changes as follows:

juwan@raspberrypi:~ $ ifconfig eth0
eth0: flags=4163  mtu 1500
inet 192.168.1.168 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::81f2:f605:7c6e:889a  prefixlen 64  scopeid 0x20
ether 00:e0:4c:68:05:56  txqueuelen 1000  (Ethernet)
RX packets 6816 bytes 677491 (661.6 KiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 10377 bytes 9274965 (8.8 MiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

juwan@raspberrypi:~ $ ifconfig tun0
tun0: flags=4305  mtu 1280
inet6 fe80::be33:acff:fefa:34a5  prefixlen 64  scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
RX packets 6 bytes 604 (604.0B)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 9 bytes 1148 (1.1 KiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

juwan@raspberrypi:~ $ ip -6 route show
::1 dev lo proto kernel metric 256 pref medium
4c9c:ce7e:4c9c:ce7e:b635:22ff:fe98:2b76 dev tun0 proto static metric 1024 pref medium
4c9c:ce7e:4c9c:ce7e:b635:22ff:fe98:2f3e dev tun0 proto static metric 1024 pref medium
fe80::/64 dev eth0 proto kernel metric 100 pref medium
fe80::/64 dev tun0 proto kernel metric 256 pref medium

image

The two devices I tested got brand new addresses with ipv6 prefixes

Addresses:
[GLOBAL        : 4c9c:ce7e:4c9c:ce7e:b635:22ff:fe98:2f3e]
[LINK_LOCAL    : fe80::b635:22ff:fe98:2f3e]
[BORDER_ROUTER : 4c9c:ce7e:4c9c:ce7e:3c9c:ce7e:2422:1600]
[110 s]
Addresses:
[GLOBAL        : 4c9c:ce7e:4c9c:ce7e:b635:22ff:fe98:2b76]
[LINK_LOCAL    : fe80::b635:22ff:fe98:2b76]
[BORDER_ROUTER : 4c9c:ce7e:4c9c:ce7e:3c9c:ce7e:2422:1600]
[55 s]

image

At this point in my rpi3 ping 4c9c:ce7e:4c9c:ce7e:b635:22ff:fe98:2b76 is feasible, I expect that on my PC machine can also ping it.

image

Finally, I would like to add that my PC can ping through the ipv6 address of eth0 of rpi3, but cannot further ping through devices in WISUN. How do I determine the problem? Or provide more parameter information.

image

Thank you for providing a window for questions, which is good, because I think this section is not detailed enough, so I hereby raise the issue for others' reference and confirmation.

That's what I want to achieve in the end

+-----------------------------------------------------------------------+
|                                                                       |
|       +-----+                 |                +----+                 |
|       |WISUN|                 |                |WIFI|                 |
|       +-----+                 |                +----+                 |
|                               |                                       |
|                               |                                       |
|  +----+                       |                                       |
|  |Node+-----------+           |            +-----------+              |
|  +----+           |           |            |WIFI Router|              |
|                   |           |            +--^-----^--+              |
|                   |           |               |     |                 |
|                   |           |               |     |                 |
|            +------v------+ +-----> +----+     |     |     +--------+  |
|            |Border Router|    |    |RPI3+-----+     +-----+Linux PC|  |
|            +------^------+ <-----+ +----+                 +---+----+  |
|                   |           |                               |       |
|                   |           |                               |       |
|  +----+           |           |                               |       |
|  |Node<-----------+-------------------------------------------+       |
|  +----+                       |    Linux PC get Node data on net      |
|                               |                                       |
+-------------------------------+---------------------------------------+

Node is not entering in stage 5

Dear Team,

We have ported the wsbrd demon sdk v1.8 on android platform of Allwinner h616 processor using the ndk-18 (API level 28). attached the patch in which we have done the minor changes as per the api difference. (FYI:we used the libnl library version 3.4.0.)

After compilation we are able to generate the wsbrd binary and able to run on our android device. We did the proper configuration as per attachment and trying to join the node but node is passing the stage 4 only and not entering into stage 5. here i attached the logs of both wsbrd process.

FYI: We are using can1.0 mode.

FYI : we are running the coap server example in node.

We are running the below steps in android device as run the demon process.

  • mount -o rw,remount /

mkdir /dev/net
ln -s /dev/tun /dev/net/tun

ip rule add from all lookup main pref 1

./init-container.sh local

Attached files :
0001-Modify-as-per-android-board.patch

log-wsbrd-android-board.log

init-container.txt
wsbrd-conf.txt

Please hep us to solve this issue as soo as possible

Package missing error occured in i.mx8 Processor board

Hello,

I have tried the WI-sun border router setup example in NXP i.mx processor board instead of raspberry pi.

i have successfully created and installed Linux OS on i.mx using Yocto project.but while compiling wisun source code I'm getting the error for few packages which i have mentioned below.can anyone please help me on this issue?

Screenshot from 2024-04-17 11-42-17

thank you

failed to get clap as dependency

I encountered an error building wsbrd_cli:

[0/5] Generating wsbrd_cli
    Updating crates.io index
error: failed to get 'clap' as a dependency of package 'wsbrd_cli v0.1.0 (/home/pi/wisun-br-linux/app_wsbrd_cli)

Caused by:
  failed to load source for dependency 'clap'

Caused by:
  Unable to update registry 'https://github.com/rust-lang/crates.io-index'

Caused by:
  failed to fetch 'https://github.com/rust-lang/crates.io-index'

Caused by:
  error inflating zlib stream; class=Zlib (5)
[1/5] Checking the git repository for changes...
FAILED: wsbrd_cli

I was able to get around this error by changing a line in app_wsbrd_cli/Cargo.toml from:
clap = "2.0, < 2.28"

to

clap = "2.33"

I started with a fresh Raspbian Bullseye 11 image, kernel 5.15.84-v7+ on a Raspberry Pi 3B.

build failed during linking: undefined reference to `mbedtls_ecp_set_max_ops'

hi, trying to build wsbrd exactly following instructions and the build fails with a liner error:

[129/130] Linking C executable wsbrd FAILED: wsbrd : && /usr/bin/cc -I/home/wisun/wisun-br-linux/examples -DMBEDTLS_CONFIG_FILE='<mbedtls-config.h>' -rdynamic CMakeFiles/wsbrd.dir/app_wsbrd/wsbrd.c.o -o wsbrd libwsbrd.a -pthread /usr/lib/arm-linux-gnueabihf/libnl-route-3.so /usr/lib/arm-linux-gnueabihf/libnl-3.so /usr/local/lib/libmbedtls.a /usr/local/lib/libmbedx509.a /usr/local/lib/libmbedcrypto.a /usr/lib/arm-linux-gnueabihf/libsystemd.so -lbacktrace -ldl && : /usr/bin/ld: libwsbrd.a(tls_sec_prot_lib.c.o): in function 'tls_sec_prot_lib_connect: tls_sec_prot_lib.c:(.text+0xab4): undefined reference to 'mbedtls_ecp_set_max_ops' collect2: error: ld returned 1 exit status

running on a Raspberry Pi 4 Model B Rev 1.2 and latest RasberryPi OS (kernel 6.1.21, version says 11 (bullseye)).

followed exact instructions (forced mbedtls to v 3.0.0 as instructed).
If you need any additional info, please let me know.
I will now try the docker container so I am not stuck, hope that works.

Compile error - (signal: 11, SIGSEGV: invalid memory reference)

Hi,

I am trying to comple the wsbrd as per the instructions. I am seeing following compile error with ninja

ns@ns-dev-pi:~/wsbrd/wisun-br-linux $ ninja
[0/5] Generating wsbrd_cli
Compiling libc v0.2.149
Compiling pkg-config v0.3.27
Compiling vec_map v0.8.2
Compiling textwrap v0.9.0
/lib/aarch64-linux-gnu/librustc_driver-fe2d3f0c4114cdf4.so(+0x6c4430)[0x7facc94430]
linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0x7fafcfd7b0]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(+0x132a9f0)[0x7fa730a9f0]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm11raw_ostream5writeEPKcm+0x164)[0x7fa6e5b49c]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm9MCContext16createTempSymbolERKNS_5TwineEb+0xb4)[0x7fa8211048]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm9MCContext16createTempSymbolEv+0x3c)[0x7fa82113f0]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm16MCObjectStreamer18emitCFIEndProcImplERNS_16MCDwarfFrameInfoE+0x1c)[0x7fa8235c6c]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(+0x165f4c0)[0x7fa763f4c0]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm10AsmPrinter16emitFunctionBodyEv+0x264c)[0x7fa7620b6c]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(+0x2764ba4)[0x7fa8744ba4]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0x140)[0x7fa71d122c]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x26c)[0x7fa6fb4390]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x3c)[0x7fa6fbaf70]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x7b4)[0x7fa6fb4d98]
/lib/aarch64-linux-gnu/librustc_driver-fe2d3f0c4114cdf4.so(+0x951d8c)[0x7facf21d8c]
/lib/aarch64-linux-gnu/librustc_driver-fe2d3f0c4114cdf4.so(+0x92c114)[0x7facefc114]
/lib/aarch64-linux-gnu/librustc_driver-fe2d3f0c4114cdf4.so(+0x930d88)[0x7facf00d88]
/lib/aarch64-linux-gnu/librustc_driver-fe2d3f0c4114cdf4.so(+0x925db4)[0x7facef5db4]
/lib/aarch64-linux-gnu/librustc_driver-fe2d3f0c4114cdf4.so(+0x921230)[0x7facef1230]
/lib/aarch64-linux-gnu/librustc_driver-fe2d3f0c4114cdf4.so(+0x80c0c0)[0x7facddc0c0]
/lib/aarch64-linux-gnu/librustc_driver-fe2d3f0c4114cdf4.so(+0x8f6608)[0x7facec6608]
/lib/aarch64-linux-gnu/libstd-4e83e61126e325db.so(rust_metadata_std_aeb45179e3b08762+0x9ffec)[0x7fac4bffec]
/lib/aarch64-linux-gnu/libc.so.6(+0x7ee58)[0x7fac2eee58]
/lib/aarch64-linux-gnu/libc.so.6(+0xe7f9c)[0x7fac357f9c]
error: could not compile libc

Caused by:
process didn't exit successfully: rustc --crate-name build_script_build /home/ns/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.149/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=68e3babdab1169b6 -C extra-filename=-68e3babdab1169b6 --out-dir /home/ns/wsbrd/wisun-br-linux/cargo/debug/build/libc-68e3babdab1169b6 -L dependency=/home/ns/wsbrd/wisun-br-linux/cargo/debug/deps --cap-lints allow (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...

Has anyone come across this issue before?

Thanks,
Nik

rtnl_link_add tun0: Invalid input data or parameter

I tried to run wsbrd on a mips-core platform, but I got the following error:
rtnl_link_add tun0: Invalid input data or parameter
I tried to use "ip tuntap add dev tap0 mod tap" command directly, and it works. Therefore, I don't know why this error occurs. I used libnl3.7 and libnl3.2.26, but both have this problem

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.