Issue with EPDG + Open5GS (installed via ansible-prototype) — Can't authenticate UE / Diameter errors

Hello Osmocom community,

I’m currently setting up the EPDG component using the ansible-prototype repository. I’ve only deployed epdg.yaml, as my lab already has Open5GS running (including the HSS).

However, I’m running into an issue where the EPDG and Open5GS can’t seem to communicate properly. The UE attempts to connect over Wi-Fi, but authentication times out. Below are some relevant logs:

EPDG Logs:

  • Repeated Timeout swm_der_timeout
  • auth_response: {error,17}
  • Error from Swx MAR: Error: no_connection

Sample:
ue_fsm state_wait_auth_resp: Timeout swm_der_timeout, {ue_fsm_data,<<“001010123456791”>>,33,#{ipv4 => <<0,0,0,0>>},“*”,,undefined,false,0,false,false}
auth_response: {error,17}
…
[debug] Swx Tx MAR: {…}
[error] Error: no_connection

Open5GS HSS Logs:

  • Continual Invalid argument errors in freeDiameter:
    [diam] ERROR: in ‘(fd_peer_handle_newCER( &msg, &c ))’ : Invalid argument

MongoDB and HSS itself appear to initialize fine, but no successful SWx connections are logged.

Questions:

  1. Is there a specific configuration I’m missing in EPDG or Open5GS HSS to get SWx working over Diameter?
  2. Does the EPDG expect anything additional on the Open5GS HSS side (e.g., realm, FQDN matching, extra AVPs)?
  3. Should I have installed other roles from the ansible repo like hss.yaml or pcscf.yaml to make this work?

My Setup Summary:

  • EPDG installed using ansible-prototype, epdg.yaml only
  • HSS from Open5GS (works with MME, no problem there)
  • StrongSwan is configured and running on the UE device
  • GSUP between EPDG and HLR seems partially working, but Diameter SWx fails

I would really appreciate any guidance or examples of working configurations for EPDG + Open5GS integration. I’m also happy to share configs if needed.

Thanks in advance!

i’ve made a lot of progress
now i’m stuck on

}],,,,,,}/ Errors

*DBG* epdg_ue_fsm_001010123456791 receive call {received_swm_dea_auth_compl_response,{ok,#{}}} from <0.533.0> in state state_authenticating
*DBG* aaa_ue_fsm_001010123456791 consume call {rx_swx_saa,{ok,1,#{}}} from <0.735.0> in state state_wait_swx_saa => state_authenticated
08:17:01.402 [info] ue_fsm ev_rx_swx_saa
08:17:01.402 [info] ue_fsm state_wait_swx_saa event=rx_swx_saa {ok,1,#{}}, {ue_fsm_data,"001010123456791",undefined,undefined,true,false,undefined}
*DBG* epdg_ue_fsm_001010123456791 send ok to <0.533.0>
*DBG* gsup_server got cast {lu_response,{<<"001010123456791">>,ok}}
08:17:01.402 [info] ue_fsm received_swm_dea_auth_compl_response {ok,#{}}
*DBG* epdg_ue_fsm_001010123456791 consume call {received_swm_dea_auth_compl_response,{ok,#{}}} from <0.533.0> in state state_authenticating => state_authenticated
*DBG* gsup_server new state {gsups_state,#Port<0.39>,4222,#Port<0.42>,
                                {ipa_ccm_options,"EPDG-00-00-00-00-00-00",
                                    "0/0/0","00:00:00:00:00:00",
                                    "00:00:00:00:00:00","00:00:00:00:00:00",
                                    "00:00:00:00:00:00","00:00:00:00:00:00",
                                    "EPDG-00-00-00-00-00-00",false}}
08:17:01.402 [info] ue_fsm state_authenticating event=lu_request, {ok,#{}}, {ue_fsm_data,<<"001010123456791">>,33,#{ipv4 => <<0,0,0,0>>},"*",[],undefined,false,0,false,false}
08:17:01.402 [info] lu_response(<<"001010123456791">>): ok
08:17:01.403 [info] lu_response for <<"001010123456791">>: ok
08:17:01.403 [info] GSUP: Tx #{imsi => <<"001010123456791">>,message_class => 5,message_type => location_upd_res}
Stream 238, 12 bytes
Accepted TCP connection from {ok,{{127,0,0,1},58930}}
*DBG* gsup_server got {ipa_tcp_accept,#Port<0.43>}
Setting ccm options for socket #Port<0.43> to {ipa_ccm_options,
                                               "EPDG-00-00-00-00-00-00",
                                               "0/0/0","00:00:00:00:00:00",
                                               "00:00:00:00:00:00",
                                               "00:00:00:00:00:00",
                                               "00:00:00:00:00:00",
                                               "00:00:00:00:00:00",
                                               "EPDG-00-00-00-00-00-00",false}
Registering handler {process_id,<0.531.0>} for socket #Port<0.43> Stream {osmo,
                                                                          5}
Unblocking socket #Port<0.43>
Unblocking socket #Port<0.43>:ok
*DBG* gsup_server new state {gsups_state,#Port<0.39>,4222,#Port<0.43>,
                                {ipa_ccm_options,"EPDG-00-00-00-00-00-00",
                                    "0/0/0","00:00:00:00:00:00",
                                    "00:00:00:00:00:00","00:00:00:00:00:00",
                                    "00:00:00:00:00:00","00:00:00:00:00:00",
                                    "EPDG-00-00-00-00-00-00",false}}
Stream 254, 1 bytes
Socket #Port<0.43> Stream 254: ID_RESP -> ID_ACK
Stream 254, 1 bytes
Socket #Port<0.43> Stream 254: ID_ACK -> ID_ACK
08:17:01.423 [error] Error in process <0.702.0> with exit value:
{{mandatory_ie_missing,epdg_tunnel_request,[message_class]},[{gsup_protocol,decode,1,[{file,"/srv/osmo-epdg/_build/default/lib/osmo_gsup/src/gsup_protocol.erl"},{line,35}]},{ipa_proto,deliver_rx_ipa_msg,4,[{file,"/srv/osmo-epdg/_build/default/lib/osmo_ss7/src/ipa_proto.erl"},{line,147}]},{ipa_proto,process_rx_ipa_msg,4,[{file,"/srv/osmo-epdg/_build/default/lib/osmo_ss7/src/ipa_proto.erl"},{line,196}]},{ipa_proto,loop,4,[{file,"/srv/osmo-epdg/_build/default/lib/osmo_ss7/src/ipa_proto.erl"},{line,278}]}]}
08:17:01.434 [notice] GSUP connection has been established

Hi @Shaheen,

could you provide pcaps of the GSUP and diameter traffic?

Is there a specific configuration I’m missing in EPDG or Open5GS HSS to get SWx working over Diameter?

No, it should work. Maybe your subscriber in the HSS is something missing?
Maybe your open5gs version is too old (but shouldn’t be, everything from this year should work).
I tested it with open5gs-hss some time ago.
I tested it with a real phone.