"Too few arguments" when connecting my HAT and auto-connecting at boot

Dear all

I am new and I received and install the Raspberry Pi 3G/4G&LTE Base HAT with the Quectel EC25 Mini PCle 4G/LTE Module on aRaspbery Pi3.

I followed that procedure https://sixfab.com/qmi-interface-with-3g-4g-lte-base-shield-v2/?unapproved=181160&moderation-hash=1ac8d3fc5b8cdd831398a95004133360#comment-181160

I format at download the lasp version od Rasbian Litle.
I connected the Ethernet in order to not use the WiFi configuration while downloading the soft.

First question: FDo I need to enable that option: B2 Wait for Network at Boot ?

Second quetsion:
I run the command

./quectel-CM -s gprs.swisscom.ch -p 1234 -f /var/log/sixfab_log.txt

Here is the output and my 2nd question is why it “freeze” on Too few argument"

sudo ./quectel-CM -s gprs.swisscom.ch -p 1234 -f /var/log/sixfab_log.txt
[03-26_01:07:16:162] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
[03-26_01:07:16:162] ./quectel-CM profile[1] = gprs.swisscom.ch///0, pincode = 1234
[03-26_01:07:16:164] Find /sys/bus/usb/devices/1-1.2 idVendor=2c7c idProduct=0125
[03-26_01:07:16:164] Find /sys/bus/usb/devices/1-1.2:1.4/net/wwan0
[03-26_01:07:16:165] Find usbnet_adapter = wwan0
[03-26_01:07:16:165] Find /sys/bus/usb/devices/1-1.2:1.4/usbmisc/cdc-wdm0
[03-26_01:07:16:165] Find qmichannel = /dev/cdc-wdm0
[03-26_01:07:16:181] cdc_wdm_fd = 8
[03-26_01:07:16:263] Get clientWDS = 20
[03-26_01:07:16:295] Get clientDMS = 1
[03-26_01:07:16:327] Get clientNAS = 4
[03-26_01:07:16:359] Get clientUIM = 1
[03-26_01:07:16:393] Get clientWDA = 1
[03-26_01:07:16:423] requestBaseBandVersion EC25EFAR06A04M4G
[03-26_01:07:16:552] requestGetSIMStatus SIMStatus: SIM_PIN
[03-26_01:07:16:616] requestSetProfile[1] gprs.swisscom.ch///0
[03-26_01:07:16:681] requestGetProfile[1] gprs.swisscom.ch///0
[03-26_01:07:16:713] requestRegistrationState2 MCC: 228, MNC: 1, PS: Detached, DataCap: UNKNOW
[03-26_01:07:16:744] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[03-26_01:07:16:808] requestRegistrationState2 MCC: 228, MNC: 1, PS: Detached, DataCap: UNKNOW
[03-26_01:07:17:961] requestRegistrationState2 MCC: 228, MNC: 1, PS: Detached, DataCap: EDGE
[03-26_01:07:17:993] requestRegistrationState2 MCC: 228, MNC: 1, PS: Detached, DataCap: EDGE
[03-26_01:07:18:025] requestRegistrationState2 MCC: 228, MNC: 1, PS: Detached, DataCap: EDGE
[03-26_01:07:20:680] requestRegistrationState2 MCC: 228, MNC: 1, PS: Attached, DataCap: EDGE
[03-26_01:07:20:745] requestRegistrationState2 MCC: 228, MNC: 1, PS: Attached, DataCap: EDGE
[03-26_01:07:21:065] requestSetupDataCall WdsConnectionIPv4Handle: 0x871bb840
[03-26_01:07:21:129] requestRegistrationState2 MCC: 228, MNC: 1, PS: Attached, DataCap: EDGE
[03-26_01:07:21:161] requestQueryDataCall IPv4ConnectionStatus: CONNECTED
[03-26_01:07:21:225] ifconfig wwan0 up
[03-26_01:07:21:256] busybox udhcpc -f -n -q -t 5 -i wwan0
udhcpc: started, v1.30.1
No resolv.conf for interface wwan0.udhcpc
udhcpc: sending discover
udhcpc: sending select for 10.111.11.209
udhcpc: lease of 10.111.11.209 obtained, lease time 7200
Too few arguments.
Too few arguments.

The prompt did not come back and it stay at “Twoo few argument”?
That normal?

I open a new terminal and I log into my raspberry. I run ifconfig wwan0 and I got an IP

