[zb4osgi Dev] R: problem with ZB4osgi with dongle CC2531

De Alti, Cristiano Cristiano.DeAlti at eurotech.com
Thu May 24 22:54:35 CEST 2012


Hi Christophe,
Going back to your original post:

>I compile the entire project with the command:
>    mvn install -Dmaven.test.skip

Is there a special reason you aren't following the tutorial on the zb4osgi wiki?

>I prepare environment with Felix 3.2.2 All configuration options are
>included in the config.properties of Felix. I can see all configuration
>options at the beginning of the application log:

Why? AFAIK Felix is bundled in zb4osgi

>[it.cnr.isti.zigbee.basedriver.configuration.ConfigurationService] :
>Initialized
>it.cnr.isti.zigbee.basedriver.configuration.ConfigurationService at 11ef443
>with {it.cnr.isti.zigbee.driver.communication.timout=2500,
>it.cnr.isti.zigbee.driver.mode=Coordinator,
>it.cnr.isti.zigbee.driver.network.browsing.period=900000,
>it.cnr.isti.zigbee.driver.flush=true,
>it.cnr.isti.zigbee.driver.device.inspection.rate=10000,
>it.cnr.isti.zigbee.driver.serial.boudrate=38400,
>it.cnr.isti.zigbee.driver.communication.ep.address.first=2,
>it.cnr.isti.zigbee.driver.serial.portname=/dev/ttyS55,
>it.cnr.isti.zigbee.pan.id=4951,
>it.cnr.isti.zigbee.driver.communication.retry.count=3,
>it.cnr.isti.zigbee.driver.communication.retry.delay=1000,
>it.cnr.isti.zigbee.pan.channel=22,
>it.cnr.isti.zigbee.driver.communication.ep.address.retry=0}

I don't have these lines appearing in the log of my build

>The bundles loaded are:
>    ID   State         Level  Name
>[   0] [Active     ] [    0] System Bundle (3.2.2)
>[   1] [Active     ] [    1] net.sf.trove4j Bundle Wrapper (2.0.4.1)
>[   2] [Active     ] [    1] rxtx Bundle Wrapper (2.1.7.1)
>[   3] [Active     ] [    1] ZIC CC2530 dongle (0.2.0.SNAPSHOT)
>[   4] [Active     ] [    1] ZigBee Base Driver (0.7.0.SNAPSHOT)
>[   5] [Active     ] [    1] ZigBee Base Driver API for OSGi
>(0.6.0.SNAPSHOT)
>[   6] [Active     ] [    1] CC2480 Data Link protocol library
>(0.8.0.SNAPSHOT)
>[   7] [Active     ] [    1] OSGi and Primitive Types Utility
>(0.6.0.SNAPSHOT)
>[   8] [Active     ] [    1] ZigBee Interface Controller API
>(0.7.0.SNAPSHOT)
>[   9] [Active     ] [    1] ZIC for EZ430-RF2480 dongle (0.7.0.SNAPSHOT)      <--- Why is this bundle active???
>[  10] [Active     ] [    1] ZigBee Home Automation Profile Driver
>(0.7.0.SNAPSHOT)
>[  11] [Active     ] [    1] Zigbee Network Browser (0.1.0.SNAPSHOT)
>[  12] [Active     ] [    1] ZigBee Common Cluster Library (0.8.0.SNAPSHOT)
>[  13] [Active     ] [    1] Apache Felix Configuration Admin Service
>(1.2.8)
>[  14] [Active     ] [    1] Apache Felix EventAdmin (1.2.14)
>[  15] [Active     ] [    1] Apache Felix Http Jetty (2.2.0)
>[  16] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>[  17] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>[  18] [Active     ] [    1] OPS4J Pax Logging - API (1.4)
>[  19] [Active     ] [    1] OPS4J Pax Logging - Service (1.4)
>[  20] [Active     ] [    1] OSGi R4 Compendium Bundle (4)
>[  21] [Active     ] [    1] RXTX Command (0.1.0)
>[  22] [Active     ] [    1] Zigbee Tester (0.4.0.SNAPSHOT)

>From the 'ps' above the ZIC for EZ430-RF2480 dongle (0.7.0.SNAPSHOT) is active. Why? You are using the CC2531 dongle.

