All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Baptiste Clenet <bapclenet@gmail.com>
To: Alexander Aring <alex.aring@gmail.com>
Cc: linux-wpan@vger.kernel.org
Subject: Re: ping6 -> lowpan0 -> wpan0. Ping6 doesn't succeed to send messages
Date: Tue, 14 Jul 2015 19:45:52 +0200	[thread overview]
Message-ID: <CAPpUg6OQLD=4Kc-zz+dv5PCkPyWJ5hed22i_1CP7Gcoxy3vjuQ@mail.gmail.com> (raw)
In-Reply-To: <CAPpUg6PO=E8pgxtuV+Z0Khq44XZ73D7968X35BCvca43DZkrsQ@mail.gmail.com>

2015-07-14 12:56 GMT+02:00 Baptiste Clenet <bapclenet@gmail.com>:
> 2015-07-13 19:48 GMT+02:00 Alexander Aring <alex.aring@gmail.com>:
>> Hi,
>>
>> On Mon, Jul 13, 2015 at 06:18:47PM +0200, Baptiste Clenet wrote:
>>> 2015-07-13 16:59 GMT+02:00 Baptiste Clenet <bapclenet@gmail.com>:
>>> > Hi,
>>> >
>>> > Here is how I set the network:
>>> > modprobe at86rf230
>>> > iwpan dev wpan0 set pan_id 0xbeef
>>> > ip link set wpan0 up
>>> > ip link add link wpan0 name lowpan0 type lowpan
>>> > ip link set lowpan0 up
>>> >
>>> > Then I try to do:
>>> > ping6 -I lowpan0 fe80::a8af:ac69:e53e:c7f1
>>> >
>>> > Nothing is sent. (I checked by sniffing the SPI pins). No errors from
>>> > ping6 or other layers in the network stack.
>>> >
>>> > root@OpenWrt:/# ifconfig
>>> > lowpan0   Link encap:UNSPEC  HWaddr
>>> > 05-38-09-06-90-E0-5E-3E-00-00-00-00-00-00-00-00
>>> >           inet6 addr: fe80::738:906:90e0:5e3e/64 Scope:Link
>>> >           UP BROADCAST RUNNING MULTICAST  MTU:1280  Metric:1
>>> >           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>>> >           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>>> >           collisions:0 txqueuelen:0
>>> >           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>>> >
>>> > wpan0     Link encap:UNSPEC  HWaddr
>>> > 05-38-09-06-90-E0-5E-3E-00-00-00-00-00-00-00-00
>>> >           UP BROADCAST RUNNING NOARP  MTU:127  Metric:1
>>> >           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>>> >           TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
>>> >           collisions:0 txqueuelen:300
>>> >           RX bytes:0 (0.0 B)  TX bytes:75 (75.0 B)
>>> >
>>> > (TX bytes:75 (75.0 B), seems to be sent when you up lowpan0 ?)
>>> >
>>
>> Yes, this is because the IPv6 neighbor discovery protocol. (We don't
>> increment the lowpan interface stats currently), but this should be some
>> patch later which increments the "uncompressed" part of 6LoWPAN ->
>> simple IPv6 view, this is also what wireshark offers you on this
>> interface.
>
> Ok thanks.
>
>>
>>> >
>>> > Is my settings right? What should I check to make sure the data goes
>>> > from each layer of the network stack?
>>> >
>>
>> Yes, the setting is right.
>>
>> I have no idea why it doesn't work on your side. That the "tx stats" of
>> wpan interface are incremented shows me it runs the code at [0].
>>
>> Before we call "drv_xmit_async" which calls the function at [1].
>>
>> Maybe you can do some 'printk(KERN_INFO "foobar\n")' at [1] to see if
>> you really call that function in driver layer, but it should.
>
> Yes, it goes to 'at86rf230_xmit()' when lowpan goes up. That explains
> the 75Bytes
>
>>
>> Do you see SPI traffic while probing? Because at [2] we have some
>> id registers reads. If you don't see spi traffic and it probes
>> successful then your sniffing setup seems wrong. If you see spi traffic
>> then it seems to be correct and something is different in openwrt when
>> calling ?spi_async?.
>>
>
> The probe runs well, I see all the exchange data (SPI traffic), it
> detects the chip version of the transceiver, Write frame buffer works
> great as well. The driver works with the transceiver, I think the
> problem comes from upper layer.
> The thing is, calling 'ip link set lowpan0 up ' goes to
> 'at86rf230_xmit()' and I see the data transmitted over the SPI pins
> which is fine but when I try to ping6, it never goes to
> 'at86rf230_xmit()' and there is no data exchange on the bus.
>
>> Do you use now the software spi bit banging driver over gpio's?
> Yes I use software spi bit banging driver over gpio's which works great.
>>
>>
>> - Alex
>>
>> [0] http://lxr.free-electrons.com/source/net/mac802154/tx.c#L106
>> [1] http://lxr.free-electrons.com/source/drivers/net/ieee802154/at86rf230.c#L1027
>> [2] http://lxr.free-electrons.com/source/drivers/net/ieee802154/at86rf230.c#L1648
>
>
> ip link gives me that:
>
> root@OpenWrt:/# ip link
> 6: wpan0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 127 qdisc fq_codel state
> UNKNOWN mode DEFAULT group default qlen 300
>     link/ieee802.15.4 ef:57:b2:a9:2f:4e:90:76 brd ff:ff:ff:ff:ff:ff:ff:ff
> 7: lowpan0@NONE: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1280 qdisc
> noqueue state UNKNOWN mode DEFAULT group default
>     link/[825] ef:57:b2:a9:2f:4e:90:76 brd ff:ff:ff:ff:ff:ff:ff:ff
>
> I'm wondering what [825] means? Shouldn't it be ieee802.15.4 instead?
> What does ping6 -I lowpan0? Does it create an ICMP6 socket? How is
> ping6 connected to lowpan0 interface? (I mean in the source code)
> --
> Baptiste

Could you tell me what should be the result of:
cat ./sys/devices/virtual/net/lowpan0/type
I get 825 and for wpan 0, it is 804


-- 
Baptiste

  reply	other threads:[~2015-07-14 17:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 14:59 ping6 -> lowpan0 -> wpan0. Ping6 doesn't succeed to send messages Baptiste Clenet
2015-07-13 16:18 ` Baptiste Clenet
2015-07-13 17:48   ` Alexander Aring
2015-07-14 10:56     ` Baptiste Clenet
2015-07-14 17:45       ` Baptiste Clenet [this message]
2015-07-14 18:11         ` Alexander Aring
2015-07-14 21:18           ` Baptiste Clenet
2015-07-14 21:50             ` Baptiste Clenet
     [not found]             ` <CAPpUg6Odxw1F6+3frQibxtORaUic0M1F_9rGdY6RWZK1uaM17Q@mail.gmail.com>
     [not found]               ` <20150715071214.GA5680@omega>
2015-07-15  7:13                 ` Alexander Aring
2015-07-15 14:34                   ` Baptiste Clenet
2015-07-15 14:37                     ` Baptiste Clenet
2015-07-15 17:48                     ` Alexander Aring
2015-07-21  6:52                       ` Baptiste Clenet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPpUg6OQLD=4Kc-zz+dv5PCkPyWJ5hed22i_1CP7Gcoxy3vjuQ@mail.gmail.com' \
    --to=bapclenet@gmail.com \
    --cc=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.