<div dir="ltr">Hey,<div><br></div><div>I originally added MM_TYPE_BASE_SIM as a prerequisite and that actually made my interface fail to initialize, which I think might be because of where I initialize my interface, which is right after the line(s)           <font face="monospace">sim_dbus_export (self);</font> in <font face="monospace">set_property()</font> of mm-base-sim.c. So as of now, I have no prerequisites for my interface, resulting in having only that one method have an invalid address.</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">- Florence</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 30, 2021 at 12:57 AM Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey,<br>
<br>
> I have another question regarding my SIM-EAP interface. Testing has been going well however I noticed one of the methods of my interface has an invalid address (i.e. either (nil) or 0x2) despite having implementation. I noticed I'm getting this warning which may be responsible for this bug:<br>
> (ModemManager:4486): GLib-GObject-WARNING **: 17:07:38.068: invalid cast from 'MMSimMbim' to 'MMIfaceSimEap'<br>
><br>
> I was wondering if you would know if there is anything else involved in providing a valid cast from these two, other than what I have here (in mm-sim-mbim.c):<br>
> G_DEFINE_TYPE_EXTENDED(MMSimMbim, mm_sim_mbim, MM_TYPE_BASE_SIM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_SIM_EAP, iface_sim_eap_init))<br>
><br>
<br>
Hum... I don't think I can say of anything else that would be strictly<br>
required. In the modem interfaces I explicitly add MM_TYPE_BASE_MODEM<br>
as a prerequisite for the interfaces in the get_type() method, with<br>
g_type_interface_add_prerequisite(). But I'm not completely sure<br>
that's a strict requirement. Do you also add that prerequisite for the<br>
MM_TYPE_BASE_SIM object in your new SIM interface?<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</blockquote></div>