/      日本語

Revision History

Revision history of the TWELITE STAGE SDK

Update Method

Fixes and additions after the release of the TWELITE STAGE distribution package are stored in the GitHub repository. Please replace the distribution package location as needed for use. Other updates to MWSDK may be required. Please refer to the release notes at the time of update. For MWSDK updates, please refer here.

How to Update MWX Library Code

The library source code is published on the GitHub repository. To replace the library source code, follow the steps below.

Clone the Git repository or download the source code in zip format from the link of each release.

Replace the contents of the following folder:

.../MWSTAGE/              --- TWELITE STAGE distribution folder
        .../MWSDK         --- MWSDK folder
              .../TWENET/current/src/mwx <-- Replace this folder

Updates Before Release

Updates before release may be posted below.

https://github.com/monowireless/mwx/wiki

History

0.2.2 (MWSDK2025_08 version)

  • Added multi-app support (MULTINONE, which bundles multiple app codes into a single binary and selects one at startup).
    • Added MWX_ prefix to cbToCoNet_??? functions.
      • Introduced MWX_USE_ALIAS macro in mwx_appcore.c. If defined, it aliases the MWX_cbToCoNet???() callback function directly to cbToCoNet???() to suppress redundant function calls.
    • Modified packet queue size to ToCoNet_USE_MOD_TXRXQUEUE_MULTINONE.
    • Converted application-defined callback functions for interactive mode to function pointers (MWX_TWEINTRCT_***, etc.).
    • Changed the group of callback functions used in the MWX library to be called via function pointers.
      • mwx_pf_init_coldboot, mwx_pf_setup, mwx_pf_begin, mwx_pf_loop, mwx_pf_init_warmboot, mwx_pf_wakeup, mwx_pf_on_rx_packet, mwx_pf_on_tx_comp, mwx_pf_on_nwk_event.
  • Fixed inconsistency in processing before and after setup() as follows:
    • Introduced on_setup() method which is called just after ::setup() procedure.
    • Changed on_begin() which is always called just before ::begin() procedure. The on_begin() used for board behavior was called the_twelite.begin() procedure in ::setup().
  • Improved the definitions of mwx::G_BYTE(), mwx::G_WORD(), and mwx::G_DWORD() to allow their use with r-values.
  • Fixed an issue where fmt in Serial::println(T, fmt) did not output correctly when DEC or OCT was specified.
  • NAK was not being sent correctly by the Wire object.
  • Improved serial_parser to allow output with Serial << even with r-values, as shown below:
    • Serial << serparser_attach(PARSER::ASCII, buf.begin(), buf.size())
  • Added explicit to the operator bool() method.
  • Renamed mwx::S_OCTET() to mwx::S_BYTE().
  • Introduced a predefined macro MWX_PF_CALLBACKS_PRESENT to check if (*mwx_pf_setup)(), (*mwx_pf_loop)(), etc. are supported, which should be used to ask the library to use a user-defined function instead of setup(), loop(), etc.
  • Added mwx::stream::vprintfmt() to support va_list parameters.
  • Added a procedure to initialize a serial port with external memory (for FIFO).
    • mwx::serial_jen::setup(uint16_t siz_buf_tx, uint8_t *pu8_buf_tx, uint16_t siz_buf_rx, uint8_t *pu8_buf_rx)
  • Added USE_IN_TWENET_C macro to mwx_debug.h. (An experimental attempt to use the NWK_SIMPLE class without linking the mwx library).

0.2.1 (MWSDK2024_07G version)

  • Call on_rx_packet() for packets without network information (NWK_SIMPLE or others, but just a plain packet).
  • Added energy scan feature on MWX.   * Added on_nwk_event() callback on MWX (passing the completion event of Energy Scan).
  • Added vSMBusDeInit() procedure to end the use of an I2C device.
  • [GOLD] Supported the macro definitions for saving settings in the BANK7 memory area.   * G_TWENET_FREE_RUNNING_WTIMER_ENABLED()   * G_TWENET_CHIPSENSOR_ADC_TIMES_SCALER()   * G_TWENET_CHIPSENSOR_AUTO_ON_BOOT()

