PINE64
modem no carrier message - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Hardware (https://forum.pine64.org/forumdisplay.php?fid=122)
+--- Thread: modem no carrier message (/showthread.php?tid=13844)

Pages: 1 2


modem no carrier message - Rainer - 05-08-2021

hello,

pretty new to cell phones with previous desktop experience with linux. i have an old blackberry z30 that needed replacement and didn't like the iphone/ android options.

i recently inserted my sim card into the pinephone and keep getting the 'modem no carrier' messages. i'm on the koodo/telus network in canada. koodo network is displayed on the top right of the pinephone. sms, spacebar, and the phone seem to be functioning normally!? is there something i should be doing/configuring?

thanks.


RE: modem no carrier message - mouffa - 05-18-2021

I am working on the same problem for Vodafone Greece, initially I get "IP configuration not found" so I configured the APN, then I get the message "No carrier detected", so I am now working with the configuration of the LTE bands.

For the configuration I am using the AT commands through minicom, the atinout is not working well.

You can find the AT commands in the manual.

https://sixfab.com/wp-content/uploads/2018/09/Quectel_EC25EC21_AT_Commands_Manual_V1.2.pdf

The commands are the same for all the models but the possible settings maybe different.

Setting the APN for example,
Code:
sudo minicom -D /dev/ttyUSB2

at+cgdcont=1,"IP","internet.vodafone.gr"
at+cgact=1,1

that is you set up an IP profile and you activate it. These commands are in chapter 10.

In chapter 4 you can find the commands for the frequencies that is, at+qcfg="band" and if needed at+qcfg="hsdpacat" and at+qfg="hsupacat".

You can search on the internet for your carrier's bands but you can also set the settings to "any band".

The AT commands have a very uniform format, for example when they are followed by =? they respond with the possible settings, when they are followed by ? they respond with the active settings. The manual is comprehensive.

Absolutely everything in the modem can be configured and inspected with the AT commands.

Last but not least, I can not figure out how to leave minicom so I just close the terminal.


RE: modem no carrier message - Rainer - 05-18-2021

wow, your reply is much appreciated! i believe with the command, 'sudo minicom -D /dev/ttyUSB2' i got a no such device reply but i will try again with your information. thanks for the quectel AT command manual - that's quite a read, 223 pages! thanks again. and yes i couldn't manage to exit minicom gracefully either .... maybe this has the answer, at the end in the 'misc' section, https://linux.die.net/man/1/minicom

(05-18-2021, 08:10 AM)Rainer Wrote: wow, your reply is much appreciated! i believe with the command, 'sudo minicom -D /dev/ttyUSB2' i got a no such device reply but i will try again with your information. thanks for the quectel AT command manual - that's quite a read, 223 pages! thanks again. and yes i couldn't manage to exit minicom gracefully either .... maybe this has the answer, at the end in the 'misc' section, https://linux.die.net/man/1/minicom

that should read, 'cannot open /dev/ttyUSB2'


RE: modem no carrier message - mouffa - 05-18-2021

I continued my research today. On what minicom is concerned you have to use the CTRL key in combination with other keys and it seems that it is not working on the native terminal emulator of Manjaro Plasma mobile, so you can not exit properly.

The manual is not to be read as a novel, you just look up the specific category of commands according to the actions you want to take.

If your modem is working properly you can also use the symbolic link /dev/EG25.MODEM which is aware of the correct device.

Executing certain commands results to a disconnection of the modem from the Plasma environment and though it seems dead, if you call it you can hear it ringing through the calling device and you will see the message "RING" in the minicom terminal.

Some commands may return an error but if you exit and connect again with minicom they work.

It seems a quite complicated situation, today I tried listing the networks, LTE scanning and changing the frequencies but I didn't yet arrive to a successful result.

Code:
at+qcfg="nwscanmode",3
at+cops=?

the first command scans for LTE networks, the second lists all the operators your SIM can connect.

The commands are quite cryptic sometimes but you can find examples at m2msupport.net, for example

https://m2msupport.net/m2msupport/atcops-plmn-selection/

at the end of the manual you can find what the error codes mean.

Another way to manipulate the modem is from the terminal through the mmcli command but you must first start the modem manager service from another terminal, for example

Code:
sudo systemctl start ModemManager.service

Good luck and if you reach the solution write it here.


RE: modem no carrier message - mouffa - 05-20-2021

I think I am getting close. Maybe not even the Modem Manager is needed. The two basic services for controlling the Quectel on Pinephone are eg25-manager and ofono.

eg25manager starts and configures the modem based on some .toml files in /usr/share/eg25manager which contain AT commands, there you can see many commands of the category +QCFG which are not listed in the manual.

https://gitlab.com/mobian1/devices/eg25-manager

you can start,stop,restart,enable, and disable the service in the usual way through systemctl

the only command you can give through the terminal is one that defines the configuration files

Code:
eg25manager -c <file>

ofono is similar to mmcli and it is an API for telephony applications

https://01.org/ofono

it is controlled through the ofonoctl command,

Code:
ofonoctl -h

So for now I recommend to disable the ModemManager (systemctl disable ModemManager), turn off the phone, insert the SIM, reboot and try to configure a data connection with ofonoctl.


RE: modem no carrier message - mouffa - 05-20-2021

it can become way too complicated, have a look here, incidentally the same operator is used with yours

https://bloggerbust.ca/post/install_and_configure_postmarketos_with_plasma_mobile_on_the_pinephone/

giving the command 

Code:
ofonoctl wan

I get all the entries blank so I have to configure the interface as wwan0 and the APN according to the operator at least.


RE: modem no carrier message - Rainer - 05-20-2021

Thanks for your effort in trying to resolve this issue!!! I'm a lapsed linux desktop user and I only recently bought my first cell phone so my knowledge regarding this issue is quite limited. I also have a hard time determining exactly what program (s) I need to use to simply see what network my phone is connected to, minicom?, mmcli?, nmcli? .... I believe someone advised me to actually stop the service first before entering commands to troubleshoot. This is the one case/linux forum where everyone actually has the exact same hardware so I can't understand why it is so difficult.


RE: modem no carrier message - mouffa - 05-20-2021

Yes, it is strange that certain topics like the Quectel modem which should be mentioned somewhere as a cookbook are completely absent and there is only a list of "working" operators with no reference on how you make Quectel to work.

The big picture is that every service has got some kind of command line tool, all the services are monitored and controlled by systemd and the communication between services and processes is achieved through D-Bus which can be inspected with programs like qdbus .

Though the ModemManager works simultaneously with ofono it is better to run only one of them so you keep ofono and disable ModemManager(if it is enabled) and then reboot

Code:
systemctl disable ModemManager

if you just stop the service it may not work well

In the previous link I gave, in the last chapter "GPRS & LTE configuration", the phone is configured for Koodo so you could just copy and paste the commands.

Here you can find some examples of how ofonoctl works

https://sr.ht/~martijnbraam/ofonoctl/

ofono list will show you where you are connected
ofono operators will show you all the available networks

for the time being you leave aside the minicom, mmcli which controls the unsused ModemManager and nmcli which controls the network interfaces  through the NetworkManager.

during the configuration you stop ofono too as you will see in the guide which is somehow involved because it uses the QMI interface of the modem through the D-Bus.

I believe your table too after giving the command ofono wan will be empty so you have to configure the context as it is done in the guide providing the network interface of the modem which is probably wwan0 and the right APN for Koodo.


RE: modem no carrier message - mouffa - 05-22-2021

I solved the problem on Manjaro Phosh, it seems that this distribution is very well configured and works almost out of the box only by updating the operator's APN name.

Settings > Mobile > Access Point Names  and then you choose and edit one of the profiles and click Save , if you can't save it reboot the phone. Your APN should be

Code:
sp.koodo.com


https://www.koodomobile.com/en/help/setting-data-your-non-koodo-phone

Phosh uses the ModemManager instead of ofono , I believe there are valuable scripts in there which configure the modem and wwan0 interface automatically and this could be easily ported to Plasma.

Now I show how I tested it on a SD card, I will flash it on the eMMC later to see the true performance.

We download the latest release from here

https://github.com/manjaro-pinephone/phosh/releases


Code:
# Download the image and the SHA256 signature use, 'wget -c <file>' to resume an interrupted download, do not delete the partial file

wget https://github.com/manjaro-pinephone/phosh/releases/download/beta10/Manjaro-ARM-phosh-pinephone-beta10.img.xz
wget https://github.com/manjaro-pinephone/phosh/releases/download/beta10/Manjaro-ARM-phosh-pinephone-beta10.img.xz.sha256

# check the signature for integrity of the file, it should return 'OK'

sha256sum -c Manjaro-ARM-phosh-pinephone-beta10.img.xz.sha256

# unzip the file keeping the original

xz -d -k Manjaro-ARM-phosh-pinephone-beta10.img.xz

# check that the SD is inserted and unmounted, you should see a device 'mmblk0', if any of the partitions are mounted unmount them with 'sudo umount <mount directory>'

lsblk

# flash the image to the device, that is write the image in 1MiB blocks, show the progress and flash the buffer completely

sudo dd bs=1M if=Manjaro-ARM-phosh-pinephone-beta10.img of=/dev/mmcblk0 status=progress conv=fsync

#reboot, wait at the terminal screen for a while and it will start, continue with the set up and then unlock the screen with the code '123456', the same code is the 'sudo' password

#respectively the flashing to the eMMC after booting with the SD would be

sudo dd bs=1M if=Manjaro-ARM-phosh-pinephone-beta10.img of=/dev/mmcblk2 status=progress conv=fsync

# assuming that the .img file is in your working directory, be sure to unmount the first partition of the eMMC before flashing which is mounted under /boot

sudo umount /boot



RE: modem no carrier message - Rainer - 05-22-2021

wow, thanks again. i finally had a chance to slowly read your info - very helpful! using the ofono commands i was able to determine that the modem was powering off intermittently and a simple 'poweron' and 'online' command from ofono got me back up. i'm trying to be patient with plasma-mobile for the time being but i'm discovering more and more problems with it. i also was never a big fan of kde. i will probably look into phosh in a while. my next step will be to troubleshoot the audio quality of the telephone. i believe one of your links has some advice on that too. cheers.