6LowPan  over mc1322x

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

6LowPan  over mc1322x

1,117 Views
sbeeem
Contributor I

I am trying to use a 6lowpan protocol over the ieee 802.15.4.

With the dongle sniffer and WireShark i saw the packet "in the air" but the coordinator doesn't receive it correctly.

It receive the first part of the packet that is the header of 802.15.4 correctly but the 6lowpan header and the payload(sensor data)  are random value. Also after the first 5 packet the end device stop transmitting data.

 

My question is simple, witch is the problem?

 

If the packet is longer than the standard the coordinator's buffer is not enough?

 

This is my code, we fill the packet with a function that return the pointer to the 6lowpan struct. I fill the fields with default value. But I think that the error is in the coordinator source code because the packet is correctly formed.

 

 


typedef struct pkt_6LowPan_t

{

/*Header Ipv6*/
 
 uint8_t   dispatch;                    /*Byte iniziale 6LP normalmente vale 01000001 per uncompressed ipv6*/
 uint8_t   version_traffic_flow[4];     /*Version traffic e flow label*/
 uint8_t   payload_len[2];              /*lunghezza pacchetto*/
 uint8_t   next_header;                 /*tipo header successivo*/
 uint8_t   hop_limit;                   /*numero di hop massimi (serve nel routing)*/
 
/*Indirizzi*/

 long int   srcdestaddress[8];
 
/*Data*/

 //uint8_t p6Msdu[8];

 
} pkt6LowPan_t;            /*definizione del puntatore all'inizio del pacchetto, inizializzato a null*/

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
//-----------------------------------------------------------------------------------







 // Type: gMcpsDataInd_c,
typedef struct mcpsDataInd_tag {
  uint8_t  dstAddr[8];    // First 0/2/8 bytes is the address as defined by dstAddrMode
  uint8_t  dstPanId[2];   // 16 bit word converted to little endian byte array
  uint8_t  dstAddrMode;
  uint8_t  srcAddr[8];    // First 0/2/8 bytes is the address as defined by srcAddrMode
  uint8_t  srcPanId[2];   // 16 bit word converted to little endian byte array
  uint8_t  srcAddrMode;
  uint8_t  msduLength;    // 0-102 (101?)
  uint8_t  mpduLinkQuality;
  bool_t   securityUse;
  uint8_t  aclEntry;
  pkt6LowPan_t p6LowPan;
  uint8_t  *pMsdu;        // Data will start at this address inside the message.
} mcpsDataInd_t;

 

 

 

Thanks to all.

Labels (1)
0 Kudos
3 Replies

438 Views
sbeeem
Contributor I

Thanks a lot!

0 Kudos

438 Views
sbeeem
Contributor I

I saw that the end device stop sending Poll request to coordinator, and in Uart appear the message packet dropped, but I don't know why.

0 Kudos

438 Views
redbee
Contributor III

You should take a look at the mc1322x project:

 

http://mc1322x.devl.org

 

We already have 6lowpan, RPL, and CoAP running on the mc13224v using Contiki.

 

-Mar.

0 Kudos