diff --git a/configs/stm32f4discovery/README.txt b/configs/stm32f4discovery/README.txt index 34de5faca4..536c9c74a6 100644 --- a/configs/stm32f4discovery/README.txt +++ b/configs/stm32f4discovery/README.txt @@ -627,6 +627,18 @@ BT860 configure a new U[S]ART and/or modify the pin selections in include/board.h. +CC2564 +------ + + [To be provided] + + One confusing thing compared with the BT860 is in the naming of the pins + at the 4-pin RS232 TTL interface: The BT860 uses BT860-centric naming, + the Rx pin is for BT860 receive and needs to connect with the STM32 Tx + pin, the Tx pin is for BT860 transmit an needs to be connected with the + STM32 Rx pin, etc. The CC2564, on the hand, uses host-centric naming so + that the CC2564 Rx pin connects to the STM32 Rx pin, Tx to Tx pin, etc. + Troubleshooting --------------- @@ -1331,6 +1343,12 @@ Configuration Sub-directories pin 5 Module_TX_O USART3_RX PB11, P1 pin 35 pin 6 Module_CTS_I USART3_RTS PB14, P1 pin 38 + NOTICE that the BT860 uses BT860-centric naming, the Rx pin is for + BT860 receive and needs to connect with the STM32 Tx pin, the Tx pin + is for BT860 transmit an needs to be connected with the STM32 Rx pin, + etc. Other parts may use host-centric naming so that the HCI UART Rx + pin connects to the STM32 Rx pin, Tx to Tx pin, etc. + 3. Due to conflicts, USART3 many not be used if Ethernet is enabled with the STM32F4DIS-BB base board: diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c index b2479d6274..4409680fd9 100644 --- a/net/inet/inet_sockif.c +++ b/net/inet/inet_sockif.c @@ -707,15 +707,19 @@ static int inet_connect(FAR struct socket *psock, addr = NULL; } - /* Peform the connect/disconnect operation */ + /* Perform the connect/disconnect operation */ ret = udp_connect(psock->s_conn, addr); - if (ret < 0) + if (ret < 0 || addr == NULL) { + /* Failed to connect or explicitly disconnected */ + psock->s_flags &= ~_SF_CONNECTED; } else { + /* Successfully connected */ + psock->s_flags |= _SF_CONNECTED; }