Commit Graph

34621 Commits (master)

Author SHA1 Message Date
YannCharbon 0d2badf42c Add complete support of DHCP relay interface ID option
RFC3315 specifies the following: "The relay agent MAY send the Interface-id
option to identify the interface on which the client message was received.
If a relay agent  receives a Relay-reply message with an Interface-id
option, the relay agent relays the message to the client through the
interface identified by the option."

The current implementation of the DHCP relay reply handling, the interface
ID field from the server response is ignored. Managing the interface ID
is very important especially as DHCP requests/replies use link-local
addresses. The consequence of this is that the interface must always be
specified because the routing layer cannot guess the correct interface.
Moreover, Mbed provides a mechanism to enable/disable the interface ID
option on a DHCP relay instance, so it is important to fully support it.

The reason why this issue has not been discoverd until now is that the DHCP
relay is mainly used on systems that use only one interface (such as Wi-SUN
routers). By default, when no interface ID is specified for the socket, the
latter will choose 6loWPAN interface by default. This means that if two
interfaces are used on the same device, the 6loWPAN interface is always
selected.

The commit adds code to retrieve the interface-id value contained within
the DHCP relay reply message and write it to a control message header
that is added to the socket message. This tells the socket which
interface to choose. If the interface-id option is not enabled on the
relay, this procedure is simply ignored.
2022-08-30 17:49:41 +02:00
Martin Kojtal 807fd79651
Merge pull request #15320 from dgoo2308/lora_as923_sub_region
LoRaWAN AS923 Add SUB_REGION AS1..AS4
2022-08-25 17:32:38 +02:00
Martin Kojtal d4f97aab10
Merge pull request #15325 from deepak-shreshti/master
Updated System file and Scatter file
2022-08-25 14:13:30 +02:00
Martin Kojtal 48ae8447db
Merge pull request #15323 from majcher/patch-1
Fix missing mbed:: prefix issue
2022-08-25 14:13:16 +02:00
Martin Kojtal c9a3db540f
Merge pull request #15322 from jeromecoutant/PR_WL_SLEEP
STM32WL: fix MBED_CONF_STM32WL_LORA_DRIVER_SLEEP_MODE option
2022-08-24 15:47:14 +02:00
Deepak V. Shreshti 61e5a61e34 Removed UTF-8 Chars 2022-08-24 18:31:42 +05:30
Michał Majcherski b932850d62
Fix missing mbed:: profix issue 2022-08-23 22:47:56 +02:00
Deepak V. Shreshti adadcf3171 Updated System file and Scatter file 2022-08-23 18:26:51 +05:30
Jerome Coutant 1bf8667136 STM32WL: fix MBED_CONF_STM32WL_LORA_DRIVER_SLEEP_MODE option 2022-08-18 14:53:58 +02:00
Danny Goossen 3508ec2b71
apply astyle patch 2022-08-18 00:25:21 -04:00
Martin Kojtal b482f2dcec
Merge pull request #15312 from hallard/prep_rak3172sip
STMWL32 preparation for new chip rak3172sip
2022-08-17 13:11:07 +02:00
Charles 42e11ac9bd Allow to use LowPower fix as a parameter
Allow to use TCXO Control Voltage and LowPower fix as a parameter

leave current default value to avoid breaking changes