wwan0: flags=4291 mtu 1500
inet 10.1111.11.209 netmask 255.255.255.252 broadcast 10.111.11.211
inet6 fe80::b5ff:b507:9b4:701a prefixlen 64 scopeid 0x20
ether 0e:ef:01:f7:13:e5 txqueuelen 1000 (Ethernet)
RX packets 6 bytes 1400 (1.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 48 bytes 8867 (8.6 KiB)
TX errors 0 dropped 10 overruns 0 carrier 0 collisions 0

After it, I opened a second terminal and I run the command

ifconfig wwan0

and I got an IP address

wwan0: flags=4291 mtu 1500
inet 10.111.11.209 netmask 255.255.255.252 broadcast 10.111.11.211
inet6 fe80::b5ff:b507:9b4:701a prefixlen 64 scopeid 0x20
ether 0e:ef:01:f7:13:e5 txqueuelen 1000 (Ethernet)
RX packets 6 bytes 1400 (1.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 48 bytes 8867 (8.6 KiB)
TX errors 0 dropped 10 overruns 0 carrier 0 collisions 0

I returned to my first terminal and I pressed ctrl+c, and I got back the prompt.
But on my second terminal, I run again

ifconfig wwan0

and I did not get an IP address

I supposed then, the first terminal must always stay open (do not press ctrl-c to leave the router working), but what’s means Too few argument then?

Third question:
At the end of the procedure, it writtem, we can auto-connect at boot.
It say how to save the APN, but nothing is wrriten about the pin code. How to save the pin code while auto-connecting?

Last question:
I would like to configured it as a Access Point, then I wunder how to configure and save the SSID.
Does RaspAP will help?

Many thnak for your help!!

I wonder if I would have a chance to get an help mainly for those two questions

I have to continue my work over the week-end

Many thanks
Pierre

Hi @Pierrot10,
I hope all is well.

First question: No, don’t need it.

Second question: Too few arguments is a message shown by busybox. No, it’s not an error message. It is an information message. It does not prevent QMI service.
Make sure the QMI service is running.

Third question: For existing config you can edit /usr/src/qmi_reconnect.sh according to your configuration.

Last question: Yes, you can use this tutorial. (Using Raspberry Pi Base HAT as a Wi-Fi Hotspot)

I hope this information helps.
Best regards.

Hi @ensar,

Thanks a lot for your reply.
Let me ask you some complemetary question.

Until now, I have not setup the “auto connect at boot”, may be that’s the reason why I can not find
/usr/src/qmi_reconnect.sh, that right?

When I lunched

./quectel-CM -s gprs.swisscom.ch -p 1234 -f /var/log/sixfab_log.txt

the connection is done and the last print (in the terminal) is

Too few argument

Just to make sure I understand, I have to keep that terminal open to preserve the 4G connection, if I press ctrl+c, to get back the prompt, the connection is closed, that’s correct?

My goal is to have the ‘auto connect at boot’, then I supposed when I will complete it (I am doing it in a couple of minutes), I will find the file /usr/src/reconnect.sh ? and from that file, I configure the pin code, and the path of my log file, isn’t?

Thank for your support and help!!

Hi again @ensar

I installed the script install

sudo ./install_auto_connect.sh

and the file ‘/usr/src/qmi_reconnect.sh’ has been created.

I suppose, I have to modify the line

sudo ./quectel-CM -s gprs.swisscom.ch

with

sudo ./quectel-CM -s gprs.swisscom.ch -p 1234 -f /var/log/sixfab_log.txt

Note, I am just a bit surprise because after installing the auto connect script, I tun

ifconfig wwan0

and it showed me an IP address while my SIM card require an PIN code.
As long as I have not modify the above line, it should not be able to connect, isn’t?

Thanks and have a good week-end

Hi @Pierrot10,

Yes, like you said.

Now, does the reconnect service work?
Check it: sudo systemctl status qmi_reconnect.service

Dear Ensar

I finally could do all of the installation and it works fine.
I wrote an article here with links to Sixfab articles (unfortunately in French) , but I hope it can help some one (use google translate, it should help)
I used two of your pictures, I hope you allow me to keep, otherwise I will remove it. Le me know.

1 Like

Hi @Pierrot10,

Of course!
Wonderful, this is more than I expected. :heart_eyes:
Thank you for your feedback and for sharing your experience.

We :heart: Open Source.
Best.