0.2.1 2023-06-29

  • Fixed a bug in event handling in app_core.c and unified its behavior (including the fixes from 0.2.2 below).
    • cbToCoNet_vRxEvent(): If the event is handled by network behavior, call the_vapp.cbToCoNet_vRxEvent(), otherwise call on_rx_packet().
    • cbToCoNet_vTxEvent(): If the event is handled by network behavior, call the_vapp.cbToCoNet_vTxEvent(), otherwise call on_tx_comp().
    • cbToCoNet_vNwkEvent(): If the event is handled by network behavior, call .cbToCoNet_vNwkEvent(), otherwise call on_nwk_event().
  • Enabled the use of ADC5 and ADC6 for TWELITE RED.
  • Fixed a bug in the mV calculation of the power supply voltage for TWELITE RED’s ADC.
  • Added settings::do_command().
  • Added the MWX_STGS_STD_DEF_APPID macro to explicitly set the default APP_ID for interactive mode settings.
  • [GOLD] Added support for TWELITE GOLD for the MC3630 sensor driver.
  • added div100_128th() to convert 128th value into div100() style object.
  • [GOLD] modified CPUCLK_XXX defines to fit TWELITE GOLD.
  • [GOLD] added mac_temp_update() to temperature recal of MAC/RADIO when bigger change is seen.
  • [GOLD] added get_on_boot_temperature() and get_on_boot_voltage() in div_result_i32 object.
  • [GOLD] Incorporated the I2C-related library code SMBus.[ch] into the TWENETcmpt library.
  • [GOLD] In MWX, setting g_twenet_chipsensor_auto_on_boot = 1; now automatically acquires the chip temperature sensor data. This sensor data is used for the RF part’s initialization parameters.
  • fixed that vAHI_DioWakeEdge() is not called properly when pinMode() is called for two or more ports. (storing bitmap state internally in mwx codes)
  • fixed attachIntDio() detachIntDio() to consider behavior of vAHIDioInterruptEdge().
  • fixed that repeat count of <NWK_SIMPLE> is not incremented when it’s repeating.

0.2.0 - 2022-03-01

Library NameDependency Version
mwx0.2.0
twesettings0.2.6
TWENET C1.3.5

Main changes

  • Changed the Wire object that allocates memory to the heap area.
  • To avoid name collisions in utils.h, changed the function name from G_OCTET() to G_BYTE().
  • Changed the order of vAHI_DioInterruptEnable() in attachIntDio().
  • Added the_twelite.network2 to support universal receivers (NWK_LAYERED, NWK_SIMPLE or receiving network-less packets in the same executable code).
  • Added NWK_LAYERED (currently only supports parent device reception)
  • Introduced the function MWX_Set_Usder_App_Ver() to set the application version during MWX initialization.
  • Added mwx::pnew() to simplify placement new notation.
  • Added EASTL support
    • Added new[] operator for EASTL
  • Precompiled most of the MWX source code to speed up compilation.
  • Fixed an issue where DIO events were passed to unrelated ports.

0.1.9 - 2021-12-15

Library NameDependency Version
mwx0.1.9
twesettings0.2.6
TWENET C1.3.5

Main changes

  • Added board support BRD_ARIA and sensor definition SHT4x for TWELITE ARIA
  • Added internal procedure to allow output using Serial class object during interactive mode (Serial._force_Serial_out_during_intaractive_mode())

0.1.8 - 2021-09-09

Library NameDependency Version
mwx0.1.8
twesettings0.2.6
TWENET C1.3.5

Main changes

  • Definitions of Serial1 port and alternative port were incorrect
  • Allowed changing the baud rate of Serial (UART0)
  • Added event callbacks to notify receiving packet (on_rx_packet()) and transmission completion (on_tx_comp())
    • If the callback function is not defined, the previous procedure is still available
  • Fixed incorrect definition ID and some default values in <STG_STD> interactive mode settings
  • Allowed changing default values of channel and logical device ID in addition to AppID in <STG_STD> interactive mode settings
  • Allowed some settings of the_twelite and <NWK_SIMPLE> objects to be done in interactive mode <STG_STD> object
  • Allowed setting default retry count in <NWK_SIMPLE>
  • Disabled Serial (UART0) input/output from application while <STG_STD> interactive mode screen is displayed
  • Added CUE::PIN_SET, PAL???"":PIN_SET (PIN_BTN is unnatural to use for CUE without button)
  • Moved random() namespace to mwx:: (alias in global name)
  • Changed MONOSTICK watchdog setting to 32ms units
  • Fixed pin initialization issue when sleeping with BRD_TWELITE

0.1.7 - 2020-12-03

Library NameDependency Version
mwx0.1.7
twesettings0.2.6
TWENET C1.3.4

Main changes

0.1.6 - 2020-10-09

Library NameDependency Version
mwx0.1.6
twesettings0.2.5
TWENET C1.3.4