astyle fix
2022-08-16 13:45:45 +02:00
Danny Goossen 30a156056c
fix styling with astyle for LoRaPHYAS923.cpp 2022-08-11 11:08:40 -04:00
Danny Goossen 199c85629d LoRaWAN AS923 Add SUB_REGION AS1..AS4 2022-08-11 04:06:30 -04:00
chdelfs 581cd80943
Fix for calculating CAN timing settings.
NominalPrescaler value needs to be as high as possible to ensure a good approximation of the target CAN speed.
Previous usage of macro IS_FDCAN_DATA_TSEG1 refers to (unsupported by Mbed ) FDCAN CAN controller settings and leads to too low prescaler values.
Usage Macro IS_FDCAN_NOMINAL_TSEG1 yields optimum results.
See also correct macro usage in line #158.
2022-08-04 18:48:22 +02:00
Martin Kojtal 9ca538338a
Merge pull request #15311 from skazemi/fix/missing-global-up-callback
Fix missing global up callback in CellularContext
2022-08-03 13:13:22 +01:00
Martin Kojtal e6e5083e65
Merge pull request #15313 from OpenNuvoton/nuvoton_m487_fix_null_mpi_cmp
M487: Fix mbedtls_ecp_point_cmp() call with null argument
2022-08-03 13:07:19 +01:00
Chun-Chieh Li 127b5aa023 M487: Fix mbedtls_ecp_point_cmp() call with null argument
Guard from null argument passed to mbedtls_ecp_point_cmp() in ECC H/W port
2022-07-26 09:23:37 +08:00
Saeed Kazemi 19fddbf01a
Fix missing GLOBAL_UP callback on successful connect
Fix an issue where CellularContext::do_connect_with_retry() does not call NSAPI_STATUS_GLOBAL_UP callback and validate_ip_address() on successful connect after failed try in blocking mode.
2022-07-25 09:25:36 +02:00
Saeed Kazemi 63dc2fd550
Fix missing GLOBAL_UP callback on successful connect
Fix an issue where CellularContext::do_connect_with_retry() does not call NSAPI_STATUS_GLOBAL_UP callback on successful connect after failed try in blocking mode.
2022-07-22 17:01:39 +02:00
Martin Kojtal 91b793c4fd
Merge pull request #15306 from horeich/dev
Add missing unlock() in file_truncate in FATFileSystem
2022-07-04 14:55:12 +01:00
Andreas Reichle e42fa8ffe3 add missing unlock in file_truncate in FATFileSystem 2022-07-04 11:21:50 +02:00
Martin Kojtal daf61122e8
Merge pull request #15299 from mikrodust-henrikp/stm32f412xe_build_fix
Make STM32F412xE targets build
2022-06-29 08:52:37 +01:00
Martin Kojtal 6fcd9c617f
Merge pull request #15302 from yutotnh/rename-read_pulsewitdth_us
rename: PwmOut::read_pulsewitdth_us() to PwmOut::read_pulsewidth_us()
2022-06-27 14:41:02 +01:00
yutotnh 0992a6cc11
fix: typo in PwmOut.h (pulsewith -> pulsewidth) 2022-06-25 08:21:51 +09:00
Martin Kojtal bc6be806df
Merge pull request #15297 from byq77/cli2-cmake-artifact-name-property-support
cli2 artifact name property support for cmake targets
2022-06-23 16:05:06 +01:00
Martin Kojtal 10e01514c5
Merge pull request #15295 from hifoolno/bug5
lwiperf: fix double-free of pcb on error
2022-06-23 16:04:29 +01:00
yutotnh 236194f7c3
add: PwmOut::read_pulsewitdth_us() for compatibility 2022-06-23 21:59:03 +09:00
yutotnh 7fe679c72e
fix: typo in pwmout_api.h (pulsewitdth -> pulsewidth) 2022-06-22 00:00:29 +09:00
yutotnh 6a4ba443ea
rename: read_pulsewitdth_us to read_pulsewidth_us 2022-06-21 23:25:43 +09:00
Henrik Persson 684181c40b Add targets.json definition for STM32F412xE 2022-06-20 17:09:02 +02:00
Henrik Persson bdaa4a457d Make STM32F412xE targets build
Trying to inherit the STM32F412xE target makes the linker fail, since
__CRASH_DATA_RAM_START__ is not present. Comparing LD scripts with the
STM32F412xG (which has active targets) it seems that the xE variant has
missed some updates somewhere. Since the LD scripts are otherwise
identical, copying the (working) ones from STM32F412xG seems to do the
trick.

