modem: modem_cmux: Set C/R bit in UIH frames
This commit sets the C/R (command/response) bit when UIH CMUX frames are sent from the modem_cmux module. This bit is ignored by some modems like the Quectel BG95, as there is no defined response to this specific CMUX frame type. However, other modems, like the TELIT ME910, require the bit to be set (command). If the bit is not set, the modem will simply ignore the frame completely. Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit is contained in:
parent
b3c5150753
commit
1816b6380b
|
@ -790,7 +790,7 @@ static int modem_cmux_dlci_pipe_api_transmit(void *data, const uint8_t *buf, siz
|
||||||
|
|
||||||
struct modem_cmux_frame frame = {
|
struct modem_cmux_frame frame = {
|
||||||
.dlci_address = dlci->dlci_address,
|
.dlci_address = dlci->dlci_address,
|
||||||
.cr = false,
|
.cr = true,
|
||||||
.pf = false,
|
.pf = false,
|
||||||
.type = MODEM_CMUX_FRAME_TYPE_UIH,
|
.type = MODEM_CMUX_FRAME_TYPE_UIH,
|
||||||
.data = buf,
|
.data = buf,
|
||||||
|
|
|
@ -150,10 +150,10 @@ static uint8_t cmux_frame_resync[] = {0xF9, 0xF9, 0xF9};
|
||||||
/* DLCI2 PPP CMUX frames */
|
/* DLCI2 PPP CMUX frames */
|
||||||
/*************************************************************************************************/
|
/*************************************************************************************************/
|
||||||
static uint8_t cmux_frame_dlci2_ppp_52[] = {
|
static uint8_t cmux_frame_dlci2_ppp_52[] = {
|
||||||
0xF9, 0x09, 0xEF, 0x69, 0x7E, 0xFF, 0x7D, 0x23, 0xC0, 0x21, 0x7D, 0x21, 0x7D, 0x20, 0x7D,
|
0xF9, 0x0B, 0xEF, 0x69, 0x7E, 0xFF, 0x7D, 0x23, 0xC0, 0x21, 0x7D, 0x21, 0x7D, 0x20, 0x7D,
|
||||||
0x20, 0x7D, 0x38, 0x7D, 0x22, 0x7D, 0x26, 0x7D, 0x20, 0x7D, 0x20, 0x7D, 0x20, 0x7D, 0x20,
|
0x20, 0x7D, 0x38, 0x7D, 0x22, 0x7D, 0x26, 0x7D, 0x20, 0x7D, 0x20, 0x7D, 0x20, 0x7D, 0x20,
|
||||||
0x7D, 0x23, 0x7D, 0x24, 0xC0, 0x23, 0x7D, 0x25, 0x7D, 0x26, 0x53, 0x96, 0x7D, 0x38, 0xAA,
|
0x7D, 0x23, 0x7D, 0x24, 0xC0, 0x23, 0x7D, 0x25, 0x7D, 0x26, 0x53, 0x96, 0x7D, 0x38, 0xAA,
|
||||||
0x7D, 0x27, 0x7D, 0x22, 0x7D, 0x28, 0x7D, 0x22, 0xD5, 0xA8, 0x7E, 0x97, 0xF9};
|
0x7D, 0x27, 0x7D, 0x22, 0x7D, 0x28, 0x7D, 0x22, 0xD5, 0xA8, 0x7E, 0xF6, 0xF9};
|
||||||
|
|
||||||
static uint8_t cmux_frame_data_dlci2_ppp_52[] = {
|
static uint8_t cmux_frame_data_dlci2_ppp_52[] = {
|
||||||
0x7E, 0xFF, 0x7D, 0x23, 0xC0, 0x21, 0x7D, 0x21, 0x7D, 0x20, 0x7D, 0x20, 0x7D,
|
0x7E, 0xFF, 0x7D, 0x23, 0xC0, 0x21, 0x7D, 0x21, 0x7D, 0x20, 0x7D, 0x20, 0x7D,
|
||||||
|
@ -161,9 +161,9 @@ static uint8_t cmux_frame_data_dlci2_ppp_52[] = {
|
||||||
0x7D, 0x23, 0x7D, 0x24, 0xC0, 0x23, 0x7D, 0x25, 0x7D, 0x26, 0x53, 0x96, 0x7D,
|
0x7D, 0x23, 0x7D, 0x24, 0xC0, 0x23, 0x7D, 0x25, 0x7D, 0x26, 0x53, 0x96, 0x7D,
|
||||||
0x38, 0xAA, 0x7D, 0x27, 0x7D, 0x22, 0x7D, 0x28, 0x7D, 0x22, 0xD5, 0xA8, 0x7E};
|
0x38, 0xAA, 0x7D, 0x27, 0x7D, 0x22, 0x7D, 0x28, 0x7D, 0x22, 0xD5, 0xA8, 0x7E};
|
||||||
|
|
||||||
static uint8_t cmux_frame_dlci2_ppp_18[] = {0xF9, 0x09, 0xEF, 0x25, 0x7E, 0xFF, 0x7D, 0x23,
|
static uint8_t cmux_frame_dlci2_ppp_18[] = {0xF9, 0x0B, 0xEF, 0x25, 0x7E, 0xFF, 0x7D, 0x23,
|
||||||
0xC0, 0x21, 0x7D, 0x22, 0x7D, 0x21, 0x7D, 0x20,
|
0xC0, 0x21, 0x7D, 0x22, 0x7D, 0x21, 0x7D, 0x20,
|
||||||
0x7D, 0x24, 0x7D, 0x3C, 0x90, 0x7E, 0xEE, 0xF9};
|
0x7D, 0x24, 0x7D, 0x3C, 0x90, 0x7E, 0x8F, 0xF9};
|
||||||
|
|
||||||
static uint8_t cmux_frame_data_dlci2_ppp_18[] = {0x7E, 0xFF, 0x7D, 0x23, 0xC0, 0x21,
|
static uint8_t cmux_frame_data_dlci2_ppp_18[] = {0x7E, 0xFF, 0x7D, 0x23, 0xC0, 0x21,
|
||||||
0x7D, 0x22, 0x7D, 0x21, 0x7D, 0x20,
|
0x7D, 0x22, 0x7D, 0x21, 0x7D, 0x20,
|
||||||
|
|
Loading…
Reference in a new issue