Git Product home page Git Product logo

ruuvitag_fw_zephyr's Introduction

ruuvitag_fw_zephyr

Ruuvitag FW based on Zephyr OS.

Build Environment

Ruuvi Node is developed using nRF Connect SDK(NCS) V1.7.0.

NCS

Nordic Semiconductor keeps up-to-date instructions on how to setup the SDK for Linux, Mac OSX and Windows. Instructions can be found at https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/nrf/getting_started.html

Cloning

To clone the directory follow the following.

cd ~/ncs/nrf/applications
git clone https://github.com/theBASTI0N/ruuvitag_fw_zephyr.git
cd ruuvi.node_nrf91.c

Note

The examples given assume you are using linux. All commands assume that nRF Connect SDK has been setup as per the instructions in the above link.

Building West

Once in the project directory, make can be used to build the different variances of the firmware and flash them to a board.

# Makes the standard FW and flashes it to a connected board.
make

# Makes the standard FW with or without debugging enabled.
make app
make app_debug

# Makes the full FW with or without debugging enabled. (Includes MCUBOOT)
make app_bootloader
make app_bootloader_debug

# Flashed the last built FW
make flash

# Connects to the device to view debu messages
make connect

# Displays the debug messages
make debug

# Cleans all build directories
make clean

Remote DFU

To enable your ruuvitag to receive an update the following can be done:

  • Press B when rebooting the tag.
  • Press B at any time whilst running.

Once in the update mode nRF connect can be used on a phone to update the tag. The process is the same as a standard ruuvitag, however the file need is the update.bin file. This can be found at: ruuvitag_fw_zephyr/build/zephyr/app_update.bin or in the releases.

DFU Timeout

The update mode of the tag will by default time out after 2 minutes. The tag will then start beaconing again.

Note

The GitHub workflow is adapted from @bifravst/firmware and is BSD-5-Clause-Nordic licensed.

ruuvitag_fw_zephyr's People

Contributors

a-smiggle avatar alueger avatar dependabot[bot] avatar thebasti0n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ruuvitag_fw_zephyr's Issues

NFC data enhancements

Look into if sensor data could be added into NFC data. For example records would be added for each temp, humidity, acc events. This data should be updated periodically, say every 1 minute.

Detailed WiKi

Create a detailed WiKi so that new user can easily get setup and started.

Power Usage

Currently the power usage of the ruuvitag is sitting at between 56 to 60 ÂľA.

Ideally the power usage would be similar to the current Ruuvitag FW which is drawing 20 uA.

No board named 'nrf52_ruuvi' found

I've tried following this, both the existing install and fresh install and end up with No board named 'nrf52_ruuvi' found in both cases, so it seems I'm missing something.

(also pip3 install -r /zephyr/scripts/requirements.txt I guess should be pip3 install -r zephyr/scripts/requirements.txt without the leading / ?)

user@hostname:~/ruuvi_zephyr$ west build -b nrf52_ruuvi zephyr/samples/basic/blinky
-- west build: generating a build system
Including boilerplate (Zephyr base): /home/user/ruuvi_zephyr/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/user/ruuvi_zephyr/zephyr/samples/basic/blinky
-- Zephyr version: 2.2.99 (/home/user/ruuvi_zephyr/zephyr)
CMake Warning (dev) at /home/user/.local/lib/python3.6/site-packages/cmake/data/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PythonInterp) does not match the name of the calling package (Zephyr).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /home/user/ruuvi_zephyr/zephyr/cmake/backports/FindPythonInterp.cmake:174 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /home/user/ruuvi_zephyr/zephyr/cmake/python.cmake:22 (include)
  /home/user/ruuvi_zephyr/zephyr/cmake/app/boilerplate.cmake:115 (include)
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:4 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
 
-- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.8", minimum required is "3.6")
-- Board: nrf52_ruuvi
No board named 'nrf52_ruuvi' found
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
see usage:
Cleaning targets:
  clean     - Remove most generated files but keep configuration and backup files
  pristine  - Remove all files in the build directory
 
Configuration targets:
 
  menuconfig - Update configuration using an interactive configuration interface
 
Other generic targets:
  all          - Build a zephyr application
  run          - Build a zephyr application and run it if the board supports emulation
  flash        - Build and flash an application
  debug        - Build and debug an application using GDB
  debugserver  - Build and start a GDB server (port 1234 for Qemu targets)
  ram_report   - Build and create RAM usage report
  rom_report   - Build and create ROM usage report
  usage        - Display this text
 
