AboCom Systems Inc [WN2001 Prolink Wireless-N Nano Adapter]

I needed another WiFi adapter for a computer at work. I had several old USB WiFi adapters laying around, and I thought I should try to make use of them, rather than buying something else. This lead me to try out an “AboCom Systems Inc [WN2001 Prolink Wireless-N Nano Adapter]” that I had on my desk.

When I plugged it in, the Ubuntu 18.04 computer recognized what it was and tried to load it, but gave some nasty dmesg errors in the process. It also couldn’t see any networks in the office. Here’s the output of lsusb:

alaskalinuxuser@alaskalinuxuser-OptiPlex-7010:~$ lsusb
------------------
Bus 001 Device 006: ID 07b8:8188 AboCom Systems Inc AboCom Systems Inc [WN2001 Prolink Wireless-N Nano Adapter]
..................

And here are the dmesg errors:

[1730947.161636] rtl8192cu: Failed to polling REG_APS_FSMCO[APFM_ONMAC] done! 
[1730947.161640] rtl8192cu: Failed to init power on! [1730947.161642] rtl8192cu: init mac failed!

After digging around for a while, someone suggested this online:

alaskalinuxuser@alaskalinuxuser-OptiPlex-7010:~$ echo options rtl8xxxu ht40_2g=1 dma_aggregation=1 | sudo tee /etc/modprobe.d/rtl8xxxu.conf

However, that didn’t help either. Finally, after searching around, I ended up finding that they got this information at pvaret’s Github, which also said to do this:

Make sure to blacklist the older rtl8192cu driver, which some distros seem to load by default otherwise.

So, I edited /etc/modprobe.d/blacklist.conf with nano and added these lines:

# Bad wifi driver
blacklist rtl8192cu

All that remained was to run:

root@alaskalinuxuser-OptiPlex-7010:/home/alaskalinuxuser# update-initramfs -u

And a quick reboot gave me a working USB WiFi! It was great of folks like pvaret to share their knowledge online so I could get this thing working!

Linux – keep it simple.

Mounting a Virtual Box “vmdk” image shouldn’t be this hard….

vmdk

And it wasn’t, well, once I learned how to do it properly. Unfortunately it took me an hour to get there! First I monkeyed around with vmware-tools, and vmware-mount, and then I tried kpartx, and all of it was a wash.

Then, after more searching online, I found a guy that made it plain and simple:

sudo modprobe nbd
sudo qemu-nbd -r -c /dev/nbd1 ./NewVirtualDisk1.vmdk

And that was it! Ubuntu automatically mounted it for me and it popped up on my desktop! It’s amazing when you spend hours following other tutorials, installing more and more things, only to find that there was a simple tool or way to do this that was there all along.

Hopefully it saves you the same headache!

Linux – keep it simple.

Bluetooth Breakdown: Sending gatttool commands from my Ubuntu Touch Phone!

Here I am, typing commands from my phone and controlling a Bluetooth Feather!

Of course, the moment of truth! The goal of this whole Bluetooth breakdown project was to figure out how to make my home made auto start work on my Ubuntu Touch phone. Well, here it is, working!

Although the interface could use a face lift.

Last we looked at this, we saw that we could write custom scripts to send the commands from the desktop computer to the BLE auto start, or use interactive mode of gatttool and do the work there. Now we can actually do the same from the terminal of the cell phone.

While this technically counts. We now need a snazzy program that just works with clicky buttons and that sort of thing. So, I suppose that will be the next phase of this project! Stay tuned for adventure!

Linux – keep it simple.

Using A NetGear AC600 (A6100) With Linux Successfully!

Due to a few changes at work, I was in need of an USB WiFi adapter for my desktop computer. Of course, I’m running Linux, and while that shouldn’t make things complicated, when it comes to hardware, sometimes it does.

There are tons of great WiFi adapters that work great out of the box with Linux. There are even numerous Open Source, and some Open Hardware versions too. However, in Alaska, you typically have to order out for something like that. Instead, I needed a WiFi adapter today, not in the mail.

A quick run to a local “buy your groceries and everything else” (Jack of all trades, master of none) store provided me with few options. However, a quick web search proved that the AC600 (model A6100) USB adapter was working for others on Linux, so I picked that up.

41WBoY-N-0L._SL160_

Unfortunately, my first web search led me to source code which I downloaded and compiled, but it did not work. Apparently there are more than one generation with the same model number, and those drivers didn’t help me. However, further search lead me here: https://wikidevi.com/wiki/Netgear_A6100, which lead me here: https://github.com/abperiasamy/rtl8812AU_8821AU_linux .

I don’t want to rehash the already great instructions provided, so you can read that page for the full details, but here is my history from my terminal:

