Hi,

On Wed, Jan 08, 2014 at 01:51:15PM +0530, Varka Bhadram wrote:
> hai...
> 
> I enabled the lowpan and wpan interfaces by using:
> 
> $ iz add wpan-phy0
> $ ip link set wpan0 address a0:0:0:0:0:0:0:1
> $ ifconfig wpan0 up
> $ iz set wpan0 22 1 15                        //22:panid,1:short
> address,15:channel number
> $ ip link add link wpan0 name lowpan0 type lowpan
> $ ip link set lowpan0 address a0:0:0:0:0:0:0:1
> $ ip link set lowpan0 up
> 
> 
> I am able to see the two interface:
> 
> lowpan0   Link encap:UNSPEC  HWaddr
> A0-00-00-00-00-00-00-01-00-00-00-00-00-00-00-00
>           inet6 addr: fe80::a200:0:0:1/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1281  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
> A0-00-00-00-00-00-00-01-00-00-00-00-00-00-00-00
>           UP BROADCAST RUNNING NOARP  MTU:127  Metric:1
>           RX packets:390 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:2486 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:300
>           RX bytes:15789 (15.4 KiB)  TX bytes:56803 (55.4 KiB)
> 
> 
> I am able to send the packet over the wpan interface from user space by using
> the IEEE-802.15.4 sockets. When i use sendmsg() the packet is including MAC
> header and payload.
> 
> My question how to use the enabled lowpan interface and how to send and 
> receive
> the packets ?
> 
> 

on a lowpan interface your talking ipv6. Highly complex kernel
mechanismn (oh yea, it's not easy to understand) replace the ipv6 header
with a 6LoWPAN IPHC header (rfc 6282) and do fragmentation (if
necessary, rfc 4944). You don't need to change your userspace
application to talking 6LoWPAN, you can just use every ipv6 application.


First of all you have already a link-local address:

"fe80::a200:0:0:1"

which is on a 6LoWPAN network well, because the ipv6 address is full
elided in the 6LoWPAN header.

You can write your own ipv6 application and talking to another node.
Like ping with another node address "fe80::a200:0:0:2":

ping6 fe80::a200:0:0:2%lowpan0

You have a link-local address here so you need specify the interface.

Of course you can add a global link address like "2001::2":

ip -6 addr add dev lowpan0 2001::2/64

connection with a global link address isn't very well because rfc6282
don't compress these kind of addresses.

Normally you have a kind of "rpl-border-router" which have a mapping from
global-link to link-local addresses. Then you talking in ipv6 world with
global link addresses and in 6LoWPAN world with link-local addresses.

It would be very cool to setup such device with linux. :-)

- Alex

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to