Error #341
[guifi qmp 3.1] not working
100%
Description
I tried with:
https://guifi.net/en/guifi/device/72950/view/unsolclic
and it does not work
[this gives an error with old version of qMp]
with http accept the url:
http://guifi.net/en/guifi/device/72950/view/unsolclic
same for:
http://guifi.net/guifi/device/72950/
results
formatting is failing
<font color='#0a0'>Getting oneclick config: Done! Checking oneclick config: Done! Showing variables: nodename='' devname='' devmodel='Rocket/Nano/Loco' ipv4='' netmask='' zoneid='' </font>
and cannot obtain the values, so get a random ipv4, etc.
[you can get this values correctly from old version of qMp]
History
#1 Updated by Jorge L. Florit over 8 years ago
- Category set to Packages
- Status changed from Nou to En progrés
Hi, qmp-guifi oneclick has never worked with HTTPS, in fact, wget in OpenWRT doesn't get HTTPS URLs; it is due to a bug with wget in busybox [1].
We have to try an alternative to support HTTPS.
By the way, with HTTP (no secure) in clearance 3.0 works well:# qmpguifi get_url http://guifi.net/en/guifi/device/72950/view/unsolclic /tmp/guifi_oneclick
Getting oneclick config:
Done!
# qmpguifi check /tmp/guifi_oneclick
Checking oneclick config:
Done!
# qmpguifi print /tmp/guifi_oneclick
Showing variables:
nodename='BCNCoroleu29'
devname='BCNCoroleu29Rd1'
devmodel='AirMaxM5_Rocket/Nano/Loco'
ipv4='10.1.57.129'
netmask='255.255.255.224'
zoneid='StAP'
I have to try with the latest v3.1, but nothing has change in the package for months, so it should still work.
[1] http://lists.busybox.net/pipermail/busybox-cvs/2005-April/019949.html
#2 Updated by guifi pedro over 8 years ago
- Subject changed from [guifi qmp] not working / do not accept https url to [guifi qmp 3.1] not working
#3 Updated by guifi pedro over 8 years ago
with a qMp 3.1, I'm sure you have access to it: 10.1.57.128
root@BCNCoroleu29-62ba:~# qmpguifi check /tmp/guifi_oneclick
Checking oneclick config:
Done!
root@BCNCoroleu29-62ba:~# qmpguifi get_url http://guifi.net/en/guifi/device/72950/view/unsolclic /tmp/guifi_oneclick
Getting oneclick config:
Done!
root@BCNCoroleu29-62ba:~# qmpguifi check /tmp/guifi_oneclick
Checking oneclick config:
Done!
root@BCNCoroleu29-62ba:~# qmpguifi print /tmp/guifi_oneclick
Showing variables:
nodename=''
devname=''
devmodel='Rocket/Nano/Loco'
ipv4=''
netmask=''
zoneid=''
#4 Updated by guifi pedro over 8 years ago
About the HTTPS error, I suggest a better error output (detect initial 4 characters: https). Say that "HTTPS URL is not valid, please use HTTP" (specially in the web part) instead of:
- qmpguifi get_url https://guifi.net/en/guifi/device/72950/view/unsolclic /tmp/guifi_oneclick
Getting oneclick config:
qMp: ERROR: Wrong URL specified. USE: '/usr/bin/qmpguifi get_url [http://guifi.net/guifi/device/#####/] [FILE]'
Web error says:
Getting oneclick config: ERROR: Wrong URL specified.
also, I think the web should take this URL as valid (put "http://" if there is no protocol specified):
guifi.net/en/guifi/device/72950/view/unsolclic
The CLI part is ok, because is assumed to be a more experimented user.
Or perhaps we can assume that in general all users that use qMp are experimented and this corrections are not needed.
#5 Updated by Jorge L. Florit over 8 years ago
The HTTPS issue should be revised separately and maybe we can change wget to curl. So it will be a feature to support https instead of a bug. Of course it should be nice to differentiate an error in the URL from an error if it's a secure HTTP or not.
The other question is because there is some change in the behaviour of the awk command, it ocurrs in v3.1 because there is a new version of busybox.
root@UPCc6lab104-TL-5cab:~# awk
BusyBox v1.19.4 (2014-05-23 12:27:44 CEST) multi-call binary.
root@BCNCoroleu29-62ba:~# awk
BusyBox v1.22.1 (2014-12-12 10:08:21 CET) multi-call binary.
#6 Updated by Jorge L. Florit over 8 years ago
- % Done changed from 0 to 50
The blank fields issue should be solved with commit 148748f3.
If you want to test it without flashing again, you can replace /etc/qmp/qmp_guifi.sh with the fixed file [1].
#7 Updated by guifi pedro over 8 years ago
now it works. How fast Jorge (less than 24h, what's that! :P), thanks!
- formatting in the web is awful
- another easy way to solve https is change this text:
Specify the guifi.net URL of the device:
with this other:
Specify the guifi.net URL (HTTP) of the device:
seems that curl is not included in qMp 3.1, so perhaps is a bad idea, it means more size for images (thinking about 4MB flash devices), no?
#8 Updated by Jorge L. Florit over 8 years ago
- Status changed from En progrés to Resolt
- % Done changed from 50 to 100
"- formatting in the web is awful"
It is because of the new theme. It's now fixed in commit cf62ebab [1].
"- another easy way to solve https is change this text [...]"
I noticed that curl is not included, so while wget in busybox doesn't support HTTPS I've added the purposed solution temporarily (in commit eb8c6514 [2]): an error message notifying that HTTPS URLs are not supported yet and the text specifying "HTTP URLs" in the web interface.
[1] http://dev.qmp.cat/projects/qmp/repository/revisions/cf62ebabf0b072a075bb326b3460ceefae383adc
[2] http://dev.qmp.cat/projects/qmp/repository/revisions/eb8c6514dab5bf80e8a96687aee1209e5afa744c
#9 Updated by Jorge L. Florit over 8 years ago
- Status changed from Resolt to Tancat