Updates from guylewin Toggle Comment Threads | Keyboard Shortcuts

  • guylewin 2:20 pm on January 19, 2019 Permalink | Reply
    Tags: dns, facebook, hotspot, iodine, messenger, reddit, wifi   

    Iodine and Paid-Access Hotspot Situations 

    I travel a lot and find myself in many situations where I’m connected to a hotspot but have to pay to get access to the Internet.

    If you haven’t heard about iodine yet, it’s a solution that lets you tunnel IP packets over valid DNS requests. This is a solution just for these problems, as most paid-access hotspots allow valid DNS-requests and responses to go through.

    There are many guides on setting up an iodine setup, including this one for example. The problem is – the established connection is usually too slow to actually do something with it, from my experience.

    iodine lets you SSH into the installed iodine server (over DNS requests/responses). Usually people setup an SSH tunnel and use their personal computer regularly.

    If that is too slow for you (like it is for me) – I recommend installing a bunch of utilities on the server itself so the server does all massive Internet traffic, and you just get the output through the SSH shell.

    My setup is a cheap $10-a-month DigitalOcean server with the following programs installed:

    Since I installed these I don’t need to create the SSH tunnel anymore, I just run them from the SSH shell and enjoy a relatively fast way of communicating for free.

  • guylewin 1:54 pm on January 19, 2019 Permalink | Reply
    Tags: bank, credit card, finance, notifications, telegram   


    When it comes to monitoring your expenses, different people have different methods. Some read the monthly-sent billing summary from each credit card provider / bank, some login to these services repeatedly to check if there’s something new. I prefer getting the expenses as phone notifications while I can still remember what the expense was for, not a month after.

    When I was an Android owner I used to pay a (very cheap) subscription fee for an app called חיוב בטוח. This app was perfect for me – it scraped the credit card providers for new transactions and let me choose whether I approve / deny this transaction, so I can review those I denied when I have time. Using this method I found multiple subscriptions that I thought I cancelled and billings that were for the wrong amount.

    But although I love this app, I can’t ignore my 3 problems with it:

    • It only supports Android (I moved to iPhone and I don’t have this solution anymore)
    • I don’t trust closed-source solutions I enter my credit card credentials into (how do I know it’s not being uploaded?)
    • It doesn’t support bank accounts, only credit cards

    Mainly because of the iPhone transition, I was left without a working solution. So I decided to develop one.

    My solution is a small Telegram bot script that can run on your computer, scrapes the credit card and bank accounts (using the open-source Israeli Bank Scrapers project) and sends you notifications about new transactions using Telegram. It also supports “denying transactions” (marking them as denied so you can look into them later on). Most importantly – it’s open-source! So you don’t have to trust me your credentials aren’t being uploaded anywhere, you’re the one running the script on your computer and you can read the 1 file of source code yourself.

    If you’re like me and need this solution – have a look at the project’s GitHub page: https://github.com/GuyLewin/israel-finance-telegram-bot

  • guylewin 8:09 pm on February 17, 2018 Permalink | Reply  

    TorrentLeechSeeder and DLink DSL-6740U File Upload 

    I recently worked on 2 useful mini-projects that I wanted to share, in case it’s useful to anyone.


    My home internet connection is slow. Especially the upload. It was hurting my upload/download ratio in the popular BitTorrent tracker BitTorrent tracker TorrentLeech.

    I started choosing torrents to download by the amount of seeders / leechers they have, but doing this manually took too much time.

    So I wrote a script that scrapes TorrentLeech searching for the most “efficient” torrents to download and then seed, using “aria2c” for downloading/seeding.

    You can read more and clone the code at GitHub:


    DLink DSL-6740U File Upload

    As I previously mentioned – my home internet connection is *very* slow.

    I wanted to upload tcpdump to see what’s taking all my bandwidth, but there was no nc, wget or anything useful – only httpd.

    So I wrote a small guide with snippets of how to upload any files (including the right statically-compiled tcpdump binary).

    You can find it here on GitHub:


  • guylewin 10:07 am on May 8, 2015 Permalink | Reply
    Tags: api, as3992, python, rfid   

    A while ago I wrote down a small Python script to control AS3992 RFID reader via UART to USB.
    The source is available @

  • guylewin 7:55 pm on May 2, 2015 Permalink | Reply
    Tags: kernel, linux, radxa rock pro, rock pro, rtl8187l   

    Compiling Kernel for Radxa Rock Pro (+ rtl8187l support) 

    In the past few weeks I’ve been struggling to compile a kernel module for the Radxa Rock Pro, and ended up compiling the upstream kernel manually while configuring it to support my module.

    Since it took much longer than I expected (mainly because of unexpected problems I wish I had known before I took this project), I decided to make a post describing my adventures with this wonderful device (and yes, I had to open a new blog to do that :)).

    In this blog post I will try to describe the steps I had to make, including download links, of configuring, compiling and loading the upstream Linux kernel for the Radxa Rock Pro device.

    When you’re done following this post, you should end up with a Rock Pro with the 3.18.11 Linux kernel, that loads it’s rootfs from the MicroSD card. Note that as far as I know, Rock Pro’s HDMI output is not supported on these new kernels (it didn’t work for me as well), so be sure you want don’t need your HDMI output before following this post.

    Disclaimer: Most of the information in this post is taken from online posts, mainly from the Radxa wiki and CNX-Software blog. This post is just my attempt of simplifying all of the online information, and documenting / solving some issues I had when I tried to follow the online instructions.



    My target was to make the Radxa Rock Pro support ALFA AWUS036H’s monitor mode, and later on – airodump-ng and other similar tools. Sound simple!

    Since I had never heard of this network device until I started this project, I looked it up online and saw it is based on the famous Realtek RTL8187L chipset. Searching online also brought up that I should make the rtl8187l driver run on my Rock Pro device, and I’ll be done with this project.

    However, in order to compile a kernel module, I must have the running kernel + it’s configuration, and make sure it supports the Linux features required for the module to work (in this case – WIRELESS_EXT, MAC80211, …). After a few days of trying to compile the module with the pre-installed Radxa kernel from their site (3.0.36+ – https://github.com/radxa/linux-rockchip), I realised that I must use the upstream kernel, that already contains official rtl8187l module support, with my own configuration.


    • Radxa Rock Pro
    • MicroSD Card (8GB+)

    As the Radxa wiki says, you must own a Ubuntu 14.10 (or newer) Linux for the compilation process, along with GCC 4.9 or newer. When I tried to compile without these, I get an error from the precompiler stating that my compiler (GCC 4.8) has known issues when compiling the kernel, and that I should upgrade.

    Of course, since we are compiling for the Radxa Rock Pro, you also need an environment including a cross compiler. You also need parted when creating the SD card image, and build-essential + libusb for rkflashtool. Run this installation line to install all dependencies before we start:

    Kernel Source

    The Radxa wiki states you should clone the linux-next git repository and compile it for the Rock Pro. When I tried to do so and follow their steps – the compilation failed since the configuration was too old.

    Therefore, I recommend using the Linux 3.18.11 kernel, it worked out-of-the-box and didn’t require any code changes. You can get it by running:

    After extracting the kernel, you should download the default Rock Pro configuration along with the .dts file, that will be used when booting (again, taken from Wiki):

    Build Environment Configuration

    Before we start to mess with kernel compilations, we should make sure to always use the cross-compiler environment suitable for our device.
    Run the following in each terminal you use in the compilation process to set the build environment:

    Configuring Kernel

    Copy the default Rock Pro configuration to the current configuration location:

    And configure the kernel as you’d like by running:

    (the menuconfig will use the .config we copied as the base for your changes). Since I’m describing my efforts to add support for the rtl8187l kernel module, the things I had to enable in the Kernel configuration are the following (the order is important!):

    (You should navigate the menuconfig with the arrow keys and the space bar for selection. When selecting a feature, you can either mark it as built in <*>, kernel module <M> or unselected feature that will not be present in the kernel < >)

    • Networking support -> Wireless -> Generic IEEE 802.11 Networking Stack (mac802111) (NEW) – set this to have <*> on the side (built-in kernel support)
    • Device Drivers -> Network device support -> Wireless LAN -> Realtek 8187 and 8187B USB support – set this to have <M> on the side (kernel module)

    Exit the menuconfig and choose < Yes > when asked whether to save the new configuration.

    The message “configuration written to .config” should appear after saving. Now it’s time to compile our new configuration.

    Compiling the Kernel + Modules

    Run the following commands:

    This will create 2 necessary files, zImage (the compressed kernel) and rk3188-radxarock.dtb (device tree blob, used at the Rock Pro boot).

    Now let’s compile the modules for later use:

    Now the “modules” directory is full with compiled kernel modules. We will use it later to build our SD card image.

    Creating boot.img

    Run the following commands to install Radxa mkbootimg:

    According to the wiki, we need to append the device tree blob to zImage (CONFIG_ARM_APPENDED_DTB option) until we can use U-Boot device tree support:

    And after we have everything ready, make the boot.img out of the zImage-dtb:

    My working & ready boot.img is available for download here.

    Preparing SD Card Image

    When we’ll flash the kernel onto the Rock Pro, it will load and try to load the linux rootfs from the MicroSD card (you’ll see, when it’s part of the configuration that will be flashed in the next few steps).

    Therefore we should make an SD card image ready with all of the compatible binaries and the modules we have compiled earlier, including the rtl8187l module.

    To do that, we should start with an already ready SD card image, mount it’s ext4 partition locally on our Ubuntu and insert the kernel modules we built before.

    I used this SD card image and did the following:

    After having the SD Card .img file, we need to find out where it’s ext4 partition starts in order to load it to our Ubuntu. We will do it using “parted” we installed in the pre-requirements:

    You should see a table containing the start offset of the ext4 partition, which looks kind of like this:

    Use the start number we found before to mount the ext4 partition:

    If everything went well, ubuntu_sdcard now points to the ext4 partition in the SD card image file. We should now copy the modules and firmware into the ext4 partition:

    Also, CNX-Software suggested (and I agree) to configure DHCP to the Ethernet port on boot:

    And add the following 2 lines:

    Also, CNX-Software claims you need a script to detect rootfs at boot time. I used it, don’t know if it matters:

    And copy the following into the file:

    Make sure the script is executable and edit the startup script:

    And add the line below before exit 0:

    That’s it. Let’s unmount the ext4 partition:

    And radxa_rock_pro_ubuntu_14.04_server_k318rc5_141129_sdcard.img should now contain your new files! You can download my compiled version here.

    Flashing SD Card Image

    To flash the newly created image, you should use Win32DiskImager if you’re on Windows (simply follow the GUI).

    If you’re on Linux / OS X, you can use the dd command using this syntax (replace /dev/sdc with your SD card writer device):

    Now take out your MicroSD card and put it in the Rock Pro. It will be necessary for boot after we flash the device.

    Flashing the Kernel

    Connect the device to your computer via USB, and follow these instructions to bring the Rock Pro to loader mode.

    Get the parameter file describing kernel parameters by:

    Install rkflashtool to flash the Rock Pro:

    And use it to flash boot.img and restart the device:

    Your device should now reboot into it’s new kernel, with rtl8187 support.

    And that’s it! If you have any questions, fixes, etc, feel free to contact me / comment.

    • Evgeny 4:16 pm on May 9, 2015 Permalink | Reply

      I recorded image on the SD sard. But nothing happened. LED blinks green. But nothing is loading … Tell me what the problem is.

      • guylewin 5:26 pm on May 9, 2015 Permalink | Reply

        As I stated in the beginning of the post, there is no HDMI output when you install the newly-compiled kernel.
        Therefore you should connect it to Ethernet, check what IP it received from DHCP, and connect via SSH.

        • Evgeny 1:16 am on May 13, 2015 Permalink | Reply

          Say what commands to use? What name and password?

        • shrikant lahase 1:19 pm on October 3, 2016 Permalink | Reply

          i have raadxa lite board.
          Can you please send me complete procedure as you given for radxa pro board above…..?


    • Evgeny 11:01 am on May 10, 2015 Permalink | Reply

      Say what commands to use? What name and password?

    • Evgeny 1:52 am on June 5, 2015 Permalink | Reply

      I use your image. But I can not connect. What is the username and password?

    • George 1:23 pm on August 5, 2015 Permalink | Reply


      root/root ?

compose new post
next post/next comment
previous post/previous comment
show/hide comments
go to top
go to login
show/hide help
shift + esc