2015 git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux
2016 cd rtl8812AU_8821AU_linux/
2017 make
2018 sudo make install
2019 sudo modprobe -r 8812au
2020 sudo modprobe -a rtl8812au
2021 sudo iwconfig
2022 history
2023 sudo nano /etc/modules
2024 sudo apt-get update
2025 sudo apt-get install dkms
2026 sudo cp -R . /usr/src/rtl8812AU_8821AU_linux-1.0
2027 sudo dkms add -m rtl8812AU_8821AU_linux -v 1.0
2028 sudo dkms build -m rtl8812AU_8821AU_linux -v 1.0
2029 sudo dkms install -m rtl8812AU_8821AU_linux -v 1.0

Long story short: If you follow the instructions, you will have this installed in under 15 minutes, and it does work! So, if you happen to have one of these, or need to use one on Linux, it is fairly simple and does function great!

Linux – keep it simple.

Fool’s Mate Friday: Ubports (Ubuntu Touch) Chess, with a hint of Cinnamon.

As I dive into the realm of making my Just Chess Engine playable, I was taking a look at some of the other chess interfaces out there, to see what kind of features I should implement.

Recently, I decided to test drive Ubuntu Touch on my Oneplus One, and it was during that trial run that I tried out the chess program that they have in their OpenStore.  The app was called Chess, written by Andima Landaluze. You can check out the source code here: https://github.com/Hankamotz/xake-chess.git

Sometimes, when you open a chess app, you are overwhelmed with 3000+ options. You end up scrolling through dozens of menus, and in the end, you just wanted to play a quick game of chess. Don’t get me wrong, sometimes you need those extra options for critical thinking and deep play, but if you are playing on your cell phone, you probably just sat down on the bus for 15 minutes and decided to play a short match.

That is one of the things I like about this app. The simplicity of it. While I don’t think my app will look overall like this one, I feel I can draw from this app a little note from the simplicity. The app features the Cinnamon chess engine.

I also took a moment to look at the Chess Clock program by Michele Castellazzi. It has all the standard features of a chess clock, and worked flawlessly when I tested it out. Again, the interface was focused on simplicity, which made for a very appealing and smooth interface.

If there was anything to take specifically from the clock application, it would have to be the pause feature. Setting up my own interface for play, it might be nice to be able to pause the game, but further thought brought me to the idea of pausing the game if you press the home button as well. Perhaps that might be a handy feature, as well.

Linux – keep it simple.

Setting up the Arduino-IDE for the Bluefruit Feather in Ubuntu

arduino1.8.5

There are a lot of neat tools available to program/hack/reprogram/work with this nifty little Bluefruit Feather board! One of them is the Arduino-IDE, a development environment that allows you create and then flash your new programs to the board. I was faithfully following along in the Bluefruit Feather Arduino setup instructions, which are here:

https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide/arduino-bsp-setup

But I ran into an issue right out of the gate with step #1: Install the Arduino-IDE. In the instructions it states that it must be version 1.6.12+, something that I missed the first go around. Using Ubuntu’s regular package manager, I just used apt-get install to download  and install the Arduino-IDE.

When I moved on to the next step, where you are to put in the “Additional Board Manager URL”, I ran into a snag. There was no place to do that. The block that should have been displayed there in the preferences didn’t exist. So I re-read the instructions. Turns out that the Ubuntu repository only has Arduino-IDE version 1.0.5! So it was a little out of date.

Fortunately, on the bsp setup page above, there was a direct link to download and install the newer version of the software. A quick download, unzip/untar, and a quick $ sh ./install.sh command allowed me to install the latest version in minutes. Hopefully you can avoid that same pitfall. Now, back to those instructions….

Linux – keep it simple.

Android Studio emulator stopped launching after upgrade in Ubuntu 16

I don’t usually re-post something that someone else figured out, but it took me a long time to figure this out, so I thought I would share here.

The problem I had was relating to Android Studio and the emulator. I was using the emulator to test out various programs that I was working on, but it stopped working after an update. I didn’t realize it right away, as I often use my actual cell phone, rather than the emulator. I find that I can tap faster with my finger than I can click with the mouse.

Either way, some time after I did an update, I decided to use the emulator. Unfortunately it didn’t work. Not only did it not work, there were no errors. I actually had no idea of why it stopped functioning. Thus started my search for an answer. I tried just about everything before finding the right answer.

The first thing I tried was deleting and remaking a device with the AVD. Still no luck. Other people were suggesting that I move my entire Android Studio folder into the SDK folder. That didn’t work either.

Still others were deleting the AVD folder and then creating new emulators. This still was not the solution. Finally, though, I found a solution that worked:

$ cd ~/Android/Sdk/emulator/lib64/libstdc++/
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ mv libstdc++.so.6.0.18 libstdc++.so.6.0.18.bak
$ ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6
$ ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6.0.22

Lest that you think I came up with this on my own, I didn’t. I found it here on Stack Overflow, by user Martin Revert. How he came to this conclusion is beyond me, but I’m glad that he shared it, because it was just what I needed!

