Skip to content
Permalink
Branch: master
Commits on Jul 11, 2019
  1. net: lwm2m: add custom TLS credential load function pointer

    mike-scott authored and jukkar committed Jul 8, 2019
    Current implementation of LwM2M engine doesn't allow users a way
    of overriding TLS credential load with custom function.  This
    would be needed by an offloaded TLS stack where we don't want
    to use standard Zephyr functions.
    
    Let's add a load_credential function pointer to the LwM2M client
    context which will be called when it's available.
    
    Fixes: #17408
    
    Signed-off-by: Michael Scott <mike@foundries.io>
Commits on Jul 10, 2019
  1. boards: arm: nrf52840_pca10056/nrf52_pca10040: enable pyocd runner

    mike-scott authored and MaureenHelm committed Jun 17, 2019
    Mbed OS provides a DAPlink firmware update for nRF52840-DK here:
    https://os.mbed.com/platforms/Nordic-nRF52840-DK/
    and for nRF52-DK here:
    https://os.mbed.com/platforms/Nordic-nRF52-DK/
    
    When using this firmware we need to flash the board with the pyocd
    runner.  Let's enable the pyocd runner for this purpose.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  2. sanitycheck: handle west-flash dependency for device-testing

    mike-scott authored and nashif committed Jul 9, 2019
    sanitycheck --help mentions that west-flash requires device-testing
    to be enabled (and indeed it does because DeviceHandler will never
    be called where west_flash option is used.  Let's generate an error
    if west-flash is used w/o specifying device-testing.
    
    Also cleanup help text which looks odd in both sanitycheck --help
    and in the file itself.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  3. sanitycheck: add west-runner parameter

    mike-scott authored and nashif committed Jun 18, 2019
    Several boards have multiple runners setup.  We need a way to specify
    which runner to use with sanitycheck.  Introduce --west-runner option.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
Commits on Jul 9, 2019
  1. net: lwm2m: firmware: add log_strdup to remove logging errors

    mike-scott authored and jukkar committed Jul 8, 2019
    When performing OTA using the LwM2M subsys, several logging errors
    regarding log_strdup were noted.  Let's fix these.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  2. net: lwm2m: dont select MBEDTLS or set MBEDTLS options in subsys

    mike-scott authored and jukkar committed Jul 8, 2019
    If a sample wants to use the Zephyr implementation of mbedtls, it
    enables CONFIG_MBEDTLS and sets any needed Zephyr-specific mbedtls
    options.
    
    Currently, the LwM2M subsystem selects MBEDTLS automatically when
    LWM2M_DTLS_SUPPORT is enabled.  Let's remove this and let the
    LwM2M client sample enable mbedtls and it's options.
    
    This mimics the behavior of several other network-related samples
    and removes conflicts when selecting alternate implementations of
    MBEDTLS.
    
    Fixes: #17399
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  3. net: lwm2m: fix error message in load_tls_credential()

    mike-scott authored and jukkar committed Jul 8, 2019
    Copy/paste issue was showing the wrong error message when a TLS
    credential failed to be added.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  4. net: lwm2m: remove IP CONFIG checks in lwm2m_parse_peerinfo()

    mike-scott authored and jukkar committed Jul 8, 2019
    CONFIG_NET_IPV* checks are not needed in lwm2m_parse_peerinfo().
    The functions used are always available.  Worse, having these checks
    forces the need to enable CONFIG_NET_IPV4 or IPV6 when it's not really
    needed (LwM2M could be using an offloaded IP stack).
    
    Fixes: #17401
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  5. net: lwm2m: remove IP CONFIG checks in lwm2m_sprint_ip_addr()

    mike-scott authored and jukkar committed Jul 8, 2019
    CONFIG_NET_IPV* checks are not needed in lwm2m_sprint_ip_addr().  The
    functions used are always available.  Worse, having these checks
    forces the need to enable CONFIG_NET_IPV4 or IPV6 when it's not really
    needed (LwM2M could be using an offloaded IP stack).
    
    NOTE: Also fixes an issue where a NULL is returned when the IP address
    is unknown.  This usually ends up with a crash/abort in the logging
    code.
    
    Fixes: #17401
    
    Signed-off-by: Michael Scott <mike@foundries.io>
Commits on May 30, 2019
  1. boards: rv32m1_vega_ri5cy: set shell UART in DTS

    mike-scott authored and MaureenHelm committed May 22, 2019
    This fixes any sample which enabled CONFIG_SHELL.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  2. net: lwm2m: fix log_strdup missing errors

    mike-scott authored and jukkar committed May 29, 2019
    Due to commit a211afb ("logging: Add option to detect missed
    transient string duplication"), the logs for LwM2M subsystem
    is now spamming missing log_strdup() calls.
    
    Let's add log_strdup() where needed.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
Commits on May 27, 2019
  1. boards: rv32m1_vega: add Arduino header information

    mike-scott authored and nashif committed May 22, 2019
    OpenISA Vega board has Arduino headers which can be configured for
    use with Arduino-compatible shields.  To enable this in Zephyr,
    let's define the gpio-map for Vega and set the appropriate
    arduino_serial linkage.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
Commits on May 23, 2019
  1. net: openthread: fix off-by-one error in settings offset calculation

    mike-scott authored and jukkar committed May 22, 2019
    OpenThread uses CONFIG_OT_PLAT_FLASH_PAGES_COUNT to calculate the # of
    pages at the end of flash to use for storing OpenThread settings.
    
    This calculation has an off-by-one error which sets the offset for
    the storage area as 1 page of flash too low.
    
    For example, on nRF52840:
    - default setting for CONFIG_OT_PLAT_FLASH_PAGES_COUNT is 4
    - flash size is 1MB (0x100000)
    - flash page size is 4096 (0x1000)
    - expected offset is 0xfc000
    
    Using the current logic we get an offset of: 0xfb000
    
    Fixes: #16339
    
    Signed-off-by: Michael Scott <mike@foundries.io>
Commits on May 22, 2019
  1. boards: arm: particle_boron: fix SARA-R4 gpio definitions

    mike-scott authored and nashif committed May 21, 2019
    These definitions were left incorrect after a gpio-map change was
    added to the PR introducing the boron support for the SARA-R4 modem.
    
    Correct the gpio defintions here so that the boron build doesn't
    break.
    
    Fixes: #16289
    
    Signed-off-by: Michael Scott <mike@foundries.io>
Commits on May 21, 2019
  1. boards: arm: particle_boron: enable SARA-R4 modem

    mike-scott authored and nashif committed May 17, 2019
    The Particle.io Boron is an nRF52840-based board with a connected
    u-blox SARA-R4 modem.  The main board was previously upstreamed
    without modem support.
    
    Now that we have a driver to support the SARA-R4 modem, let's enable
    it for the Boron board.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  2. boards: shields: introduce SparkFun u-blox SARA-R4 shield

    mike-scott authored and nashif committed May 17, 2019
    SparkFun offers an Arduino-R3 compatible shield using the SARA-R410M-02B
    LTE Cat M1/NB-IoT modem.
    
    Now, that the basic SARA-R4 modem driver is implemented, let's enable
    the shield for several MCUs supporting Arduino-R3 compatible headers.
    
    Product Link:
    https://www.sparkfun.com/products/14997
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  3. boards: arm: frdm_k64f: add pinmux for SARA-R4 modem

    mike-scott authored and nashif committed May 17, 2019
    Setup the SARA-R4 POWER and RESET pins as gpios.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  4. drivers: modem: introduce u-blox SARA-R4 modem driver

    mike-scott authored and nashif committed May 17, 2019
    The u-blox SARA-R4 modem modules are Ultra-compact LTE Cat
    M1 / NB1 ready:
    
    - Configurable with a single hardware version
    - Flexible mode selection as LTE Cat M1, LTE Cat NB1, EGPRS -
      only/preferred
    - Low power consumption and longer battery life
    - Extended range in buildings, basements, and with NB1,
      underground
    
    This driver introduces support for basic AT commands to
    query modem information as well as socket connection
    for TCP/UDP communication.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  5. dts: bindings: add modem binding for u-blox SARA-R4

    mike-scott authored and nashif committed May 17, 2019
    The SARA-R4 series modules from U-Blox are size-optimized LTE-M /
    NB-IoT and EGPRS modules designed for low power consumption and
    longer battery life.
    
    The binding identifies the UART device, power GPIO and reset GPIO
    lines.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  6. samples: lwm2m_client: re-add sanity check for WNC-M14A2A build

    mike-scott authored and nashif committed May 17, 2019
    Instead of using the now removed overlay files, use the SHIELD=
    command-line option for testing the WNC-M14A2A modem.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  7. boards: arm: frdm_k64f: don't use ETH if MODEM is enabled

    mike-scott authored and nashif committed May 17, 2019
    Let's change the specific WNC-M14A2A check into a more generic
    MODEM check for enabling ethernet.  Many of these pins are used
    on the Arduino headers.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  8. drivers: modem: wncm14a2a: remove HW specific Kconfig settings

    mike-scott authored and nashif committed May 17, 2019
    The WNC-M14A2A shield configuration has HW specific settings in place.
    We can remove those settings here.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  9. shields: introduce shield-based WNC-M14A2A modem setup

    mike-scott authored and nashif committed May 17, 2019
    This shield uses a non-standard UART exposed via Arduino-R3
    compatible header pins.
    
    It has configurations for FRDM_K64F and nRF52840_PCA10056.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  10. cmake: add handling for shield config and shield/board overlays

    mike-scott authored and nashif committed May 17, 2019
    Shields can often be very complex to setup in a generic way for several
    boards to support.  Let's allow shields to have their own .conf files
    as well as specialized overlays per board (when needed).
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  11. samples: lwm2m_client: cleanup shield overlay files

    mike-scott authored and nashif committed May 17, 2019
    Let's remove the sample-specific overlay files dealing with the
    WNC-M14A2A modem.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  12. board: disco_l475_iot1: add Arduino header definition to DTS

    mike-scott authored and nashif committed May 17, 2019
    Let's expose the Arduino R3-compatible pin definition as DTS
    for the disco_l475_iot1 board.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  13. boards: nrf52840_pca10056: add Arduino header definition to DTS

    mike-scott authored and nashif committed May 17, 2019
    Let's expose the Arduino R3-compatible pin definition as DTS
    for the nrf542840_pca10056 board.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  14. boards: arm: frdm_k64f: add Arduino header definition to DTS

    mike-scott authored and nashif committed May 17, 2019
    Let's expose the Arduino R3-compatible pin definition as DTS
    for the frdm_k64f board.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  15. dts/bindings: introduce Arduino-header-R3 GPIO binding

    mike-scott authored and nashif committed May 17, 2019
    This allows HW with compatible headers to define the related GPIOs
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  16. dts-binding: modem: wnc-14a2a: add label binding

    mike-scott authored and nashif committed May 17, 2019
    The label binding was missed during initial development of the
    WNC-M14A2A modem.  Let's add the binding so that during the
    migration to a shield, we can update the DTS correctly.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  17. drivers: modem: wncm14a2a: correct pinconfig assert check

    mike-scott authored and nashif committed May 17, 2019
    Assert is checking the array size of pinconfig.  Not the actual
    size of the structure.
    
    Fixes issue reported by Github User @weinholtendian
    
    Signed-off-by: Michael Scott <mike@foundries.io>
  18. drivers: modem: wncm14a2a: dont free packet on error

    mike-scott authored and nashif committed May 17, 2019
    Caller will handle freeing packet if error is encountered.
    
    Fixes issue reported by Github User @weinholtendian:
    <err> net_pkt: *** ERROR *** pkt 0x20027e78 is freed already
    by offload_sendto():1717 (context_sendto():1473).
    
    Signed-off-by: Michael Scott <mike@foundries.io>
Commits on Apr 10, 2019
  1. net: lwm2m: fix periodic services handling

    mike-scott authored and nashif committed Apr 8, 2019
    This fixes an issue where if timestamp == service_due_timestamp,
    we don't call the periodic service.  Then the following call to
    engine_next_service_timeout_ms() returns 0 because the service
    is still due and lwm2m_engine_service() is called again.
    This process repeats several times until the value of
    k_uptime_get() changes and then the work is finally handled.
    
    Previously, the resolution of k_uptime_get() was in ms.  A recent
    change to this API defaults Zephyr so that the resolution is
    set via CONFIG_SYS_CLOCK_TICKS_PER_SEC (default 100).
    
    This means the value of k_uptime_get() only changes every 10ms.
    
    Reported-by: Github User pieterjanc
    Signed-off-by: Michael Scott <mike@foundries.io>
  2. net: lwm2m: dont use system workqueue for services

    mike-scott authored and nashif committed Apr 5, 2019
    "It's a Trap!" -- Admiral Ackbar
    
    When moving to the BSD-socket APIs, the original thread running LwM2M
    periodic services such as observes and lifetime updates, was replaced
    with a re-occuring workqueue job.  To save the overhead of creating a
    new thread, I used the system workqueue for these jobs.
    
    This was a mistake.  If these jobs hit a semaphore or wait for some
    reason, it cannot be prempted due to the priority of the system work
    queue.
    
    Let's instead add this service handling to the thread that we already
    use for polling sockets.  This also removes a configuration issue where
    the system workqueue stack size needed to be increased.  This can now
    be adjusted via the LWM2M_ENGINE_STACK_SIZE knob.
    
    Directly fixes semaphore usage in the socket-based DNS code.
    This was introduced as a bugfix for non-responsive DNS server hanging
    the Zephyr device forever.  However, this probably fixes randomly
    seeming hangs on the device.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
Commits on Mar 20, 2019
  1. net/context: Relocate offload handling in net_context_connect()

    mike-scott authored and galak committed Mar 14, 2019
    Commit fc27a81 ("net: context: Select proper network interface
    when binding") moved the bind_default() call to after the remote
    address was set for the net_context.
    
    This and a later net_pkt API refactor broke net_offload() handling
    so that context->iface wasn't set and context->flags didn't have
    NET_CONTEXT_REMOTE_ADDR_SET correctly.
    
    Let's fix this by relocating the net_offload handling to after
    these have happened.
    
    Signed-off-by: Michael Scott <mike@foundries.io>
Older
You can’t perform that action at this time.