Also added flash_data.h which was missing and needed here and there
(copied from xG and updated to fit the xE flash layout).
2022-06-16 16:05:34 +02:00
byq77 21ca5b62c9 update to mbed_generate_bin_hex cmake function 2022-06-15 17:03:53 +02:00
mbedmain 54e8693ef4 Update Mbed version block 2022-06-14 15:24:16 +01:00
xiaohuizhang98 fe13765d1f lwiperf: fix double-free of pcb on error 2022-06-11 00:08:46 +08:00
Martin Kojtal 4e7b0329e8
Merge pull request #15291 from MultiTechSystems/MTS-001-MTDOT-CLK-FIX
Mts 001 mtdot clk fix
2022-06-10 11:14:00 +01:00
Martin Kojtal d994efc2b8
Merge pull request #15273 from Tobi15/main
add the possibility to customize the delimiter of the ATHandler in AT…
2022-06-10 11:13:13 +01:00
Jason Reiss 4d616ccc70 MTS002: update MTS_MDOT_F411RE usb clock setting for 8MHz output 2022-06-08 08:42:22 -05:00
Jason Reiss 0905a2e672 MTS001 - add custom clock configuration for MTS_MDOT_F411RE to use 26MHz XTAL 2022-06-08 08:42:22 -05:00
Martin Kojtal 6170f55c64
Merge pull request #15287 from OpenNuvoton/nuvoton_fix_ecp-load-curve448
Mbed TLS: Fix wrong MPI N in ECP Curve448 curve
2022-06-02 10:31:39 +01:00
Martin Kojtal b6fadd3221
Merge pull request #15289 from OpenNuvoton/nuvoton_m487_des_ecp
M487: Fix crypto h/w port
2022-05-30 09:27:18 +01:00
Chun-Chieh Li b402c97136 M487: Fix ECP P + P operation
Engine doesn't support P + Q when P and Q are the same. Workaround by 2*P
2022-05-24 17:38:02 +08:00
Chun-Chieh Li 3adb735d3e M487: Fix typo with DES H/W port 2022-05-24 16:37:46 +08:00
Chun-Chieh Li 9345c8a014 Mbed TLS: Fix wrong MPI N in ECP Curve448 curve
In loading Curve448, MPI N is in uninitialized state and its sign flag N.s isn't initialized to 1.
This is fixed by following:
https://github.com/Mbed-TLS/mbedtls/pull/5811
2022-05-24 16:24:46 +08:00
Martin Kojtal 1ab98dec9a
Merge pull request #15286 from pilotak/master
STM32G4: Fix serial port at low speed baud
2022-05-13 14:47:44 +02:00
Martin Kojtal 15d1b9396a
Merge pull request #15284 from ramielkhatibPQS/master
Fix MPS2 CM3DS ethernet driver
2022-05-13 11:38:43 +02:00
Pavel S 58e6bf7520
Fix serial low speed baud 2022-05-13 11:16:15 +02:00
Rami Elkhatib fdf37c3217 MPS2 CM3DS ethernet words instead of bytes
The functions smsc9220_receive_by_chunks and smsc9220_send_by_chunks are
supposed to implement receiving and sending packets by chunks. However,
the functions SMSC9220_EMAC::low_level_input and SMSC9220_EMAC::link_out,
which call them respectively, already require or assemble the full packet.
Also, smsc9220_receive_by_chunks doesn't implement the "chunks" part.

This commit renames the functions to smsc9220_receive_packet and
smsc9220_send_packet. The functions now do their operations by word
instead of by bytes. The functions SMSC9220_EMAC::low_level_input and
SMSC9220_EMAC::link_out already handle allocation, continuity and word
alignment of the packet buffer.
2022-05-12 18:27:49 -04:00
Rami Elkhatib f7aca62865 MPS2 CM3DS ethernet fix packet bug
The function smsc9220_receive_by_chunks loads data from the Ethernet port.
It is expected to return the Ethernet frame without the 4 CRC bytes.
However, it is required to call the Ethernet data port register (32-bit)
an amount equal to the number of frame words (including the 4 CRC bytes)
to pop all frame words. The current code doesn't call the register for the
last word (which has CRC data). This causes subsequent calls to have this
missed word at the beginning. The impact of this is huge as the high level
API is getting fed wrong data. The fix adds one additional call to the data
port register.
2022-05-12 18:25:15 -04:00
Rami Elkhatib cbfda0e23b MPS2 CM3DS ethernet fix heap bug
The function SMSC9220_EMAC::low_level_input should create a heap for the
packet equal to the size of the message (most of which are couple hundred
bytes). The current code uses maximum frame size (1522 bytes) for each
packet. This will cause the heap to quickly fill up. In fact, the default
memory size (lwip.mem-size) used for this heap is 1600 bytes. This means
that once you have one other packet allocated (extremely common), the
heap allocation will always fails.

Also, it is recommend to increase the default lwip.mem-size because that
amount is very small especially if you send or receive a few large packets
in the network. This is NOT done in current commit.
2022-05-12 18:23:41 -04:00