My 'ps' output is:

START LEVEL 6
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (2.0.2)
[   1] [Active     ] [    5] Zigbee Tester (0.4.0.SNAPSHOT)
[   2] [Active     ] [    5] OSGi R4 Core Bundle (4)
[   3] [Active     ] [    5] ZigBee Home Automation Profile Driver (0.7.0.SNAPSHOT)
[   4] [Active     ] [    5] ZigBee Common Cluster Library (0.8.0.SNAPSHOT)
[   5] [Active     ] [    5] ZigBee Base Driver API for OSGi (0.6.0.SNAPSHOT)
[   6] [Active     ] [    5] OPS4J Pax ConfMan - Properties Loader (0.2.2)
[   7] [Active     ] [    5] rxtx Bundle Wrapper (2.1.7.1)
[   8] [Active     ] [    5] net.sf.trove4j Bundle Wrapper (2.0.4.1)
[   9] [Active     ] [    5] ZigBee Interface Controller API (0.7.0.SNAPSHOT)
[  10] [Active     ] [    5] CC2480 Data Link protocol library (0.8.0.SNAPSHOT)
[  11] [Active     ] [    5] OSGi and Primitive Types Utility (0.6.0.SNAPSHOT)
[  12] [Active     ] [    5] ZigBee Base Driver (0.7.0.SNAPSHOT)
[  13] [Active     ] [    5] OPS4J Pax Logging - API (1.4)
[  14] [Active     ] [    5] OPS4J Pax Logging - Service (1.4)
[  15] [Active     ] [    5] Apache Felix Configuration Admin Service (1.2.4)
[  16] [Active     ] [    5] ZIC CC2530 dongle (0.2.0.SNAPSHOT)
[  17] [Installed  ] [    5] ZIC for EZ430-RF2480 dongle (0.7.0.SNAPSHOT)
[  18] [Active     ] [    1] Apache Felix Shell Service (1.4.1)
[  19] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)

Hope this helps.
Ciao,
 Cristiano
________________________________________
Da: dev-bounces at zb4osgi.aaloa.org [dev-bounces at zb4osgi.aaloa.org] per conto di christophe.demottie at orange.com [christophe.demottie at orange.com]
Inviato: martedì 22 maggio 2012 15.41
A: dev at zb4osgi.aaloa.org
Oggetto: [zb4osgi Dev] problem with ZB4osgi with dongle CC2531

Hello,

I'm trying to use ZB4OSGi with CC2531 on Ubuntu 11.04 64 bits.

First of all, I get the last version from your repository with the command:
    svn co https://svn.aaloa.org/projects/zb4osgi/trunk zb4osgi

Then, I flash the dongle with the tool "SmartRF Flash Programmer" with
the file cc2530-znp.hex provide in this trunk directory
    $ sum ./firmware/TI/cc2530-znp/cc2530-znp.hex
    59006   386

When I connect it to Linux, It appears as /dev/ttyACM0. So, I create a
symbolic link /dev/ttyS55 or /dev/ttyUSB5 to be available
for RxTx library.

I compile the entire project with the command:
    mvn install -Dmaven.test.skip

I prepare environment with Felix 3.2.2 All configuration options are
included in the config.properties of Felix. I can see all configuration
options at the beginning of the application log:

[it.cnr.isti.zigbee.basedriver.configuration.ConfigurationService] :
Initialized
it.cnr.isti.zigbee.basedriver.configuration.ConfigurationService at 11ef443
with {it.cnr.isti.zigbee.driver.communication.timout=2500,
it.cnr.isti.zigbee.driver.mode=Coordinator,
it.cnr.isti.zigbee.driver.network.browsing.period=900000,
it.cnr.isti.zigbee.driver.flush=true,
it.cnr.isti.zigbee.driver.device.inspection.rate=10000,
it.cnr.isti.zigbee.driver.serial.boudrate=38400,
it.cnr.isti.zigbee.driver.communication.ep.address.first=2,
it.cnr.isti.zigbee.driver.serial.portname=/dev/ttyS55,
it.cnr.isti.zigbee.pan.id=4951,
it.cnr.isti.zigbee.driver.communication.retry.count=3,
it.cnr.isti.zigbee.driver.communication.retry.delay=1000,
it.cnr.isti.zigbee.pan.channel=22,
it.cnr.isti.zigbee.driver.communication.ep.address.retry=0}