Main changes

  • Added div100() that calculates quotient and remainder and outputs to Serial etc.
  • Changed implementation of smplbuf<> array class. To reduce memory usage, stopped inheriting mwx::stream and defined separate inherited and helper classes.
  • Added functions mwx_printf() and mwx_snprintf()
  • Added the_twelite.stop_watchdog() and the_twelite.restart_watchdog()
  • Maintained mwx::stream: Removed operator bool(). Specified timeout of 0xff disables timeout (.set_timeout(0xff)). Added other << operators.
  • Added support for NOTICE PAL / PCA9632 (Explanation https://mwx.twelite.info/v/latest/boards/pal/pal_notice, Sample https://github.com/monowireless/Act_samples/tree/master/Unit_using_PAL_NOTICE)
  • Added non-division scale functions for 8bit and 0..1000 range.
  • Added division by 10, 100, 1000 (calculating quotient and remainder simultaneously) div10(), div100(), div1000(). Limits value range and uses multiplication and bit shifts.
  • Added methods supporting encrypted packets
    • packet_rx::is_secure_pkt(): Checks if received packet is encrypted
    • STG_STD::u8encmode(): Gets encryption setting in interactive mode
    • STG_STD::pu8enckeystr(): Gets encryption key byte string in interactive mode
  • Serial1: Default port is DIO14,15 which overlaps I2C in semiconductor specs, but since I2C usually uses these, set to DIO11(TxD), DIO9(RxD).
  • Serial: Optimized baud rate specification which divides by 100 for main baud rates.
  • Serial: Reduced proxy function storage for available(), read() to only void*, saving 8 bytes.
  • Added typedef boolean
  • Network: Added encryption support.
    • To enable encryption, set NWK_SIMPLE::secure_pkt(const uint8_t*, bool = false). The first parameter is the encryption key, the second set to true allows receiving plaintext packets.
    auto&& nwk = the_twelite.network.use<NWK_SIMPLE>();
    nwk << NWK_SIMPLE::logical_id(0xFE) // set Logical ID. (0xFE means a child device with no ID)
        << NWK_SIMPLE::secure_pkt((const uint8_t*)"0123456789ABCDEF");
        ;
  • Added support for SHT3x and BME280 sensors
  • Sensor: Added mechanism for legacy code (C library wrapper classes) to exchange settings and status.
  • Sensor: Allowed specifying I2C address for SHT3x and BME280.
  • Settings: Added hide_items() to remove unnecessary setting items.
  • Settings: Added H/W UTIL menu. Displays DI status, I2C probe, PAL EEPROM contents.
  • Settings: Added encryption-related menu.
  • I2C related fixes (to improve compatibility with code implemented using TwoWire class)
    • Added missing NO_STOP message sending code in requestFrom(false).
    • Added class name alias for TwoWire.
    • Prevented multiple initialization in begin().
    • Added setClock() method (dummy function that does nothing).
    • Added WIRE_CONF::WIRE_???KHZ. Added major bus clock settings.

0.1.5 - 2020-08-05

Library NameDependency Version
mwx0.1.5
twesettings0.2.5
TWENET C1.3.4

Main changes

  • Added setting behavior (interactive mode feature)
  • Implemented channel manager chmgr

0.1.4 - 2020-07-29

Library NameDependency Version
mwx0.1.4
twesettings0.2.4
TWENET C1.3.3

Bulk download

MWSDK2020_07_UNOFFICIAL (ReadMe)

Main changes

  • Added delayMilliseconds()
  • Added digitalReadBitmap()
  • Improved accuracy of delay()
  • Fixed issue where Serial1 instance was not defined
  • Fixed issue where Analogue interrupt handler was not called

0.1.3 - 2020-05-29

Corresponds to MWSDK2020_05

Main changes

  • Initialization of duplicate checker duplicate_checker was inadequate and did not remove duplicates as expected
  • Replaced format() implementation with less platform-dependent one. Also limited arguments to maximum 8. Number of arguments is limited if 64-bit arguments are included.

https://github.com/monowireless/mwx/releases/tag/0.1.3

0.1.2 - 2020-04-24

Corresponds to MWSDK2020_04

Main changes

  • Fixed initialization issues of Timer0..4
  • Changed internal processing of mwx::format()
  • Added experimental code for interactive mode support

https://github.com/monowireless/mwx/releases/tag/0.1.2

0.1.1 - 2020-02-28

Main changes

  • Fixed issue with handling of relay flags inside packets

https://github.com/monowireless/mwx/releases/tag/0.1.1

0.1.0 - 2019-12-23

First release (included in SDL December 2019 issue)

https://github.com/monowireless/mwx/releases/tag/0.1.0