Jump to content
tinman

[Tutorial] Z-wave development

Recommended Posts

I post, because I hope it inspires other users to do development on Z-Wave Soc...

 

I adapted the SwitchOnOff project, to turn my "FrankenZwave" (Modified Z-Stick, see a few posts back for photo) in to a simple LED on/off light.

 

I am an amateur, but I toy with MCUs and I own thre Z-Uno boards so I do not really start from scratch. With this background, it took me about 20 hours to read most part of the relevant docs, debug the example, understand how the various objects and source files fit together, then adapt the code to fit the switch and LED on the FrankenZwave. I attach the source code.

  • I added defines to the end of the Makefile, so I could debug parts like the key scanner and GPIO, it outputs via UART0.
  • I created io_zstick.c and io_zstick.h, it replaces io_zdp03a. Actually, I cloned that file and adapted it.
  • I replaced S2 for inclusion with S1 triple click.
  • Apart from soldering wires to UART0 there are no board modifications.

Now I've got this going (I included it on my Z-Way server) I can think of something a bit more exciting, like RGB control of the LED. But then I have te read about that command class and implement the necessary code.

 

Would I recommend it to anyone?

  • If you know "Arduino" and just want to make devices, I'd say "no", you're better off with a Z-Uno. Less to learn, faster result. And an existing community!
  • If you want to do serious development... The question is: how long will it take them to release an new SDK for the 700 chip? The PDK uses an new programmer and it is still "coming soon". 

    Please login or register to see this link.

  • If you just like to play with this and improve your understanding of Z-Wave, I do think it is worth it!

Unzip this in your edk (e.g. C:\esdk\ProductPlus\ZstickSwitchOnOff) and follow @tinman's instructions.

 

Please login or register to see this attachment.

 

  • Like 1

Share this post