The bundles loaded are:
    ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (3.2.2)
[   1] [Active     ] [    1] net.sf.trove4j Bundle Wrapper (2.0.4.1)
[   2] [Active     ] [    1] rxtx Bundle Wrapper (2.1.7.1)
[   3] [Active     ] [    1] ZIC CC2530 dongle (0.2.0.SNAPSHOT)
[   4] [Active     ] [    1] ZigBee Base Driver (0.7.0.SNAPSHOT)
[   5] [Active     ] [    1] ZigBee Base Driver API for OSGi
(0.6.0.SNAPSHOT)
[   6] [Active     ] [    1] CC2480 Data Link protocol library
(0.8.0.SNAPSHOT)
[   7] [Active     ] [    1] OSGi and Primitive Types Utility
(0.6.0.SNAPSHOT)
[   8] [Active     ] [    1] ZigBee Interface Controller API
(0.7.0.SNAPSHOT)
[   9] [Active     ] [    1] ZIC for EZ430-RF2480 dongle (0.7.0.SNAPSHOT)
[  10] [Active     ] [    1] ZigBee Home Automation Profile Driver
(0.7.0.SNAPSHOT)
[  11] [Active     ] [    1] Zigbee Network Browser (0.1.0.SNAPSHOT)
[  12] [Active     ] [    1] ZigBee Common Cluster Library (0.8.0.SNAPSHOT)
[  13] [Active     ] [    1] Apache Felix Configuration Admin Service
(1.2.8)
[  14] [Active     ] [    1] Apache Felix EventAdmin (1.2.14)
[  15] [Active     ] [    1] Apache Felix Http Jetty (2.2.0)
[  16] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
[  17] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
[  18] [Active     ] [    1] OPS4J Pax Logging - API (1.4)
[  19] [Active     ] [    1] OPS4J Pax Logging - Service (1.4)
[  20] [Active     ] [    1] OSGi R4 Compendium Bundle (4)
[  21] [Active     ] [    1] RXTX Command (0.1.0)
[  22] [Active     ] [    1] Zigbee Tester (0.4.0.SNAPSHOT)


And I have this warning, which stop the process:
[SimpleDriver[/dev/ttyS55,38400]] WARN
it.cnr.isti.zigbee.dongle.CC2530.impl.DriverCC2530 - The channel
configuration differ from the channel configuration in use: in use 0,
while the configured is 22.
the request is : 0xfe 0x01 0x26 0x06 0x05 0x24
the answer is : 0xfe 0x09 0x66 0x06 0x05 0x00 0x04 0x00 0x00 0x40 0x00
0x13 0x00 0x3b

If I check manually the channel with Ztool, it's correct.
After some trys, I add a sleep 5 seconds in the method getCurrentChannel
in DriverCC2530.java before asking
getDeviceInfo(ZB_GET_DEVICE_INFO.DEV_INFO_TYPE.CHANNEL). Why the dongle
is so slow ?

