-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
applications: serial_lte_mondem: NCSIDB-138 Serial LTE Modem two feat… #2508
Conversation
All checks are passing now. Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
edbc26c
to
a1b00a7
Compare
@@ -19,6 +19,7 @@ LOG_MODULE_REGISTER(tcp_proxy, CONFIG_SLM_LOG_LEVEL); | |||
#define THREAD_STACK_SIZE (KB(1) + NET_IPV4_MTU) | |||
#define THREAD_PRIORITY K_LOWEST_APPLICATION_THREAD_PRIO | |||
#define DATA_HEX_MAX_SIZE (2 * NET_IPV4_MTU) | |||
#define data_buf_SIZE CONFIG_AT_CMD_RESPONSE_MAX_LEN/2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use upper case for defines. Spaces around /
.
@@ -344,6 +350,33 @@ static int do_tcp_send(const u8_t *data, int datalen) | |||
} | |||
} | |||
|
|||
static int tcp_data_save(u8_t *data, u16_t length) | |||
{ | |||
u16_t sz_avail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zephyr provides a ring buffer implementation, have you considered using it instead of implementing it on your own? Should be less error-prone:
https://github.com/zephyrproject-rtos/zephyr/blob/master/include/sys/ring_buffer.h#L346
From what I understand all we need is to declare a ring buffer and then call ring_buf_put()
/ring_buf_get()
when needed.
a1b00a7
to
cb77a98
Compare
…ures Customer engineering, new features added to SLM TCP Proxy Feature nrfconnect#1 is handled by new unsolicited notification of "#XTCPDATA", then client could fetch all data with "AT#XTCPRECV" command. If received data cannot be reserved inside SLM, an OVERRUN unsolicited notification is sent then data is dropped. Feature nrfconnect#2 is handled by returning socket handles. Also added an unsolicited notification when TCP Server close client connection due to connection time-out. Signed-off-by: Jun Qing Zou <jun.qing.zou@nordicsemi.no>
cb77a98
to
a89fb99
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Customer engineering, new features added to SLM TCP Proxy
Feature #1 is handled by new unsolicited notification of "#XTCPDATA",
then client could fetch all data with "AT#XTCPRECV" command. If
received data cannot be reserved inside SLM, an OVERRUN unsolicited
notification is sent then data is dropped.
Feature #2 is handled by returning socket handles. Also added an
unsolicited notification when TCP Server close client connection due to
connection time-out.
Signed-off-by: Jun Qing Zou jun.qing.zou@nordicsemi.no