Supported Boards:
 
  To generate project files for one of the supported boards below, run:
 
  $ cmake -DBOARD=<BOARD NAME> [-DSHIELD=<SHIELD NAME>] -Bpath/to/build_dir -Hpath/to/source_dir
 
  or
 
  $ export BOARD=<BOARD NAME>
  $ export SHIELD=<SHIELD NAME> #optional
  $ cmake -Bpath/to/build_dir -Hpath/to/source_dir
 
  arc:
    em_starterkit
    em_starterkit_em11d
    em_starterkit_em7d
    em_starterkit_em7d_normal
    em_starterkit_em7d_v22
    emsdp
    emsdp_em4
    emsdp_em5d
    emsdp_em6
    emsdp_em7d
    emsdp_em7d_esp
    emsdp_em9d
    hsdk
    iotdk
    nsim_em
    nsim_em_mpu_stack_guard
    nsim_hs
    nsim_hs_smp
    nsim_sem
    nsim_sem_mpu_stack_guard
    nsim_sem_normal
  arm:
    96b_argonkey
    96b_avenger96
    96b_carbon
    96b_carbon_nrf51
    96b_meerkat96
    96b_neonkey
    96b_nitrogen
    96b_stm32_sensor_mez
    96b_wistrio
    actinius_icarus
    actinius_icarus_ns
    adafruit_feather_m0_basic_proto
    adafruit_feather_nrf52840
    adafruit_feather_stm32f405
    adafruit_trinket_m0
    arduino_due
    arduino_zero
    atsamd20_xpro
    atsamd21_xpro
    atsame54_xpro
    atsamr21_xpro
    b_l072z_lrwan1
    bbc_microbit
    bcm958401m2
    bl652_dvk
    bl654_dvk
    black_f407ve
    cc1352r1_launchxl
    cc26x2r1_launchxl
    cc3220sf_launchxl
    cc3235sf_launchxl
    colibri_imx7d_m4
    cy8ckit_062_wifi_bt_m0
    cy8ckit_062_wifi_bt_m4
    decawave_dwm1001_dev
    degu_evk
    disco_l475_iot1
    dragino_lsn50
    efm32gg_stk3701a
    efm32hg_slstk3400a
    efm32pg_stk3402a
    efm32pg_stk3402a_jg
    efm32wg_stk3800
    efr32_radio_brd4104a
    efr32_radio_brd4250b
    efr32_slwstk6061a
    efr32mg_sltb004a
    frdm_k22f
    frdm_k64f
    frdm_k82f
    frdm_kl25z
    frdm_kw41z
    google_kukui
    hexiwear_k64
    hexiwear_kw40z
    holyiot_yj16019
    ip_k66f
    lpcxpresso54114_m0
    lpcxpresso54114_m4
    lpcxpresso55s69_cpu0
    lpcxpresso55s69_cpu1
    lpcxpresso55s69_ns
    mec1501modular_assy6885
    mec15xxevb_assy6853
    mec2016evb_assy6797
    mikroe_mini_m4_for_stm32
    mimxrt1010_evk
    mimxrt1015_evk
    mimxrt1020_evk
    mimxrt1050_evk
    mimxrt1050_evk_qspi
    mimxrt1060_evk
    mimxrt1060_evk_hyperflash
    mimxrt1064_evk
    mm_swiftio
    mps2_an385
    mps2_an521
    mps2_an521_nonsecure
    msp_exp432p401r_launchxl
    nrf51_ble400
    nrf51_blenano
    nrf51_vbluno51
    nrf51dk_nrf51422
    nrf51dongle_nrf51422
    nrf52832_mdk
    nrf52833dk_nrf52833
    nrf52840_blip
    nrf52840_mdk
    nrf52840_papyr
    nrf52840dk_nrf52811
    nrf52840dk_nrf52840
    nrf52840dongle_nrf52840
    nrf52_adafruit_feather
    nrf52_blenano2
    nrf52_sparkfun
    nrf52_vbluno52
    nrf52dk_nrf52810
    nrf52dk_nrf52832
    nrf5340pdk_nrf5340_cpuapp
    nrf5340pdk_nrf5340_cpuappns
    nrf5340pdk_nrf5340_cpunet
    nrf9160dk_nrf52840
    nrf9160dk_nrf9160
    nrf9160dk_nrf9160ns
    nucleo_f030r8
    nucleo_f070rb
    nucleo_f091rc
    nucleo_f103rb
    nucleo_f207zg
    nucleo_f302r8
    nucleo_f303re
    nucleo_f334r8
    nucleo_f401re
    nucleo_f411re
    nucleo_f412zg
    nucleo_f413zh
    nucleo_f429zi
    nucleo_f446re
    nucleo_f746zg
    nucleo_f756zg
    nucleo_f767zi
    nucleo_g071rb
    nucleo_g431rb
    nucleo_g474re
    nucleo_h743zi
    nucleo_l053r8
    nucleo_l073rz
    nucleo_l152re
    nucleo_l432kc
    nucleo_l452re
    nucleo_l476rg
    nucleo_l496zg
    nucleo_l4r5zi
    nucleo_wb55rg
    olimex_stm32_e407
    olimex_stm32_h407
    olimex_stm32_p405
    olimexino_stm32
    particle_argon
    particle_boron
    particle_xenon
    pico_pi_m4
    qemu_cortex_a53
    qemu_cortex_m0
    qemu_cortex_m3
    qemu_cortex_r5
    reel_board
    reel_board_v2
    sam4e_xpro
    sam4s_xplained
    sam_e70_xplained
    sam_e70b_xplained
    sam_v71_xult
    sam_v71b_xult
    sensortile_box
    steval_fcu001v1
    stm3210c_eval
    stm32373c_eval
    stm32_min_dev_black
    stm32_min_dev_blue
    stm32f030_demo
    stm32f072_eval
    stm32f072b_disco
    stm32f0_disco
    stm32f3_disco
    stm32f411e_disco
    stm32f412g_disco
    stm32f429i_disc1
    stm32f469i_disco
    stm32f4_disco
    stm32f723e_disco
    stm32f746g_disco
    stm32f769i_disco
    stm32g0316_disco
    stm32h747i_disco_m4
    stm32h747i_disco_m7
    stm32l1_disco
    stm32l476g_disco
    stm32l496g_disco
    stm32mp157c_dk2
    stm32vl_disco
    thingy52_nrf52832
    twr_ke18f
    twr_kv58f220m
    udoo_neo_full_m4
    usb_kw24d512
    v2m_beetle
    v2m_musca
    v2m_musca_nonsecure
    v2m_musca_b1
    v2m_musca_b1_nonsecure
    warp7_m4
  nios2:
    altera_max10
    qemu_nios2
  posix:
    native_posix_64
    native_posix
    nrf52_bsim
  riscv:
    hifive1
    hifive1_revb
    litex_vexriscv
    m2gl025_miv
    qemu_riscv32
    qemu_riscv64
    rv32m1_vega_ri5cy
    rv32m1_vega_zero_riscy
  x86:
    acrn
    gpmrb
    minnowboard
    qemu_x86_64
    qemu_x86_coverage
    qemu_x86
    qemu_x86_nommu
    up_squared
  xtensa:
    esp32
    intel_s1000_crb
    odroid_go
    qemu_xtensa
    up_squared_adsp
    xt-sim
    xt-sim_intel_s1000
 