Link to post
Share on other sites
  • Topic Author
  • 8 hours ago, petergebruers said:

    I adapted the SwitchOnOff project, to turn my "FrankenZwave" (Modified Z-Stick, see a few posts back for photo) in to a simple LED on/off light.

     

    nice :)

     

    8 hours ago, petergebruers said:
    • If you want to do serious development... The question is: how long will it take them to release an new SDK for the 700 chip? The PDK uses an new programmer and it is still "coming soon". 

      Please login or register to see this link.

     

    not before Q4, and volume production is totally different story. I bet, ZW500 will not disappear from market at least till end of 2019

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • very interesting presentation from Dr. Zwave, presented on Z-Wave Summit 2018

     

    Please login or register to see this link.

     

     

    • Thanks 2

    Share this post


    Link to post
    Share on other sites

    Thanks. Quote: "odd things happen at around 100 nodes". Confirmed... 

    Share this post


    Link to post
    Share on other sites
    Posted (edited)

    Hi Timan,

     

    Thanks for your great post, I have followed your post but got an issue like below shows, and I can't get the Keil project files as well :( 

    ________________

    .....

    GENERATING INTEL H386 FILE: .\build\WallController_slave_enhanced_232_OTA_ZW050x
    _TI\WallController_slave_enhanced_232_OTA_ZW050x_EU_TI.ota
    Fixbootcrc - Application start address 0x1800 (0)
    applicationFirmwareDescriptorOffset 0x7FB8
    0x0E3B CRC - Bank1  - Start 0x08000, Length 0x7CE5
    0xD41A CRC - Bank2  - Start 0x10000, Length 0x6225
    0xCE0C CRC - Bank3  - Start 0x18000, Length 0x6794
    0xFAE4 CRC - Common - Start 0x01800, Length 0x67C4
    ApplicationCommonLength 0x7FC6
    C:\\SDK\\Tools\\HexTools\\srec_cat.exe .\build\WallController_slave_enhanced_232
    _OTA_ZW050x_TI\WallController_slave_enhanced_232_OTA_ZW050x_EU_TI.ota -intel -ex
    clude 0x0 0x1800 -offset -0x1800 -o .\build\WallController_slave_enhanced_232_OT
    A_ZW050x_TI\WallController_slave_enhanced_232_OTA_ZW050x_EU_TI.ota.bin -binary
    C:\SDK\Z-Wave\lib\otacompress\otacompress.exe .\build\WallController_slave_enhan
    ced_232_OTA_ZW050x_TI\WallController_slave_enhanced_232_OTA_ZW050x_EU_TI.ota.bin
     .\build\WallController_slave_enhanced_232_OTA_ZW050x_TI\WallController_slave_en
    hanced_232_OTA_ZW050x_EU_TI.ota.bin.lz1
    process_begin: CreateProcess(C:\SDK\Z-Wave\lib\otacompress\otacompress.exe, C:\S
    DK\Z-Wave\lib\otacompress\otacompress.exe .\build\WallController_slave_enhanced_
    232_OTA_ZW050x_TI\WallController_slave_enhanced_232_OTA_ZW050x_EU_TI.ota.bin .\b
    uild\WallController_slave_enhanced_232_OTA_ZW050x_TI\WallController_slave_enhanc
    ed_232_OTA_ZW050x_EU_TI.ota.bin.lz1, ...) failed.
    make (e=216): Error 216
    make[1]: *** [.\build\WallController_slave_enhanced_232_OTA_ZW050x_TI\WallContro
    ller_slave_enhanced_232_OTA_ZW050x_EU_TI.ota.bin.lz1] Error 216
    make: *** [TARGET_OUT_BOOT_TEST_INTERFACE_LIBRARY_FREQUENCY_CODE_MEMORY_MODE_SEN
    SOR_TYPE_CHIP_WATCHDOG] Error 1

    C:\SDK\ProductPlus\WallController>

    ---------------------

    Thank you

    YQ

    Edited by yuqian

    Share this post


    Link to post
    Share on other sites

    Just a long shot... Does "C:\SDK\Z-Wave\lib\otacompress\otacompress.exe" exist ?

     

    I'm asking you, because, if you have followed the exact instructions from post 1, the path is:

     

    "C:\esdk\Z-Wave\lib\otacompress\otacompress.exe"

     

    It's defined in the environment variable, like this (see chapter 3 in document INS12366 Working in 500 Series Environment User Guide):

     

    TOOLSDIR=C:\esdk\Tools

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • you have to use "" when starting mk command, without it will not work, e.g. mk "FREQUENCY=EU"

    Share this post


    Link to post
    Share on other sites

    Hi Petergebruers

    >>Just a long shot... Does "C:\SDK\Z-Wave\lib\otacompress\otacompress.exe" exist ?

    Yes, it is in there, I can see it, and my path of TOOLSDIR is absolutely same as Tinman's post 

     

    Hi Timan,

    >>you have to use "" when starting mk command, without it will not work, e.g. mk "FREQUENCY=EU"

    Yes, I did, it is like  mk “BOOT=BOOTLOADER_ENABLED" "FREQUENCY=CN” "UVISION=1"

     

    Also, I have attached full log for your reference

     

    Thank you,

    YQ

    Please login or register to see this attachment.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • try to use otacompress from attached file, it is from older SDK, i had same issues and Sigma was not able to replicate it. However, it worked for me with older otacompress.

     

    For no reason (actually i only cleaned up my Keil installation, and reinstalled it) 6.81.01 with newer otacompress is working now for me. 

     

    Please login or register to see this attachment.

     

     

    Share this post


    Link to post
    Share on other sites
    Posted (edited)

    Hi Tinman,

     

    It works with the old otacompress.exe file, I got the Keil project files and compiled with Keil without problem,  thank you.

    You mean you just cleaned up your Keil and reinstalled SDK6.81.01, everything is working for you now?

     

    YQ

    Edited by yuqian

    Share this post


    Link to post
    Share on other sites
    13 minutes ago, yuqian said:

    It works with the old otacompress.exe file

    I'm glad you've found a workaround.

     

    20 minutes ago, tinman said:

    For no reason (actually i only cleaned up my Keil installation, and reinstalled it) 6.81.01 with newer otacompress is working now for me.

     

    No problems with otacompress in 6.81.01 here either... Weird... 

     

    "C:\esdk\Z-Wave\lib\otacompress\otacompress.exe .\build\WallController_slave_enhanced_232_OTA_ZW050x_TI\WallController_slave_enhanced_232_OTA_ZW050x_CN_TI.ota.bin .\build\WallController_slave_enhanced_232_OTA_ZW050x_TI\WallController_slave_enhanced_232_OTA_ZW050x_CN_TI.ota.bin.lz1"

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 23 minutes ago, yuqian said:

    Hi Tinman,

     

    It works with the old otacompress.exe file, I got the Keil project files and compiled with Keil without problem,  thank you.

    You mean you just cleaned up your Keil and reinstalled SDK6.81.01, everything is working for you now?

     

    YQ

     

    right, and do mk clean to ensure all precompiled files are gone as well.  

    Share this post


    Link to post
    Share on other sites

    Thanks for your help, I will try it out and let you know the result. 

     

    YQ

    Share this post


    Link to post
    Share on other sites

    Hi Tinman,

    It is strange for me, I've tried clean up my system and even reinstalled a brand new WIN7 system, but I still got the same issue :(

    Would you please tell me what kind of Windows system are you using?

    Also, Does anyone who still have such issue?

    YQ

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • i got it on Win 10, Sigma told me "hmm, it works for us", i installed clean Win 7 and got exact same issue, Sigma again told me "it work, probably you forgot "" signs in make". Win 7 got fixed with that, Win 10 not, so i had to clean reinstall Keil and that helped. However, feel free to ask Silabs, they have Ticket System and they will check it for you. 

     

    Share this post


    Link to post
    Share on other sites

    Hi Tinman,

    Thank you. I've been posted a support requirement to their Ticket system, hopefully, will get the response soon :( 

    YQ

    Share this post


    Link to post
    Share on other sites

    I can confirm the same problem. It seems that otacompress.exe included with the latest SDK will only work on 64bit version of Windows, so if you run 32bit you should grab the older version.

    Wojtek

    • Thanks 1

    Share this post


    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    ×