Re: IPSP sample with KW41Z-BLE controller gives error: No route to host (on Linux kernel 4.4.0-98)


Priyanka
 

Hi Luiz


I tried bluetoothctl> power on
However, this did not resolve the issue. I still get
> bash: echo: write error: No route to host

I am on Linux Kernel version
> Kernel 4.4.0-98
( Ubuntu 16.04)

I wonder if I should upgrade my Linux kernel version ( / change to another Linux distribution)?

Here is my strace, it shows coreutils.mo, libc.mo missing.
If you have any suggestion based on strace.

$strace echo "connect 00:04:9f:00:00:15 1" > /sys/kernel/debug/bluetooth/6lowpan_control

execve("/bin/echo", ["echo", "connect 00:04:9f:00:00:15 1"], [/* 31 vars */]) = 0
brk(NULL)                               = 0x942000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb0823b6000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=129266, ...}) = 0
mmap(NULL, 129266, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fb082396000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1868984, ...}) = 0
mmap(NULL, 3971488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fb081dc9000
mprotect(0x7fb081f89000, 2097152, PROT_NONE) = 0
mmap(0x7fb082189000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7fb082189000
mmap(0x7fb08218f000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fb08218f000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb082395000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb082394000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb082393000
arch_prctl(ARCH_SET_FS, 0x7fb082394700) = 0
mprotect(0x7fb082189000, 16384, PROT_READ) = 0
mprotect(0x606000, 4096, PROT_READ)     = 0
mprotect(0x7fb0823b8000, 4096, PROT_READ) = 0
munmap(0x7fb082396000, 129266)          = 0
brk(NULL)                               = 0x942000
brk(0x963000)                           = 0x963000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2985536, ...}) = 0
mmap(NULL, 2985536, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fb081af0000
close(3)                                = 0
fstat(1, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
write(1, "connect 00:04:9f:00:00:15 1\n", 28) = -1 EHOSTUNREACH (No route to host)
close(1)                                = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 1
fstat(1, {st_mode=S_IFREG|0644, st_size=2995, ...}) = 0
read(1, "# Locale name alias data base.\n#"..., 4096) = 2995
read(1, "", 4096)                       = 0
close(1)                                = 0
open("/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = 1
fstat(1, {st_mode=S_IFREG|0644, st_size=619, ...}) = 0
mmap(NULL, 619, PROT_READ, MAP_PRIVATE, 1, 0) = 0x7fb0823b5000
close(1)                                = 0
write(2, "echo: ", 6echo: )                   = 6
write(2, "write error", 11write error)             = 11
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ": No route to host", 18: No route to host)      = 18
write(2, "\n", 1
)                       = 1
exit_group(1)                           = ?
+++ exited with 1 +++

Thanks
Priyanka


From: Luiz Augusto von Dentz <luiz.dentz@...>
Sent: Wednesday, November 15, 2017 1:03 PM
To: Priyanka Rawat
Cc: zephyr-users@...
Subject: Re: [Zephyr-users] IPSP sample with KW41Z-BLE controller gives error: No route to host (on Linux kernel 4.4.0-98)
 
Hi Priyanka,

On Tue, Nov 14, 2017 at 2:47 PM, Priyanka Rawat <priyanka.rawat@...> wrote:
> Hello
>
>
> I test KW41Z-BLE controller with Zepyhr sample IPSP running in QEMU on Linux
> Kernel 4.4.0-98
>
>
> I load 6lowpan module and enable bluetooth_6lowpan module
>
>
> # modprobe bluetooth_6lowpan
> # modprobe 6lowpan
>
> # echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable
>
>
> However, while connecting the device it gives error "no route to host"
>
>
> # echo "connect 00:60:37:00:00:16 1" >
> /sys/kernel/debug/bluetooth/6lowpan_control
> bash: echo: write error: No route to host

I guess your adapter is not powered, try bluetoothctl> power on

> Any idea what is missing here?
>
>
> $ sudo hcitool -i hci1 lecc 00:60:37:00:00:16
> Connection handle 32
>
> Whereas this works fine when I test zephyr IPSP sample (BLE host) with
> virtual BLE controller connected to QEMU serial line.
>
>
> ifconfig shows bt0 up after connecting the virtual device
>
>
> # echo "connect 00:aa:01:00:00:23 1" >
> /sys/kernel/debug/bluetooth/6lowpan_control
>
>
> # cat /sys/kernel/debug/bluetooth/6lowpan_enable
> 1
>
> # cat /sys/kernel/debug/bluetooth/6lowpan_control
> 00:aa:01:00:00:23 (type 1)

Note, this is all being deprecated by:

https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.spinics.net%2Flists%2Flinux-bluetooth%2Fmsg72592.html&data=02%7C01%7Cpriyanka.rawat%40nxp.com%7Cc6284a89d516418ff50808d52c20e7d2%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636463442197027844&sdata=4jvlLU5JX%2Fwon6epshV2B3EbkFTXMtLac4qzfU6abCA%3D&reserved=0

--
Luiz Augusto von Dentz

Join users@lists.zephyrproject.org to automatically receive all group messages.