Supported Shields:
 
 adafruit_2_8_tft_touch_v2
 boostxl_ulpsense
 dfrobot_can_bus_v2_0
 frdm_cr20a
 frdm_kw41z
 link_board_eth
 lmp90100_evb
 mikroe_adc_click
 nrf52840dk_nrf52840
 sparkfun_sara_r4
 reel_board
 sh1106_128x64
 ssd1306_128x32
 ssd1306_128x64
 st7789v_tl019fqv01
 st7789v_waveshare_240x240
 waveshare_epaper_gdeh0213b1
 waveshare_epaper_gdeh0213b72
 waveshare_epaper_gdeh029a1
 waveshare_epaper_gdew075t7
 frdm_k64f
 nrf52840dk_nrf52840
 wnc_m14a2a
 stm32mp157c_dk2
 x_nucleo_idb05a1
 x_nucleo_iks01a1
 stm32mp157c_dk2
 x_nucleo_iks01a2
 stm32mp157c_dk2
 stm32mp157c_dk2
 x_nucleo_iks01a3
 x_nucleo_iks01a3_shub
 
Build flags:
 
  ninja -v [targets] verbose build
  cmake -DW=n   Enable extra gcc checks, n=1,2,3 where
   1: warnings which may be relevant and do not occur too often
   2: warnings which occur quite often but may still be relevant
   3: more obscure warnings, can most likely be ignored
   Multiple levels can be combined with W=12 or W=123
CMake Error at /home/user/ruuvi_zephyr/zephyr/cmake/app/boilerplate.cmake:409 (message):
  Invalid usage
Call Stack (most recent call first):
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:4 (find_package)
 
 
-- Configuring incomplete, errors occurred!
See also "/home/user/ruuvi_zephyr/build/CMakeFiles/CMakeOutput.log".
FATAL ERROR: command exited with status 1: /home/user/.local/bin/cmake -B/home/user/ruuvi_zephyr/build -S/home/user/ruuvi_zephyr/zephyr/samples/basic/blinky -GNinja -DBOARD=nrf52_ruuvi
user@hostname:~/ruuvi_zephyr$

Bootloader causing issue

Currently firmware built with the bootloader are not starting.

More investigation into reason is needed.

Update README

README needs to be updated. It is based on an older release.

LIS2DH12 Interrupt Not Working

The current driver for the LIS2DH doesn't seem to work perfectly with the lis2dh12 using SPI.

The interrupt seems to be usuable for data ready signals which is not useful as this interrupt is continous.

A new driver should be created for the lis2dh12 for more specific control.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.