This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to get the nrf DK device to be available on the internet?

I am testing nrf5 IoT tcp client example. (in \nrf5_iot\examples\iot\tcp\client)

  1. DK side:

IP:2004::213:ddff:fe4c:6032

run as client.

2.6lowpan border router (raspberry PI3)

interface bt0 eth0

bt0:

IP:2004::ba27:ebff:fe15:ae01

run as server, app source code:

 import socket
    import struct
    
    SERVER_ADDR = '2004::ba27:ebff:fe15:ae01'
    SERVER_PORT = 9000
    sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
    server_addr = (SERVER_ADDR, SERVER_PORT, 0, 0)
    sock.bind(server_addr)
    sock.listen(1)
    client, addr = sock.accept()
    print 'Connected'
    while 1:
        recv_data = client.recv(128)
        recv_len = len(recv_data)
        if recv_len >= 8:
            rx_sequence_number = 0
            rx_sequence_number = struct.unpack("!I", recv_data[:4])[0]
            data = struct.pack("!i", (rx_sequence_number)
            print(data)
            data +=  'Pong'
            client.send(data)
    sock.close()
    del sock

Now, the client and server sides work well.

But how to communicate with nrf DK(client) by using eth0?

Further more, how to get the nrf DK device to be available on the internet? need to bridge bt0 and eth0 ?

thanks!

Parents
  • Thanks very much for your answer.

    I have followed the instructions of the file--IoT_SDK_step_by_step.pdf. I could ping ble_IoT_board from the 6LoWPAN edge router (use Rasp PI 3)successfully.

    In the scenario:

    ble_IoT_board <--> 6LoWPAN edge route
    

    by using:

    ping6 -I bt0 <ipv6-address>
    

    But in the following scenario:

    ble_IoT_board <--> 6LoWPAN edge route<--> remote ubuntu PC
    

    How to ping ble_IoT_board from remote ubuntu PC? Is there any configuration guide ?

    Best regards.

Reply
  • Thanks very much for your answer.

    I have followed the instructions of the file--IoT_SDK_step_by_step.pdf. I could ping ble_IoT_board from the 6LoWPAN edge router (use Rasp PI 3)successfully.

    In the scenario:

    ble_IoT_board <--> 6LoWPAN edge route
    

    by using:

    ping6 -I bt0 <ipv6-address>
    

    But in the following scenario:

    ble_IoT_board <--> 6LoWPAN edge route<--> remote ubuntu PC
    

    How to ping ble_IoT_board from remote ubuntu PC? Is there any configuration guide ?

    Best regards.

Children
No Data
Related