Hopefully, that will save someone from trying everything under the sun to fix this problem.

Linux – keep it simple.

Take out the papers and the trash….

Every now and then I do something that I shouldn’t. Okay, probably more often than that. Either way, I really shouldn’t open up a file explorer as root, and I REALLY shouldn’t “delete” stuff while in an open file explorer as root. The reason that you shouldn’t do that is because file explorers don’t actually “delete” things. They put them in the trash. This gets doubly complicated when you use sudo to open your file explorer, because then the root “trash” ends up in your home trash.

That’s really annoying because when you right click the trash can and choose “empty”, you get an ugly pop up window explaining why you don’t have permission to empty your own garbage.

What’s worse, if you sudo open your file explorer again, you can’t get to the trash, because it is not a “real place”. Opening trash:/// in your file explorer just brings up more ugly pop up windows.

Fortunately, the answer is easy.

$ cd ~/.local/share/Trash/

Now you are in your trash can. If you look into your ./files/ folder, you will see the culprits. So, the simple thing to do is:

$ sudo chown -Rv <yourusername>:<yourusername> ./files/

or sudo chown -Rv alaskalinuxuser:alaskalinuxuser ./files/ in my case.

Now all the files in your trash can have been modified to be yours. Yes, now it is your mess to clean up, and to take out the trash you can once again right click on the trash can and say “empty”.

Linux – keep it simple.

Installing the latest PicoLisp on Ubuntu

While testing out The Quiet Learner‘s game, Dr. Theobold, a text based adventure game written in picolisp, I ran into several issues. As discussed previously, I added these issues to the bug tracker on Savannah. Come to find out, the distributed packages for Ubuntu are using version 15.xxx of picolisp, and The Quiet Learner wrote his program for version 16+. We needed to find out if the old version was the culprit, or if there truly were issues in the game.

So, I updated to version 17.7.6 (a rather interesting numbering, since I tried this the 4th of July week, but that is something else entirely).

As simple as the above statement was, my trek was not quite as simple. I am used to compiling programs. Typically, you start by unzipping the source, using ./configure, then make, and sudo make install. However, this was different.

Of course, I downloaded the source from the link in the PicoLisp Wiki. After that, I unzipped it with the standard

$ tar -xzvf ./picoLisp.tgz

and moved into the new director with

$ cd picoLisp

Once there my usual bag of tricks didn’t work, which is why it is always good to read the instructions. Ends up that I needed to cd into the src64 directory and run make. No ./configure first.

$ cd src64

$ make

And there was no option to make install. Instead I had to manually symbolically link the files, and that is where everything went wrong. You see, the INSTALL file had pre-typed instructions with all 3 links you could use, like so:

# ln -s /<installdir> /usr/lib/picolisp
# ln -s /usr/lib/picolisp/bin/picolisp /usr/bin
# ln -s /usr/lib/picolisp/bin/pil /usr/bin

But after doing that, it didn’t work. It didn’t work because I forgot that the directory was picoLisp, not picolisp. I chased my tail for a while, re-creating the same bad links over and over again until I realized my mistake. Since /<installdir> was not the directory (obviously) I was hand typing picolisp, and it wasn’t working. So, be smart and not like me. Do as I now say, not as I erroneously did!

After straightening it out, it worked great! Actually it cleared up 3 of the issues that I put on the tracker for the Dr. Theobold game. I guess it pays to have the latest and the greatest when it comes to PicoLisp!

Linux – keep it simple.

Setting up libGDX for Android Studio on Ubuntu

Every one else is probably brighter than me. However, after reading the instructions over and over again, and then attempting to follow them, it just wasn’t working. All I wanted to do was start a libGDX project in Android Studio. I finally figured out where I went wrong, so here is the step by step for any one else that gets stuck like I did. Please read all the instructions first, because step 5 becomes step 1, but doesn’t make sense unless you read them in this order:

  1. Go to https://libgdx.badlogicgames.com/download.html and click “Download Setup App”.
  2. A jar is downloaded. Don’t try to import it, or something of that nature. Clicking on it is no good either. Simply open a terminal window and cd to the Downloads directory. Once you are there, type: $ java -jar ./gdx-setup.jar
  3. A window will pop up. Fill in the usual blanks to name your app.
  4. For the Android SDK field, open Android Studio, and click File –> Project Structure. That first field is the Android SDK.
  5. For the folder to put the newly created app in, be sure that you choose a folder that is empty, because it will wipe out everything in that folder. So I recommend you make a folder for it first!
  6. Uncheck the things you don’t need, like IOS, HTML, etc, and click generate.
  7. Once it is done, go back to Android Studio, and click File –> open.
  8. Choose the folder you put it in, and Android Studio will recognize the gradle files in it, and open your new app!

Hopefully that makes sense and keeps you from wasting as much time as I did. Most of you are probabl smart enough to know this already!

Linux – keep it simple.