[systemd-devel] Problem with netwrok broadband modem

Christian Gagneraud chris at techworks.ie
Mon Jun 27 06:59:03 PDT 2011


On 27/06/11 12:54, Lennart Poettering wrote:
> On Fri, 24.06.11 15:59, Christian Gagneraud (chris at techworks.ie) wrote:
>
>> Hi,
>>
>> I'm trying to use a USB broadband modem with ofono and connman, when
>> i plug the modem, i get an error from systemd "Failed to load device
>> unit: Invalid argument" (full log below).
>
> Hmm, this smells like a bug in systemd.
>
> Do you have any service file for this device installed?
>
>> Is it looking for a dev-tty at .device file?
>
> Yes, but usually this should just fail with ENOENT and be ignored. For
> some reason this generates EINVAL for you however.
>
>> As i'm having trouble to get ofono working, I wonder if the problem
>> doesn't come from here instead, or even perhaps it's due to the
>> manufaturer and serial number of the USB device being garbage...
>
> That could actually be. Of course we should fix systemd to handle this.
>
> I wonder how I could easily reproduce this issue here, without that hw.
>
> My first guess is that i's actually the length of the name, and not the
> contents of it that triggers the EINVAL.


Could you point me to the right source file and/or functions where I 
could add some debug statement to see if these garbage in the name cause 
troubles.

Actually I don't have a tty at .device file, and I couldn't find any in the 
systemd source archive, neither by googling the web.
My feeling is that I don't need it (I've just read the systemd.device 
man page! ;)) as ofono is started as a service, and it picks up the 
modem as soon as it gets plugged, (via udev rules)
Ofono install a udev 97-ofono.rules)that setup lot of ofono related ENV 
for all supported pluggable modems.
I have as well 60-persistent-serial.rules (shipped with udev), but I 
didn't see any stuff related to systemd (it's just dealing with symlinks).

Note: I finally manage to get ofono (kind of) working. It's not very 
stable but it's a good starting point. So it doesn't seem to be a fatal 
error for me in that case.

So, to summarize:
a - There might be a bug in systemd due to the garbage date in the model 
and manufacturer name. I can try to pin point where does that come from 
with a bit of your help.
b - If the bug above is corrected, systemd would ignore the missing 
tty at .device unit.
c - I could actually use this tty at .device to start ofonod instead of 
starting it at boot time, given the fact that ofonod is useless if 
there's no modem plugged into my board.

Chris


>
> Lennart
>



More information about the systemd-devel mailing list