Installing python and dependencies with minimum size

I would like to install the eduroam executable provided here for linux as .py file compatible for python2.7 and python3, please see an old tutorial for reference where eduroam provided .sh files.

On a Dragino DLOS8 LoRaWAN gateway with following os:

root@dragino-227794:~# cat /etc/os-release
NAME="OpenWrt"
VERSION="18.06-SNAPSHOT"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 18.06-SNAPSHOT"
VERSION_ID="18.06-snapshot"
HOME_URL="http://openwrt.org/"
BUG_URL="http://bugs.openwrt.org/"
SUPPORT_URL="http://forum.lede-project.org/"
BUILD_ID="r16-e8e7956"
LEDE_BOARD="ar71xx/generic"
LEDE_ARCH="mips_24kc"
LEDE_TAINTS="no-all busybox"
LEDE_DEVICE_MANUFACTURER="OpenWrt"
LEDE_DEVICE_MANUFACTURER_URL="http://openwrt.org/"
LEDE_DEVICE_PRODUCT="Generic"
LEDE_DEVICE_REVISION="v0"
LEDE_RELEASE="OpenWrt 18.06-SNAPSHOT r16-e8e7956"

Please check the manual here and the guide for configuring the luci package here.

I have installed python-base and tried executing the .py installer from eduroam but there are packages missing:

import argparse
import base64
import getpass
import os
import re
import subprocess
import sys
import uuid
from shutil import copyfile

Installing python-pip was not possible due to available data, after opkg remove python-base and trying opkg install python-base again, not even installing this package was possible:

root@dragino-227794:~# opkg install python-base
Installing python-base (2.7.18-3) to root...
Downloading https://downloads.openwrt.org/releases/packages-18.06/mips_24kc/packages//python-base_2.7.18-3_mips_24kc.ipk
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
Collected errors:
 * pkg_write_filelist: Failed to open //usr/lib/opkg/info/python-base.list: No space left on device.
 * opkg_install_pkg: Failed to extract data files for python-base. Package debris may remain!
 * opkg_install_cmd: Cannot install package python-base.
 * opkg_conf_write_status_files: Can't open status file //usr/lib/opkg/status: No space left on device.
root@dragino-227794:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 8.8M      8.8M         0 100% /rom
tmpfs                    29.4M      1.2M     28.2M   4% /tmp
/dev/mtdblock4            5.6M      5.5M    116.0K  98% /overlay
overlayfs:/overlay        5.6M      5.5M    116.0K  98% /
tmpfs                   512.0K         0    512.0K   0% /dev

Please see a list of installed packages here as well as the python installer from eduroam here.

I will probably first need to uninstall packages again and then try to get the old .sh-installer or a minimum size solution with python.

Are you sure you're using an official version of openwrt?

What kernel version is your device running?

The kernel is:

root@dragino-227794:~# cat /proc/version
Linux version 4.9.109 (root@DraginoHK) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7360-e15565a) ) #0 Fri Jun 29 16:58:53 2018

Doesn't add up, since it's a snapshot pointing towards packages provided by a non snapshot release.

Is your device supported by openwrt?

Ideally the wpa_supplicant.conf could be configured, as explained here.

Previously an openwrt user had the same issue but for my 'weird' dragino version I cannot find the wpa_supplicant.conf file in /etc but theres a wireless file

root@dragino-227794:/etc/config# cat wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option phy 'phy0'
        option htmode 'HT20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'DSSS_CCK-40'
        option hwmode '11ng'
        option disabled '0'
        option noscan '1'
        option txpower '17'
        option channel '11'
        option country 'DE'

config wifi-iface 'ap_0'
        option device 'radio0'
        option ifname 'wlan0'
        option network 'lan'
        option mode 'ap'
        option hidden '0'
        option maxassoc '30'
        option disabled '0'
        option encryption 'psk2'
        option key 'dragino+dragino'
        option ssid 'dragino-227794'

config wifi-iface 'sta_0'
        option device 'radio0'
        option ifname 'wlan0-2'
        option mode 'sta'
        option network 'wwan'
        option encryption 'psk2'
        option ssid 'Host-SSID'
        option key 'Host-Passphrase'
        option disabled '0'

root@dragino-227794:/etc/config#

He clearly states he's using 19.07, and you're not.

Try answering the question.

@frollic Other dragino gateways are supported:


Not the DLOS8 that I am using. I am flashing the newest firmware now and will try to configure /etc/config/wireless following the documentation here.

The only unclear part is getting the ca_cert file, where I will ask the eduroam providers. Extremely helpful should be this thread where a user is trying to configure eduroam wifi in the wireless-config.

I will update you if it worked.