Skip to content

Fraunhofer-AISEC/blerouter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPv6 BLE router for Raspberry Pi

This script configures a Raspberry PI to act as IPv6 over BLE border router

Network Set up

            	  BLE                                        ETH                  		wifi
nrf5x   	--------------- RPI Border router        --------------- WIFI router --------------- PC
2001:db8::1        		2001:db8::2  2001:db9::1     					 2001:db9::2

BLE device set up

Rpi Set up

  • Install RADVD if not installed (to be done only once) sudo apt-get install radvd
  • Configure RADVD -> open /etc/radvd.conf and paste#
interface bt0
{
    AdvSendAdvert on;
    prefix 2001:db8::/64
    {
        AdvOnLink off;
        AdvAutonomous on;
        AdvRouterAddr on;
    };
};

PC Set up

Assign static IPv6 address to the PC (use the wifi interface - not necessarily wlp4s0 on every device)

sudo ifconfig wlp4s0 add 2001:db9::2/64
# or
# sudo ip address add 2001:db9::2/64 dev wlp4s0

ping RPI from PC AFTER connecting the BLE device and the router

ping6 -I wlp4s0 2001:db9::1

Add route to the BLE device

sudo /sbin/ip -6 route add 2001:db8::/64 via 2001:db9::1

Disable the firewall of the PC. On Ubuntu this can be done with Gufw Firewall GUI.

Connect the BLE device and the router

Execute the blerouter script as sudo.

sudo ./blerouter.sh -d dev-name

Here dev-name is the name of the device to which we want to connect.

Testing

Ping the BLE device

ping6 -I wlp4s0 2001:db8::1

Send a udp packet to port 4242

echo "some data" > /dev/udp/2001:db8::1/4242

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages