WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: uqmi and Raspberry  (Read 6670 times)

Offline lotte67890

  • Newbie
  • *
  • Posts: 15
uqmi and Raspberry
« on: February 01, 2018, 06:14:26 AM »
I wonder if anybody ever had or has succesfully communicated with uqmi to a modem on /dev/cdc-wdmX... All I can find on the Internet is that some people struggled and all which had success use the X86 platform...

I want to use the uqmi application on my Raspberry2, but I´m unable to communicate with my Huawei e3372h (patched to work as modem notg as route, so it´s a non Hilink Version).

What I know:

The Modem works under Ubuntu using networkmanager with settings APN, User, password and number.
Since there is no ARM package for Picore 9.03 I compiled uqmi myself which worked without any errors. I installed all the files to the appropriate dests and added them to /opt/.filetool.lst
The modem is detected by the system, creating /dev/cdc-wdm0 and after modeswitch from 14fe to 1506 /dev/ttyUSB0 and /dev/ttyUSB1 devices

But whatever I try, no communication with the modem...

Anybody any hint or knows another application than uqmi to initiate a connection? In the end a ppp connection should work as well, but since I can´t get compiled wvdial, I struggle of how to should initiate the connection and which AT Parameters to use...

Thx a lot in advance

L

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 662
Re: uqmi and Raspberry
« Reply #1 on: February 01, 2018, 06:46:33 AM »
Also check the device rights.

With ls -l  /dev/ttyUSB0 so the user can access the device.

Many tty uses the uucp as group, or even the group ppp.

So you want to add the user or program that have access to the device.

You should also try to use some small program to access the serial device, like screen, cu and minicom.

Code: (bash) [Select]
sudo screen /dev/ttySUSB0 115200
sudo screen /dev/ttySUSB1 115200
« Last Edit: February 01, 2018, 07:01:13 AM by patrikg »

Offline lotte67890

  • Newbie
  • *
  • Posts: 15
Re: uqmi and Raspberry
« Reply #2 on: February 01, 2018, 09:58:41 AM »
Thanks patrikg! Sounds like a very good idea, but obviously, that didn´t help either... What I achieved today is that with mincom I can communicate with the modem and send commands... But now I need something to "dial/initiate connection" with. As said, wvdial would be my choice, but I struggle with a compile error...

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 662

Offline lotte67890

  • Newbie
  • *
  • Posts: 15
Re: uqmi and Raspberry
« Reply #4 on: February 01, 2018, 01:27:00 PM »
Thanks again, that´s the site where I got the firmware from, and as said, it´s working under ubuntu. I tried to be so smart and find a compiled version of wvdial in an raspian package, unfortunately it´s linked against other libs, so no luck again...
Next try will be to dial with minicom but I´m unsure if that can be automated...


Peace

L

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: uqmi and Raspberry
« Reply #5 on: February 01, 2018, 01:37:55 PM »
Hi lotte67890
... As said, wvdial would be my choice, but I struggle with a compile error...
If you post the error, someone might be able to help you.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: uqmi and Raspberry
« Reply #6 on: February 03, 2018, 03:28:27 AM »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: uqmi and Raspberry
« Reply #7 on: February 05, 2018, 02:35:39 AM »
..or you could try using mmcli/nmcli from modemmanager/networkmanager

Offline lotte67890

  • Newbie
  • *
  • Posts: 15
Re: uqmi and Raspberry
« Reply #8 on: February 06, 2018, 05:15:12 AM »
Juanito, thank you very very much! I first tried with wvdial and noticed that now I can succesfully compile wvstreams, but wvdial still gives me an error:

Code: [Select]
* Generating CC
* Generating CXX
linking wvdial...
wvdial.o:(.data.rel.ro+0x100): undefined reference to `typeinfo for WvLogConsole'
wvdial.a(wvdialer.o):(.data.rel.ro+0xd8): undefined reference to `typeinfo for WvStreamClone'
collect2: error: ld returned 1 exit status
make: *** [wvrules.mk:155: wvdial] Error 1

It doesn´t matter if i run make as user tc or with sudo.

I then saw your note about using NetworkManager, so I started connecting wlan first using NM. I created /usr/local/etc/NetworkManager/system-connections/MyWlanNetwork
Struggled a bit till I found out that I need to have wpa_supplicant to feed NM needs, and now have in /opt/bootlocal.sh:

...
Code: [Select]
# ------ Put other system startup commands below this line
/usr/sbin/usb_modeswitch -s 15 -J -c /etc/usb_modeswitch.conf
/usr/local/etc/init.d/dbus start
/usr/local/etc/init.d/networkmanager start
/usr/local/sbin/wpa_supplicant -u -B -i wlan0 -D wext
sleep 3
/usr/local/etc/init.d/dbus reload
sleep 3
/usr/local/bin/nmcli c up MyWlanNetwork

Before not having the sleep commands The system failed to initiate the wlan connection on boot. But now it works, I get an IP address and a route, although I wonder why having Destination 10.143.31.0 twice, shouldn´t one be enough?:

Code: [Select]
tc@DRM0:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.143.31.1     0.0.0.0         UG    600    0        0 wlan0
10.143.31.0     *               255.255.255.0   U     203    0        0 wlan0
10.143.31.0     *               255.255.255.0   U     600    0        0 wlan0
127.0.0.1       *               255.255.255.255 UH    0      0        0 lo

Anyway, next is the modem. If I run:

Code: [Select]
tc@DRM0:~$ nmcli d
DEVICE  TYPE      STATE        CONNECTION
[color=green]wlan0   wifi      connected    MyWlanNetwork  [/color]
eth0    ethernet  unavailable  --         
lo      loopback  unmanaged    --     


So no modem here, and I have no clue how to create it. How does NM find the device? There is no /etc/network/interface which could interfere and /usr/local/etc/NetworkManager/nm-system-settings.conf is a symbolic link to /tmp/tcloop/networkmanager/usr/local/etc/NetworkManager/nm-system-settings.conf which is on a ro mounted filesystem (as you certainly know...). I was hoping that with the option managed=true in the NM.conf file the system will detect the modem. Does it conflict with the wpa_supplicant options I passed in /opt/bootlocal.sh? Are any extra options required? Or do I miss something in general? Modem is present in dmesg same as in Ubuntu and devices are /dev/cdc-wdm0 as long as /dev/ttyUSB0 and /dev/USB1.

Thanks a lot

Lothar

    [EDIT]: Added code tags.  Rich
« Last Edit: February 06, 2018, 05:47:02 AM by Rich »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: uqmi and Raspberry
« Reply #9 on: February 06, 2018, 05:27:29 AM »
Loading networkmanager will load the wpa_supplicant-dbus extension anyway.

In the past I'm pretty sure I used nmcli commands to create a wifi connection without using wpa_supplicant directly and, once done and the connection config added to a backup, networkmanager connected automatically on reboot.

For the modem, perhaps you need modemmanager mmcli commands to bring it to life?

For the wvdial error, are you missing glib2-python perhaps?
« Last Edit: February 06, 2018, 05:30:59 AM by Juanito »

Offline lotte67890

  • Newbie
  • *
  • Posts: 15
Re: uqmi and Raspberry
« Reply #10 on: February 06, 2018, 02:29:02 PM »
Well, I couldn´t find wpa_supplicant in the processlist and when starting it without any options I couldn´t activate my Wlan USB dongle cause of the wrong module, I needed to pass wext.

For the wvdial, yes glib2-python is installed including dev.

Your hint with ModemManager was absolutely correct! The modem now dials and connects although it disconnects immediately after the connection is established...:

Code: [Select]
<debug> [000093.143790] modem properly initialized
<debug> [000093.149889] Exported modem '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3' at path '/org/freedesktop/ModemManager1/Modem/0'
<debug> [000093.149978] (/org/freedesktop/ModemManager1/Modem/0): 'Huawei' modem, VID 0x12D1 PID 0x1506 (usb)
<info>  [000093.167915] Modem /org/freedesktop/ModemManager1/Modem/0: state changed (disabled -> enabling)
<debug> [000093.169821] Skipping modem initialization: device hotplugged
<debug> [000093.169916] (ttyUSB0) opening serial port...
<warn>  [000093.177144] (ttyUSB0): port attributes not fully set
<debug> [000093.177352] (ttyUSB0) device open count is 1 (open)
<debug> [000093.177409] (ttyUSB0): running init sequence...
<debug> [000093.177606] Flashing primary AT port before enabling...
<debug> [000093.177837] (ttyUSB0): --> 'ATE0<CR>'
<debug> [000093.183262] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.183806] (ttyUSB0): --> 'ATV1<CR>'
<info>  [000093.243323] Simple connect started...
<debug> [000093.243435]    PIN: unspecified
<debug> [000093.243482]    Operator ID: unspecified
<debug> [000093.243526]    Allowed roaming: yes
<debug> [000093.243570]    APN:
<debug> [000093.243625]    IP family: ipv4
<debug> [000093.243669]    Allowed authentication: unspecified
<debug> [000093.243714]    User: ppp@a1plus.net
<debug> [000093.243756]    Password: ppp
<debug> [000093.243797]    Number: *99#
<info>  [000093.243828] Simple connect state (4/8): Wait to get fully enabled
<debug> [000093.278450] loading power state...
<debug> [000093.278584] (ttyUSB0) device open count is 2 (open)
<debug> [000093.636113] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.636637] (ttyUSB0): --> 'AT+CMEE=1<CR>'
<debug> [000093.647528] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.647902] (ttyUSB0): --> 'ATX4<CR>'
<debug> [000093.652997] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.653344] (ttyUSB0): --> 'AT&C1<CR>'
<debug> [000093.659565] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.659905] (ttyUSB0): --> 'AT+CFUN?<CR>'
<debug> [000093.670136] (ttyUSB0): <-- '<CR><LF>+CFUN: 1<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000093.670565] No need to change power state: already in 'on' power state
<debug> [000093.670653] (ttyUSB0) device open count is 1 (close)
<debug> [000093.670828] (ttyUSB0) device open count is 2 (open)
<debug> [000093.671067] (ttyUSB0) device open count is 3 (open)
<debug> [000093.671202] (ttyUSB0): --> 'AT+IFC=1,1<CR>'
<debug> [000093.683332] (ttyUSB0): <-- '<CR><LF>COMMAND NOT SUPPORT<CR><LF>'
<debug> [000093.683774] Got failure code 100: Unknown error
<debug> [000093.683859] (ttyUSB0) device open count is 2 (close)
<debug> [000093.684030] (ttyUSB0): --> 'AT+CSCS=?<CR>'
<debug> [000093.695060] (ttyUSB0): <-- '<CR><LF>+CSCS: ("IRA","UCS2","GSM")<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000093.695936] (ttyUSB0) device open count is 3 (open)
<debug> [000093.696093] (ttyUSB0) device open count is 2 (close)
<debug> [000093.696225] (ttyUSB0): --> 'AT+CSCS="UCS2"<CR>'
<debug> [000093.712883] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.713283] (ttyUSB0) device open count is 3 (open)
<debug> [000093.713409] (ttyUSB0) device open count is 2 (close)
<debug> [000093.713523] (ttyUSB0): --> 'AT+CSCS?<CR>'
<debug> [000093.723209] (ttyUSB0): <-- '<CR><LF>+CSCS: "UCS2"<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000093.723665] (ttyUSB0) device open count is 1 (close)
<debug> [000093.723782] Modem has 3GPP capabilities, enabling the Modem 3GPP interface...
<debug> [000093.723864] Checking indicator support...
<debug> [000093.723939] (ttyUSB0) device open count is 2 (open)
<debug> [000093.724092] (ttyUSB0): --> 'AT+CIND=?<CR>'
<debug> [000093.735079] (ttyUSB0): <-- '<CR><LF>COMMAND NOT SUPPORT<CR><LF>'
<debug> [000093.735450] Got failure code 100: Unknown error
<debug> [000093.735530] Marking indications as unsupported: 'Unknown error'
<debug> [000093.735697] (ttyUSB0) device open count is 1 (close)
<debug> [000093.735869] (ttyUSB0) device open count is 2 (open)
<debug> [000093.736024] (ttyUSB0): --> 'AT^PORTSEL=0<CR>'
<debug> [000093.750487] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.750970] (ttyUSB0): --> 'AT^CURC=1<CR>'
<debug> [000093.761950] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.763649] (ttyUSB0) setting up 3GPP unsolicited registration messages handlers
<debug> [000093.763842] (ttyUSB0) device open count is 1 (close)
<debug> [000093.764063] (ttyUSB0) device open count is 2 (open)
<debug> [000093.764229] (ttyUSB0): --> 'AT+CREG=2<CR>'
<debug> [000093.775345] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.775734] (ttyUSB0) device open count is 3 (open)
<debug> [000093.775857] (ttyUSB0) device open count is 2 (close)
<debug> [000093.775972] (ttyUSB0): --> 'AT+CGREG=2<CR>'
<debug> [000093.788282] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.788757] (ttyUSB0) device open count is 1 (close)
<debug> [000093.788937] Modem has 3GPP/USSD capabilities, enabling the Modem 3GPP/USSD interface...
<debug> [000093.789089] (ttyUSB0) Setting unsolicited result code handlers
<debug> [000093.789260] (ttyUSB0) device open count is 2 (open)
<debug> [000093.789414] (ttyUSB0): --> 'AT+CUSD=1<CR>'
<debug> [000093.800339] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.800863] (ttyUSB0) device open count is 1 (close)
<debug> [000093.801599] Modem has location capabilities, enabling the Location interface...
<debug> [000093.801756] Need to enable the following location sources: '3gpp-lac-ci'
<debug> [000093.802116] Running registration checks (CS: 'yes', PS: 'yes', EPS: 'no')
<debug> [000093.802241] (ttyUSB0) device open count is 2 (open)
<debug> [000093.803209] Modem has messaging capabilities, enabling the Messaging interface...
<debug> [000093.803651] (ttyUSB0) device open count is 3 (open)
<debug> [000093.803859] (ttyUSB0): --> 'AT+CREG?<CR>'
<debug> [000093.814017] (ttyUSB0): <-- '<CR><LF>+CREG: 2,1,"4F4C","004E2E03"<CR><LF><CR><LF>OK<CR><LF>'
<info>  [000093.814440] Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (unknown -> registering)
<debug> [000093.814533] loading Operator Code...
<debug> [000093.814626] (ttyUSB0) device open count is 4 (open)
<debug> [000093.814833] Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP location updated (MCC: '0', MNC: '0', Location area code: '4F4C', Cell ID: '4E2E03')
<debug> [000093.815290] (ttyUSB0) device open count is 5 (open)
<debug> [000093.815400] (ttyUSB0) device open count is 4 (close)
<debug> [000093.815544] (ttyUSB0): --> 'AT+CMGF=?<CR>'
<debug> [000093.826543] (ttyUSB0): <-- '<CR><LF>+CMGF: (0,1)<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000093.827314] (ttyUSB0) device open count is 5 (open)
<debug> [000093.827437] (ttyUSB0) device open count is 4 (close)
<debug> [000093.827578] (ttyUSB0): --> 'AT+COPS=3,2;+COPS?<CR>'
<debug> [000093.849361] (ttyUSB0): <-- '<CR><LF>+COPS: 0,2,"23201",7<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000093.850079] loaded Operator Code: 23201
<debug> [000093.850392] Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP location updated (MCC: '232', MNC: '1', Location area code: '4F4C', Cell ID: '4E2E03')
<debug> [000093.850465] loading Operator Name (huawei)...
<debug> [000093.850540] (ttyUSB0) device open count is 5 (open)
<debug> [000093.850644] (ttyUSB0) device open count is 4 (close)
<debug> [000093.851371] (ttyUSB0): --> 'AT+CGREG?<CR>'
<debug> [000093.863234] (ttyUSB0): <-- '<CR><LF>+CGREG: 2,1,"4F4C","004E2E03"<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000093.863909] (ttyUSB0) device open count is 3 (close)
<debug> [000093.864106] (ttyUSB0): --> 'AT+CMGF=0<CR>'
<debug> [000093.875296] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.875625] Successfully set preferred SMS mode: 'PDU'
<debug> [000093.876046] (ttyUSB0) device open count is 4 (open)
<debug> [000093.876197] (ttyUSB0) device open count is 3 (close)
<debug> [000093.876917] (ttyUSB0): --> 'AT+COPS=3,0;+COPS?<CR>'
<debug> [000093.900999] (ttyUSB0): <-- '<CR><LF>+COPS: 0,0,"A1",7<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000093.901644] loaded Operator Name: A1
<debug> [000093.901907] (ttyUSB0) device open count is 2 (close)
<info>  [000093.902810] Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (registering -> home)
<debug> [000093.903088] Will start keeping track of state for subsystem '3gpp'
<debug> [000093.903773] (ttyUSB0): --> 'AT+CPMS="SM","ME","ME"<CR>'
<debug> [000093.933650] (ttyUSB0): <-- '<CR><LF>+CPMS: 1,20,0,20,0,20<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000093.934166] Listing SMS parts in storage 'sm'
<debug> [000093.934225] Locking SMS storages to: mem1 (SM), mem2 (none)...
<debug> [000093.934321] (ttyUSB0) device open count is 3 (open)
<debug> [000093.934448] (ttyUSB0) device open count is 2 (close)
<debug> [000093.934562] (ttyUSB0): --> 'AT+CPMS="SM"<CR>'
<debug> [000093.950678] (ttyUSB0): <-- '<CR><LF>+CPMS: 1,20,0,20,0,20<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000093.951121] (ttyUSB0) device open count is 1 (close)
<debug> [000093.951288] (ttyUSB0) device open count is 2 (open)
<debug> [000093.951444] (ttyUSB0): --> 'AT+CMGL=4<CR>'
<debug> [000093.963395] (ttyUSB0): <-- '<CR><LF>+CMGL: 0,1,,154<CR><LF>069134660405F1440B816046666876F200F581201081739040870605040B8423F00006226170706C69636174696F6E2F766E642E7761702E6D6D732D6D65737361676500AF848C82983132463639394532008D918A808E0303D8AC88058103093A8083687474703A2F2F6D6D73632E61312E6E65743A38302F3132463639394532008919802B3433363634343036323330382F545950453D504C4D4E009602EA00<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000093.964431] Parsing PDU (0)...
<debug> [000093.964482]   SMSC address parsed: '+436640501'
<debug> [000093.964515]   Deliver type PDU detected
<debug> [000093.964543]   Number parsed: '06646686672'
<debug> [000093.964573]   PID: 0
<debug> [000093.964602]   user data encoding is 8bit
<debug> [000093.964628]   user data length: 135 elements
<debug> [000093.964655]   user data length: 135 bytes
<debug> [000093.964685] Skipping SMS text: Unknown encoding (0x02)
<debug> [000093.964721] Correctly parsed PDU (0)
<debug> [000093.964810] SMS part at 'sm/0' is from a singlepart SMS
<debug> [000093.967250] Added received SMS at '/org/freedesktop/ModemManager1/SMS/0'
<debug> [000093.967935] Listing SMS parts in storage 'me'
<debug> [000093.967991] Locking SMS storages to: mem1 (ME), mem2 (none)...
<debug> [000093.968082] (ttyUSB0) device open count is 3 (open)
<debug> [000093.968243] (ttyUSB0) device open count is 2 (close)
<debug> [000093.969110] (ttyUSB0): --> 'AT+CPMS="ME"<CR>'
<debug> [000093.985096] (ttyUSB0): <-- '<CR><LF>+CPMS: 0,20,0,20,0,20<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000093.985683] (ttyUSB0) device open count is 1 (close)
<debug> [000093.985967] (ttyUSB0) device open count is 2 (open)
<debug> [000093.986151] (ttyUSB0): --> 'AT+CMGL=4<CR>'
<debug> [000093.998153] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000093.998889] (ttyUSB0) Setting messaging unsolicited events handlers
<debug> [000093.999012] (ttyUSB0) device open count is 1 (close)
<debug> [000093.999146] (ttyUSB0) Enabling messaging unsolicited events on primary port
<debug> [000093.999234] (ttyUSB0) device open count is 2 (open)
<debug> [000093.999386] (ttyUSB0): --> 'AT+CNMI=2,1,2,1,0<CR>'
<debug> [000094.020560] (ttyUSB0): <-- '<CR><LF>+CMS ERROR: 303<CR><LF>'
<debug> [000094.021125] Got failure code 303: Operation not supported
<debug> [000094.021318] (ttyUSB0): --> 'AT+CNMI=2,1,2,2,0<CR>'
<debug> [000094.043155] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000094.043569] (ttyUSB0) Messaging unsolicited events enabled on primary
<debug> [000094.043681] (ttyUSB0) device open count is 1 (close)
<debug> [000094.043796] Modem has voice capabilities, enabling the Voice interface...
<debug> [000094.044428] (ttyUSB0) Setting voice unsolicited events handlers
<debug> [000094.044737] (ttyUSB0) device open count is 2 (open)
<debug> [000094.044914] (ttyUSB0): --> 'AT+CLIP=1<CR>'
<debug> [000094.056420] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000094.056904] (ttyUSB0): --> 'AT+CRC=1<CR>'
<debug> [000094.067122] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000094.067511] (ttyUSB0) device open count is 3 (open)
<debug> [000094.067629] (ttyUSB0) device open count is 2 (close)
<debug> [000094.067733] (ttyUSB0): --> 'AT^DDTMFCFG=0,1<CR>'
<debug> [000094.086467] (ttyUSB0): <-- '<CR><LF>COMMAND NOT SUPPORT<CR><LF>'
<debug> [000094.086868] Got failure code 100: Unknown error
<debug> [000094.087003] (ttyUSB0) device open count is 1 (close)
<debug> [000094.087110] Modem has extended signal reporting capabilities, enabling the Signal interface...
<debug> [000094.087220] Extended signal information reporting disabled (rate: 0 seconds)
<info>  [000094.087651] Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> registered)
<info>  [000094.087903] Simple connect state (5/8): Register
<debug> [000094.088023] Already registered in network '23201', automatic registration not launched...
<debug> [000094.089304] Periodic signal quality checks enabled (interval = 3s)
<debug> [000094.089394] loading signal quality...
<debug> [000094.089558] loading signal quality...
<debug> [000094.089662] (ttyUSB0) device open count is 2 (open)
<debug> [000094.089850] Periodic access technology checks enabled
<debug> [000094.089907] loading access technology (huawei)...
<debug> [000094.089986] (ttyUSB0) device open count is 3 (open)
<info>  [000094.090778] Simple connect state (6/8): Bearer
<debug> [000094.090881] Creating new bearer...
<debug> [000094.092230] This device (wwan0) can not support ndisdup feature
<debug> [000094.092488] ^NDISDUP not supported, creating default bearer...
<debug> [000094.094862] (ttyUSB0) device open count is 4 (open)
<debug> [000094.094986] (ttyUSB0) device open count is 3 (close)
<debug> [000094.095413] New huawei bearer created at DBus path '/org/freedesktop/ModemManager1/Bearer/0'
<info>  [000094.096289] Simple connect state (7/8): Connect
<debug> [000094.096391] Connecting bearer '/org/freedesktop/ModemManager1/Bearer/0'
<info>  [000094.096522] Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting)
<debug> [000094.098437] Launching 3GPP connection attempt with APN ''
<debug> [000094.098579] Looking for best CID...
<debug> [000094.098820] (ttyUSB0) device open count is 4 (open)
<debug> [000094.099406] Running registration checks (CS: 'yes', PS: 'yes', EPS: 'no')
<debug> [000094.099706] (ttyUSB0) device open count is 5 (open)
<debug> [000094.100055] (ttyUSB0): --> 'AT+CSQ<CR>'
<debug> [000094.109179] (ttyUSB0): <-- '<CR><LF>+CSQ: 30,99<CR><LF><CR><LF><CR><LF>OK<CR><LF>'
<debug> [000094.109912] (ttyUSB0) device open count is 4 (close)
<debug> [000094.110414] Modem /org/freedesktop/ModemManager1/Modem/0: signal quality updated (96)
<debug> [000094.110530] Periodic signal quality checks rescheduled (interval = 30s)
<debug> [000094.111260] (ttyUSB0): --> 'AT^SYSINFOEX<CR>'
<debug> [000094.127110] (ttyUSB0): <-- '<CR><LF>^SYSINFOEX:2,3,0,1,,6,"LTE",101,"LTE"<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000094.128049] Access Technology: 'lte'
<debug> [000094.128338] Modem /org/freedesktop/ModemManager1/Modem/0: access technology changed (unknown -> lte)
<debug> [000094.128534] (ttyUSB0) device open count is 3 (close)
<debug> [000094.129284] (ttyUSB0): --> 'AT+CGDCONT?<CR>'
<debug> [000094.144140] (ttyUSB0): <-- '<CR><LF>+CGDCONT: 0,"IP","","",0,0,0,0,0,0<CR><LF>+CGDCONT: 1,"IP","a1.net","",0,0,0,0,0,0<CR><LF>+CGDCONT: 2,"IP","A1","",0,0,0,0,0,0<CR><LF>+CGDCONT: 3,"IP","","",0,0,0,0,0,0<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000094.145260] Found '4' PDP contexts
<debug> [000094.145316]   PDP context [cid=0] [type='ipv4'] [apn='']
<debug> [000094.145354]   PDP context [cid=1] [type='ipv4'] [apn='a1.net']
<debug> [000094.145388]   PDP context [cid=2] [type='ipv4'] [apn='A1']
<debug> [000094.145419]   PDP context [cid=3] [type='ipv4'] [apn='']
<debug> [000094.145495] Found PDP context with CID 0 and no APN
<debug> [000094.145534] Found PDP context with CID 3 and no APN
<debug> [000094.145681] (ttyUSB0) device open count is 4 (open)
<debug> [000094.145848] (ttyUSB0) device open count is 3 (close)
<debug> [000094.146003] (ttyUSB0): --> 'AT+CREG?<CR>'
<debug> [000094.156599] (ttyUSB0): <-- '<CR><LF>+CREG: 2,1,"4F4C","004E2E03"<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000094.157225] (ttyUSB0) device open count is 4 (open)
<debug> [000094.157343] (ttyUSB0) device open count is 3 (close)
<debug> [000094.157480] (ttyUSB0): --> 'AT+CGDCONT=3,"IP",""<CR>'
<debug> [000094.183589] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000094.183963] (ttyUSB1) opening serial port...
<warn>  [000094.191098] (ttyUSB1): port attributes not fully set
<debug> [000094.191249] (ttyUSB1) device open count is 1 (open)
<debug> [000094.191294] Connection through a plain serial AT port (ttyUSB1)
<debug> [000094.191389] (ttyUSB1) device open count is 2 (open)
<debug> [000094.191501] (ttyUSB0) device open count is 2 (close)
<debug> [000094.191646] (ttyUSB1): --> 'ATD*99***3#<CR>'
<debug> [000094.191870] (ttyUSB0): --> 'AT+CGREG?<CR>'
<debug> [000094.204511] (ttyUSB0): <-- '<CR><LF>+CGREG: 2,1,"4F4C","004E2E03"<CR><LF><CR><LF>OK<CR><LF>'
<debug> [000094.205105] (ttyUSB0) device open count is 1 (close)
<debug> [000094.205298] Initial 3GPP registration checks finished
<debug> [000094.683677] (ttyUSB1): <-- '<CR><LF>CONNECT 150000000<CR><LF>'
<debug> [000094.684032] (ttyUSB1): port now connected
<debug> [000094.684290] (ttyUSB1) device open count is 1 (close)
<debug> [000094.684492] Connected bearer '/org/freedesktop/ModemManager1/Bearer/0'
<info>  [000094.685391] Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)
<info>  [000094.686746] Simple connect state (8/8): All done
<debug> [000094.879591] Disconnecting bearer '/org/freedesktop/ModemManager1/Bearer/0'
<info>  [000094.879782] Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connected -> disconnecting)
<debug> [000094.881168] Sending PDP context deactivation in primary port...
<debug> [000094.881282] (ttyUSB0) device open count is 2 (open)
<debug> [000094.881601] (ttyUSB0): --> 'AT+CGACT=0,3<CR>'
<debug> [000094.900700] (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
<debug> [000094.901264] Reopening data port (ttyUSB1)...
<debug> [000094.901353] (ttyUSB1) reopening port (1)
<debug> [000094.901396] (ttyUSB1) device open count is 0 (close)
<debug> [000094.901443] (ttyUSB1) closing serial port...
<debug> [000094.901489] (ttyUSB1): port now disconnected
<debug> [000094.901604] (ttyUSB1) serial port closed
<debug> [000094.901665] (ttyUSB0) device open count is 1 (close)

I checked against the log from the Ubuntu installation and all the other parts of the log seem more or less identical, at least I couldn´t find anything... What´s different is the version, Ubuntu uses 1.4.12, Picore ModemManager is 1.6.12.

If I create a new connection in Ubuntu exactly the same as I did under PiCore (copy/paste) the modem connects at once and is quite fast, 120Mbit down and 42 Mbit upload...

I googled around but can not find a specific cause for this behavior...
Maybe I need a little sleep and start to have a look over afterwards...

L

    [EDIT]: Added code tags.  Rich
« Last Edit: February 06, 2018, 05:29:11 PM by Rich »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: uqmi and Raspberry
« Reply #11 on: February 06, 2018, 05:34:07 PM »
Hi lotte67890
Please use  code tags  when posting commands and their results.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: uqmi and Raspberry
« Reply #12 on: February 06, 2018, 11:15:31 PM »
I'm able to connect to wifi like this:
Code: [Select]
$ nmcli r wifi on
$ nmcli r
WIFI-HW  WIFI     WWAN-HW  WWAN   
enabled  enabled  enabled  enabled

$ nmcli d wifi list
*  SSID           MODE   CHAN  RATE       SIGNAL  BARS  SECURITY 
   juanitonet     Infra  8     54 Mbit/s  72      ***   WPA2     
   ane         Infra  6     54 Mbit/s  62      ***   WPA1 WPA2
   AliNetwork     Infra  6     54 Mbit/s  57      ***   WEP       
   juanitonet     Infra  48    54 Mbit/s  54      **    WPA2     
   linksys velop  Infra  4     54 Mbit/s  42      **    WPA2     
...

$ nmcli d wifi connect juanitonet password **********
Device 'wlan0' successfully activated with '6ccf90b1-7dfb-4acf-a83d-b3db54c37c9b'.

$ nmcli c show
NAME                UUID                                  TYPE             DEVICE
juanitonet 2            6ccf90b1-7dfb-4acf-a83d-b3db54c37c9b  802-11-wireless  wlan0 
Wired connection 1  08577d65-cec5-3b12-841e-70e5ee2ce0ff  802-3-ethernet   --     
juanitonet              04262f24-ed97-440b-bdaf-589287cb920b  802-11-wireless  --     
juanitonet 1            0898da83-280d-4268-bf34-90c4219bde9d  802-11-wireless  --

..where:
Code: [Select]
$ sudo cat '/usr/local/etc/NetworkManager/system-connections/juanitonet 2'
[connection]
id=juanitonet 2
uuid=6ccf90b1-7dfb-4acf-a83d-b3db54c37c9b
type=wifi
permissions=
secondaries=

[wifi]
mac-address=A0:A8:CD:2C:3E:13
mac-address-blacklist=
mode=infrastructure
seen-bssids=
ssid=juanitonet

[wifi-security]
auth-alg=open
group=
key-mgmt=wpa-psk
pairwise=
proto=
psk=********

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

I don't have the hardware to test, but I'd guess you could do something similar for your modem

Offline lotte67890

  • Newbie
  • *
  • Posts: 15
Re: uqmi and Raspberry
« Reply #13 on: February 07, 2018, 12:33:05 AM »
Good morning Juanito, well that´s exactly what I´m doing, I started ModemManager, it finds the device, which I then can see in NetworkManager, then created a profile and connect as you did. And as written in the logs I see the connect but directly afterwards...


Code: [Select]
<info>  [000094.685391] Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)
<info>  [000094.686746] Simple connect state (8/8): All done
<debug> [000094.879591] Disconnecting bearer '/org/freedesktop/ModemManager1/Bearer/0'
<info>  [000094.879782] Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connected -> disconnecting)
<debug> [000094.881168] Sending PDP context deactivation in primary port..
.

I have no clue why the bearer is disconnecting.

I will try with wrong credentials and see what´s happening then, and I´m thinking of Pap/Chap/Authorisation... But when using under Ubuntu it works with the same profile creation...

Merci

L

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: uqmi and Raspberry
« Reply #14 on: February 07, 2018, 12:45:13 AM »
I originally thought mmcli was the way to go, but perhaps it can be done from nmcli directly (or after "mmcli -m 0 -e")?

What does "nmcli r" show for you?

For me, the wifi hardware was not listed with "nmcli c show" until after I connected.

Perhaps "nmcli d wwan connect ..." or similar (replace wwan with gsm) is the way to go?

Maybe this would help:

https://boundarydevices.com/cellular-modems-on-i-mx6-boards/
« Last Edit: February 07, 2018, 01:00:36 AM by Juanito »