<div dir="ltr"><div dir="ltr">Thanks everyone for writing back.<div>Alex, I am running the Raspbian Buster version, but basically plain debian. I am able to get dhcp through systemd-networkd</div><div>I did end up finding out that the modem was set to mbim, comp 8. I am new to qmicli and clearly overlooked the command to change it. </div><div>After changing the comp settings using qmicli, it is booting with qmi_wwan driver for data. </div><div><br></div><div>there seems to be a strange instance that the MC7455 shows 2 WWAN interfaces while the EM7455 shows 1 wwan. </div><div>Can anyone tell me why this may be?</div><div><br></div><div>also Bjorn, you are obviously highly more skilled in all this than I am. I did not even think to dig into the code, and i probably wouldnt understand most of it. I am curious, what you would recommend over systemd to acquire an IP from the wwan interfaces using dhcp? </div><div><br></div><div>One final question for Bjorn, as i am taken back by his detail in coding. I am having issues with the port being assigned to the proper cdc-wdm*. Most of the time it boots with the same assignment but maybe 1 in 10 it switches them. I tried a symlink rule but it didnt help. Can you give proper advice on how to assign the device to a cdc-wdm on reboot/startup? </div><div>what i tried and it didnt work:</div><div><div><div dir="auto"><br></div><div dir="auto"><span style="color:rgb(42,46,46);font-family:"helvetica neue",arial,sans-serif;font-size:15px"># assign module1 to cdc-wdm0</span><br style="color:rgb(42,46,46);font-family:"helvetica neue",arial,sans-serif;font-size:15px"><span style="color:rgb(42,46,46);font-family:"helvetica neue",arial,sans-serif;font-size:15px">KERNEL=="cdc-wdm0", \</span><br style="color:rgb(42,46,46);font-family:"helvetica neue",arial,sans-serif;font-size:15px"><span style="color:rgb(42,46,46);font-family:"helvetica neue",arial,sans-serif;font-size:15px">ATTR{idProduct}=="9071", \</span><br style="color:rgb(42,46,46);font-family:"helvetica neue",arial,sans-serif;font-size:15px"><span style="color:rgb(42,46,46);font-family:"helvetica neue",arial,sans-serif;font-size:15px">SYMLINK+="cdc-wdm0"</span></div><div dir="auto"><br></div>Looking to try this but it would be a port assignment not device to udev assignment </div><div dir="auto">KERNEL=="cdc-wdm0*", KERNELS=="1-4:1.0", SYMLINK+="cdc-wdm0"</div></div><div dir="auto"><br></div><div>Thank you</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 31, 2020 at 1:10 AM Bjørn Mork <<a href="mailto:bjorn@mork.no">bjorn@mork.no</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">Aleksander Morgado <<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>> writes:<br>
<br>
> I'm a bit surprised that you can have DHCP running on the MC7455 while<br>
> in QMI raw-ip mode on a standard Debian. Is that really so? which DHCP<br>
> client are you using?<br>
<br>
I assume that must be the internal one in systemd-networkd? It's not<br>
like systemd allows you to configure any external one.<br>
<br>
Anyway, I was also surprised, but thought that the systemd developers<br>
actually might have learned something from others for once, instead of<br>
repeating every mistake throught history.<br>
<br>
Looking at <br>
<a href="https://github.com/systemd/systemd/blob/master/src/network/networkd-link.c#L2833" rel="noreferrer" target="_blank">https://github.com/systemd/systemd/blob/master/src/network/networkd-link.c#L2833</a><br>
they call<br>
<br>
dhcp4_configure(link);<br>
<br>
if dhcp is enabled on a link. And looking further at<br>
<a href="https://github.com/systemd/systemd/blob/master/src/network/networkd-dhcp4.c#L1324" rel="noreferrer" target="_blank">https://github.com/systemd/systemd/blob/master/src/network/networkd-dhcp4.c#L1324</a><br>
we see stuff like<br>
<br>
r = sd_dhcp_client_set_mac(link->dhcp_client,<br>
(const uint8_t *) &link->mac,<br>
sizeof (link->mac), ARPHRD_ETHER);<br>
if (r < 0)<br>
return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set MAC address: %m");<br>
<br>
<br>
which shows that ARPHRD_ETHER is hardcoded, making it appear to be the<br>
only supported interface type.<br>
<br>
But i wonder if this hardcoding might (accidentally?) make the dhcp<br>
client work anyway. Since they force the type to ethernet, and pick up<br>
the "mac address" from somewhere else (config or port-name-guessorama),<br>
then this could still work for raw-ip.<br>
<br>
I also noticed a few "raw_socket" calls in networkd-dhcp4.c but looking<br>
at<br>
<a href="https://github.com/systemd/systemd/blob/master/src/libsystemd-network/dhcp-network.c" rel="noreferrer" target="_blank">https://github.com/systemd/systemd/blob/master/src/libsystemd-network/dhcp-network.c</a><br>
they document support for 0 byte addresses in the BPF filter they use:<br>
<br>
BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, dhcp_hlen, 1, 0), /* address length == dhcp_hlen ? */<br>
BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */<br>
<br>
/* We only support MAC address length to be either 0 or 6 (ETH_ALEN). Optionally<br>
* compare chaddr for ETH_ALEN bytes. */<br>
BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETH_ALEN, 0, 12), /* A (the MAC address length) == ETH_ALEN ? */<br>
<br>
<br>
I stopped reading there. Following this magic around is too complicated<br>
for me. The "ARPHRD_ETHER" faking all the way didn't make it any<br>
simpler.. It was actually easier to add raw-ip support in the ISC client<br>
than making any sense out of this.<br>
<br>
I'd be interested to know if it actually does work. I don't see any<br>
obvious way to test this dhcp client without losing all networking to<br>
systemd.<br>
<br>
<br>
<br>
Bjørn<br>
</blockquote></div>