Now, I can see my dongle as ZigBee coordinator into one of the GUI (a
blue point with it's IEEE address).

And I have a first question :
- How can I open the network (send permit joining) to add equipment ?

The network seems to be without security, and no preconfigured linkkey.
I don't find any option in Zb4osgi to set these values. The
ZB_WRITE_CONFIGURATION.java file contains some constants which start
with ZCD_NV_... I can found the full list in the ZComDef.h file of the
Zstack source. And the ZCD_NV_SECURITY_LEVEL is not described in
Zb4osgi, so I suppose it isn't use.


So, I'm trying to continue with Ztool:
- I read the device configuration configuration
<TX>11:25:15.59 COM4 UTIL_GET_DEVICE_INFO (0x2700)
<RX>11:25:15.6 COM4 UTIL_GET_DEVICE_INFO_RESPONSE (0x6700)
         Status: SUCCESS (0x0)
         IEEEAddr: 0x00124B000172F602
         ShortAddress: 0x0000
         DeviceType: COORDINATOR (0x1)
         DeviceState: DEV_ZB_COORD (0x9)
         NumAssocDevices: 0x01
         AssocDevicesList: 0x796F

<TX>11:25:27.7 COM4 UTIL_GET_NV_INFO (0x2701)
<RX>11:25:27.74 COM4 UTIL_GET_NV_INFO_RESPONSE (0x6701)
         Status: ZMAC_UNSUPPORTED (0x18)
         IEEEAddress: 0x00124B000172F602
         ScanChannels: NONE (0x0)
         PanID: 0x4000
         SecurityLevel: 0x00
         PreConfigKey: .W.............. (0x00, 0x57, 0x13, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF)

<TX>11:35:01.93 COM4 ZB_READ_CONFIGURATION (0x2604)
     ConfigId: 0x83
<RX>11:35:01.95 COM4 ZB_READ_CONFIGURATION_RSP (0x6604)
         Status: SUCCESS (0x0)
         ConfigId: 0x83
         Len: 0x02
         Value: W. (0x57, 0x13)

In the ZGlobals.h file of ZStack projet, I can found this informations:
     #define ZG_SECURITY_NONE         0
     #define ZG_SECURITY_RESIDENTIAL  1
     #define ZG_SECURITY_PRO_STANDARD 1  // For now, same as residential
     #define ZG_SECURITY_PRO_HIGH     3
     #define ZG_SECURITY_SE_STANDARD  4

So, with Ztool, I'm trying to set the security to 1:

<TX>01:38:40.51 COM4 UTIL_SET_SECURITY_LEVEL (0x2704)
      SecurityLevel: 0x01
<RX>01:38:40.52 COM4 UTIL_SET_SECURITY_LEVEL_RESPONSE (0x6704)
           Status: SUCCESS (0x0)

<TX>01:38:53.73 COM4 UTIL_GET_NV_INFO (0x2701)
<RX>01:38:53.77 COM4 UTIL_GET_NV_INFO_RESPONSE (0x6701)
            Status: ZMAC_UNSUPPORTED (0x18)
            IEEEAddress: 0x00124B000172F602
            ScanChannels: NONE (0x0)
            PanID: 0x4000
            SecurityLevel: 0x00
            PreConfigKey: .W.............. (0x00, 0x57, 0x13, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF)

set response is ok, but when I read the configuration, it isn't change.

I try another method, with the write configuration:

<TX>03:30:06.64 COM4 ZB_WRITE_CONFIGURATION (0x2605)
       ConfigId: 0x61
       Len: 0x01
       Value: . (0x01)
<RX>03:30:06.65 COM4 ZB_WRITE_CONFIGURATION_RSP (0x6605)
             Status: FAIL (0x1)

It isn't correct !

I'm trying also to set a preconfigured link key:

<TX>03:35:30.51 COM4 UTIL_SET_PRECONFIG_KEY (0x2705)
       PreConfigKey: 0123401234012340 (0x30, 0x31, 0x32, 0x33, 0x34,
0x30, 0x31, 0x32, 0x33, 0x34, 0x30, 0x31, 0x32, 0x33, 0x34, 0x30)
<RX>03:35:30.52 COM4 UTIL_SET_PRECONFIG_KEY_RESPONSE (0x6705)
            Status: SUCCESS (0x0)

<TX>03:35:38.93 COM4 UTIL_GET_NV_INFO (0x2701)
<RX>03:35:38.98 COM4 UTIL_GET_NV_INFO_RESPONSE (0x6701)
         Status: ZMAC_UNSUPPORTED (0x18)
         IEEEAddress: 0x00124B000172F602
         ScanChannels: NONE (0x0)
         PanID: 0x4000
         SecurityLevel: 0x00
         PreConfigKey: .W.............. (0x00, 0x57, 0x13, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF)


What is wrong ???

I do some mistakes ?
It isn't possible to set security level and a PreConfigKey ?

The Ztool I use has version 2.5.1. And the ZStack provided by your
project has the version 2.3.1.

Can you help me ?

Thanks

Christophe



_______________________________________________
Dev mailing list
Dev at zb4osgi.aaloa.org
http://zb4osgi.aaloa.org/mailman/listinfo/dev





More information about the Dev mailing list