Connecting Kiwi via WiFi



  • I have encountered one problem with my dongles. When the Kiwi boots with only a dongle installed, the listener page works fine but the admin page reports
    "Still determining local interface address.
    Please try reloading page in a few moments."
    At the end of /var/log/messages I find these lines:
    Aug 8 14:36:43 kiwisdr kiwid: 00:02:13.336 ........ [00] PWD isLocal_if_ip: IPv4 client, but no server IPv4/IPv4_6
    Aug 8 14:36:43 kiwisdr kiwid: 00:02:13.340 ........ [00] PWD admin config pwd set TRUE, auto-login TRUE
    Aug 8 14:36:43 kiwisdr kiwid: 00:02:13.343 ........ [00] PWD admin CAN'T DETERMINE: no local network interface information

    Despite this problem the wifi dongle configuration is usable, since you don't need access to the admin pages in normal operation.

    I have exhausted my expertise and patience on this project, but I can share an image of my microSD with anyone who wants to try to further debug this configuration.
  • edited August 2019
    Rob...I have experienced the same anomaly as you describe with the use of kiwisdr.local:8073 and the admin page with the kiwi running with the wireless dongle

    However, I am fairly sure that as time progresses the kiwi "forgets" the ethernet IP and gets used to the new "local" ip as provided by the wireless dongle and eventually the "local" url works as expected.

    I'm continuing to work on various kernel module solutions proposed on the net for the rtl8192EU chipset. One potential "snag" is that most are for Intel x86 or x64 or RPI, so may not build for the kiwi ARM processor. I have ordered a DWA-131 wireless dongle

    Summarizing my experience

    Wireless Dongle....

    Netgear WG111v3 - chipset rtl8187B - driver in kernel - works out-of-the-box
    DWA-131 (early unknown version) - chipset rtl8192SU - driver firmware-realtek - works well
    DWA-131(E) - chipset rtl8192EU - driver needs to be compiled - work in progress

    Andy G3TDJ
  • I've explained a few times in the (now distant) past that there needs to be a few more places in the Kiwi code where support for the wlan0/1 device needs to be added. This is probably one of those cases.
  • edited August 2019
    I had the same problem with the interface error message. I "solved" it by disabling the ethernet port temporarily:
    ifconfig eth0 down
    and then restart kiwid.
    I've ordered a bunch of DWA-131 but they haven't arrived yet.
  • My DWA-121 work only briefly for me during my session with Andy earlier this week. It will be great if you find an in production DWA we can recommend.
  • Definitely not DWA-171. I spare you the details.

    What was that Forrest Gump quote again?
    "Life is like buying a WiFi stick for linux, you never know what you're gonna get"
  • edited August 2019
    Summarizing my (limited) experience so far with the kiwisdr and wireless dongles

    Netgear WG111v3 - chipset rtl8187B - driver in kernel - works out-of-the-box
    D-Link DWA-131 (early unknown version) - chipset rtl8192SU - driver firmware-realtek - works well
    D-Link DWA-131(E) - chipset rtl8192EU - driver needs to be compiled - work in progress - awaiting hardware on order

    Andy G3TDJ
  • FWIW, related info:
    Product Name: TP-LINK TL-WN725N V2
    Chipset: RTL8188EUS
  • edited August 2019

    Couple of good points - spotted while looking for something work related.

    On reflection (on actually reading the post) just looks like it's referencing older links posted previously in this thread.
    I might try the deprecated driver anyway when i find time. Other comments on the Arrow site said the BagleBone is very particular about wireless dongles, power supply stability and current is also important to that issue.
    Intermittent Wifi problems could be a mix of drivers and power management.
  • Today I was successful in getting my Vilros WiFI adapter to work with my KiwiSDR. I did the following:
    - Put in the dongle in the USB port of the Kiwi.
    - Use Putty to connect per SSH to my Kiwi (user=root; no pw)
    - Execute one by one the following commands:
    sudo apt-get install usbutils
    sudo apt-get install iw tools
    sudo apt-get install wireless-tools
    sudo apt-get install wpasupplicant
    sudo apt-get install wavemon
    - Then execute “lsusb” to get the name and the chipset of the adapter. I f.e. got the following result:
    Bus 001 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    - If your chipset cannot be identified by this output, you should additionally look on this page to query for the chipset of your adapter:
    - Then look in this list if there exists a linux driver for your chipset:
    - Go to the help page for your chipset. In my case it was “rtl819x”. There I found the hint, that I have to install the package “firmware-realtek”.
    - So I had to put in the command "apt-get install firmware-realtek" in Putty.
    - After completing the driver installation, send the command “lsmod” to see if the driver is installed. In my case the output was

    rtl8192cu 52250 0
    rtl_usb 8852 1 rtl8192cu
    rtl8192c_common 38293 1 rtl8192cu
    rtlwifi 54277 3 rtl_usb,rtl8192c_common,rtl8192cu

    So everything seemed to be fine.
    - Then put in the command “ifconfig -a” to see if the adapter is working. The output should have a “wlan0” section then.
    - Next you should encrypt your WiFI passphrase by using this command:
    wpa_passphrase „WiFi SSID“ „your ASCII passphrase” (without the “”)
    The resulting value for “psk” (not”#psk”!) is the encrypted passphrase. Memorize this for the next step.
    - Then you have to edit the file “interfaces” to configure your WiFi. Use this command: “sudo nano /etc/network/interfaces”
    - You have to add these lines here:

    auto lo
    iface lo inet loopback

    allow-hotplug wlan0
    auto wlan0
    iface wlan0 inet dhcp
    wpa-ssid "SSID" # without „“
    wpa-psk “your encrypted pw” # see above

    - Then Strg + O and Strg + X to save the file and quit the editor
    - Next you have to activate your WiFi once with the command "sudo ifup wlan0" and everything should be fine.
  • edited August 2019
    Just to add that "wavemon" is included in my July 12th original post on this thread about getting wifi dongles with the rtl8192cu chipset working with the Kiwisdr so that details of the "wanted" wireless AP can easily be identified. Wavemon is a superb command line wireless monitoring tool.
    From Github

    "wavemon is a wireless device monitoring application that allows you to watch signal and noise levels, packet statistics, device configuration and network parameters of your wireless network hardware"

    It's interesting to note that Matti65's wireless dongle installation, and my Netgear rtl 8187b installation both install as wlan0, while my rtl8192cu install will not "ifup" as wlan0, but works fine with "if up wlan1". So it may be necessary to try wlan1 if wlan0 does not come up.
  • My NetGear WG111v2 adapter does also work with the already installed RealTek firmware:

    Bus 001 Device 003: ID 0846:6a00 NetGear, Inc. WG111v2 54 Mbps Wireless [RealTek RTL8187L]
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    Module Size Used by
    rtl8187 41316 0

    "ifconfig -a" shows that WiFi is activated.
  • OK...the rtl8187 driver is "built in" as a kernel Netgear WG111v3 works with "firmware-realtek" uninstalled

    The D-Link DWA-131(E) using a rtl8192EU chipset is "work in progress" here, waiting for the dongle to arrive. This chipset may require a new kernel module to be compiled which could be "tricky" given the Kiwi uses a AM335x Cortex-A8 ARM processor - we shall see if the compiler directives are available.
  • BTW: The command should be "sudo apt-get install iw" (not "sudo apt-get install iw tools")

  • I gave it a go for a RTL8192eu based wifi (has an RP-SMA antenna port, which I need for my installation) and ran into issues compiling for this kernel. If somebody has a seperate-antenna option for Wifi that works now, would be interested to try that.
  • @W1EUJ
    TL-WN722N works ok for me, even with the ancient default kernel (4.4.9-ti-r25). It has a RP-SMA female jack for an external antenna.
    But I've bought it years ago, they could have changed the controller in the meantime.
    Bus 001 Device 002: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
  • @HB9TMC
    Thanks for the recommendation, I bought one and its working out well. The chipset has changed to a Realtek but its supported with installation of the firmware-realtek package. My VLF performance is much improved, and so I can finally be rid of the long Ethernet cable I ran out to the barn.
  • I got round to pulling a couple of mini wifi dongles out of the draw. Not recommending this one but it does work Edimax N150 (EW-7811n) I bought two for Raspberry Pi use but the range was no better than the stock antenna inside the all metal enclosure (with slots) so they got put away and forgotten.
    Anyway after making my usual heavy going of Linux stuff I got it going and even braved Connman, the result of all this fiddling was that the noise level was no better than my usual WIFI bridge, but at least I tried.

    Now one thing that really bugs me is getting to the admin interface due to the stuck in "determining local interface address".

    Could we have an option to allow admin connections from the localhost? so we can SSH with a port forward to the BeagleBone and then connect by browser to (local PC) http://localhost:someport so that Kiwi sees the remote connection IP as itself and just lets us get on?
    If someone is in by SSH they have passed most of the security anyway. I assume this could open exploit risks on the web facing server if enabled by default so option only (enabled from ssh would be fine).
  • There was a change in v1.310 to recognize wlan1 in addition to wlan0/eth0 as a valid local interface. Did this not fix the "determining local ..." problem when using wlan1 devices? I Don't have a working USB WiFi here so I can't test.
  • edited August 2019
    Must be some time event as went back to it this time and straight in. (3.19)

    I have to say using connman seems to give wierd conflicts, E.G. having the Ethernet as static seemed to stop the WiFI coming up (might be false assumption>>).
    I think it tries to use the last connection so if I can prefer wifi that might help (as long as the hardware comes up).
    I'm not 100% sure about connman as I get it going (with another connection like Ethernet) connect to the wifi fine, shut it down take it to the antenna (plus box) start it up, connects to wifi fine then reboot and the wireless doesn't come back up unless I pull and replug the USB dongle. I've seen other mention of it so I'm sure I can track it down, just irritating as the wireless is a good option but quite fiddly and not 100% reliable right now (with this dongle anyway).
  • edited August 2019
    The apparent anomalies with connman may be because there are conflicts between the network configuration stored in /etc/network/interfaces and the connman configuration. Connman does not use /etc/network/interfaces to store config.

    Interestingly I inserted a new D-Link DWA-131 wireless dongle with a rtl8192SU chipset into my kiwisdr and this appears as wlan2 with an "ifconfig -a" command. (This chipset works well with the firmware-realtek driver)

    I chased this down to a udev rule that seemingly creates a new wlan interface number each time a new mac address is encountered.

    In /etc/udev/rules.d I can see three udev rules, one for each of the three wireless dongles which have successfully worked in the kiwisdr

    I've compiled a new kernel module for a rtl 8192EU chipset, so using the "theory" above this might just appear as wlan3 when the new dongle is inserted - that's if the new 8192eu.ko module is accepted !
  • I played with the connman configurations and ensured that the /etc/network/interfaces was minimal but I did leave the USB manual configuration and references to eth0 dhcp in there, might remove the latter. If I left the eth0 manual details it did indeed seem to stop wifi coming up. I had to put the network to DHCP in the Kiwi admin config too. The two preferred connections in connman seem to be eth0 and wlan0 on my setup so hopefully usb0 does not interfere.

    I got a BBBW off ebay and was comparing that with the default BBG, I see there are many ways to connect to wifi so I was trying to keep to the more recent methods with Debian on BeagleBone.
    As part of the fiddling I updated the BBG Debian to 8.11 and have not hit any issues (when the wifi is up it seems solid) it's just getting the wifi to reliably come up that has tripped me.
    This morning before work I plugged in a USB meter into the (swapped over - brand new) BBG USB, was getting 4.5-4.7V, that may explain why the dongle does not always start, need to do more investigation.
    As my usual wireless bridge setup neatly avoids all this hassle might wait till I see some advantage or have more time.

    I did try a number of other dongles, wlan5 seemed to be my most out-there listing.
    Will be interesting to hear how you get on with naming.
  • edited September 2019
    How was the kernel module for the 8192EU chip compiled?
    I just received a D-Link with the 8192eu chipset in it (2001:3319 "Wireless N Nano Adapter"), and I'm having a bit of trouble locating code that could be compiled for a kernel module for this one.
    Though, I am on the standard as-shipped Kiwi kernel. I might try a kernel update later once I have a good backup made of the current config.

    (I've plenty of Linux experience, but very little with Beaglebones)
  • Unfortunately I could not compile the rtl8192eu kernel module with the "stock" kernel because there are no linux headers for that kernel version on the kiwi and I have not been able to find any on the 'net.

    So this needs a kernel upgrade plus a download of the linux headers. There are many kernels available as shown with an apt-cache search linux-image....then for linux-headers.

    I tried to get a measure of consistency with HB9TMC who has noted in another thread how various kernels perform with the kiwi. Using the kernel he has adopted allowed a successful compile of the rtl8192eu kernel module, although there was minor patching of the source to achieve this. But, there was an error when the new module was deployed with modprobe.

    Hence I have gone back to the kernel version nearest to the stock 4.4.9, which is 4.4.30-ti-r64 and the linux-headers-4.4.30-ti-r64 are available.

    Using the 4.4.30 kernel and headers the 8192eu kernel module compiles successfully with no need to patch the source ! The new kernel module is accepted by the system and modinfo and dmesg indicate things are OK. I am in the process of tinkering with the kernel module configuration to include the rtl8192eu as an new alias so the module gets "attached" to the wireless interface. If I get the D-Link operational I will write the process up.

    The source I use is, but I did not follow the included dkms procedure as I guess we won't be changing the kernel very often. I installed build-essential and bc, left the driver source as is and added ARCH=arm, the kernel version and path to the kernel source on the "make" line - compilation takes about 40 minutes.
  • @jks Would it maybe make sense to replace the interface address testing by allowing password-free admin access from any local network address?
    The driver of a WiFi stick which I'm testing insists on a non-standard interface name. And then there's this:
  • Hi,

    just for the records, I have just connected my Kiwi to the Wifi, with a cheap D-Link DWA-121. I can see the improvements in the noise spikes (was already good, now it's better), so for me it was worth the effort. Thank you very much to all those who contributed instructions.

    In addition to the wlan config (mine showed up as wlan0) I had to install kernel 4.9.147-ti-r121 following the useful advice given here:

    and compile the module rtl8188eu following these instructions:

    Thanks to all!
  • Cool. I'll tinker a bit as I get time, but will be waiting to see your success :)

    Thanks for the response!
  • Thanks to all of you on this thread I have been able to change all of my wired LAN connections to Wifi and remove one major source of crud.

    I am using the $4.50 Zibo dongle from Amazon:
    I upgraded to the latest kernel and installed the driver packages and modified the file to make it come up as wan0.
    No compiling was required.

    Once you are rid of the LAN crud, if you are at a quiet site you may benefit from a preamp ahead of the Kiwi. I use a DXE Clifton modified to stop it from oscillating and can detect the noise from the black hole at the center of our Milky Way on 17M and above.
  • Unfortunately I am still locked out from the admin page because of the interface name.
    I tried to disable predictable interface names as suggested here by overriding the udev rule.
    But it doesn't seem to be enough:
    [ 29.456337] r8188eu 1-1:1.0 wlx503eaa2d8d27: renamed from wlan0
    I don't know what is causing this. The wifi driver?
    Another option would be to pass the argument "net.ifnames=0" to the kernel. But that doesn't seem to be intended to be possible (saveenv is missing).
    Did anybody found a way around this problem?
  • jksjks
    edited September 2019
    Update to v1.311, then login to the Beagle as root and do the following:
    nano admin.json [or other text editor of your choice]
    [go to end of file and replace "options":0 with "options":1]
    [save changes]
    [wait 1 minute]
    Now look for these messages in the log where "eth0" is hopefully replaced with your USB WiFi's identifier. The last two lines should have the local network address of the WiFi interface. Connecting to the admin page should now work.
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.181 ...     getifaddrs: IF lo fam=17 flags=0x10049 UP RUNNING
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.188 ...     getifaddrs: IF eth0 fam=17 flags=0x19043 UP RUNNING
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.191 ...     getifaddrs: IF usb0 fam=17 flags=0x1003 UP
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.193 ...     getifaddrs: IF lo fam=2 flags=0x10049 UP RUNNING
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.193 ...     getifaddrs: IF eth0 fam=2 flags=0x19043 UP RUNNING
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.193 ...     getifaddrs: CHECK eth0 fam=2
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.194 ...     DDNS: IF IPv4 0xc0a80167 /24 0xffffff00 eth0
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.194 ...     getifaddrs: IF usb0 fam=2 flags=0x1003 UP
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.194 ...     getifaddrs: IF lo fam=10 flags=0x10049 UP RUNNING
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.194 ...     getifaddrs: IF eth0 fam=10 flags=0x19043 UP RUNNING
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.194 ...     getifaddrs: CHECK eth0 fam=10
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.194 ...     DDNS: IF IPv6 LINK-LOCAL /64 eth0
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.194 ...     DDNS: private IPv4 <> 0xc0a80167 /24 0xffffff00 eth0
    Sep 12 00:55:28 www kiwid[1551]: 00:00:32.194 ...     DDNS: private IPv6 LINK-LOCAL  /64 ff:ff:ff:ff:ff:ff:ff:ff:00:00:00:00:00:00:00:00: eth0
Sign In or Register to comment.