Compiling blink1-mini-tool for Router Use

Discussion in 'Tomato Firmware' started by MatthewW, Feb 22, 2013.

  1. MatthewW

    MatthewW Serious Server Member

    I'm trying to use a blink(1) on ASUS RT-N16 hardware. blink(1) is a RGB USB dongle for displaying status lights:

    Here's their tool intended for lightweight systems, including "Linux-based routers":

    I'm currently running Shibby's build, tomato-K26USB-1.28.RT-MIPSR2-106-AIO.trx. I compiled the tool with the OpenWRT SDK (its Makefile is set up for that target). Here's what happens when I try to run it on the router:

    Any suggestions or advice? Should I be compiling this differently? I tried to compile inside of the Tomato source tree (src/router), but couldn't get that working. I'm a bit out of my depth, though.

    Appreciate any help!
  2. koitsu

    koitsu Network Guru Member

    The fact this utility (blink-1-mini-tool) has no verbose mode and doesn't actually tell you what it's trying to do and when does not help the situation.

    You may want to look into using Entware to build the blink-1-mini-tool software (but keep reading before trying this). You will need to read the instructions and learn how to build software on that. Then you can install Entware on your router and test out the package reliably. Entware also offers debugging packages (such as gdb), although to my knowledge none of the libraries are built with debugging symbols (which greatly limits the usefulness of a gdb session).

    If the software relies heavily on Linux kernel headers (or USB headers associated with the kernel) you may need to build the software as part of the native TomatoUSB firmware of your choice; the OpenWRT build environment and kernel are very different than that of TomatoUSB.

    There are people here on this forum who build Entware packages who can assist you, and I'm sure ryzhov_al can help if need be too.

    P.S. -- You know there are ways to toggle status LEDs on the router itself (not a USB device), no? Sure, they aren't RGB, but if you needed some kind of "indicator LED" you might be able to just use what's already on the router itself. Search the forum here for "LED toggle" or something along those lines.
  3. MatthewW

    MatthewW Serious Server Member

    Rad, thanks for the links! And yeah, it references usb.h for HID-related stuff, so my guess is I'll have to compile it alongside TomatoUSB itself.

    I thought about doing it with the router LEDs, but I like the attention-grabbing brightness of the blink(1). The setup is for WiFi SD cards in my garage photo studio. Their tiny radios are pretty crappy, so I need some way to easily tell if they're actually on the network or if they need a power cycle. Here's a quick video of the blink(1) in action right now (just did it super fast on a Raspberry Pi tonight):

    And a longer video of the general setup, if you're curious:

    Seems like the blink(1) command line tool would be SUPER useful for Tomato routers in general. Would love to see it hit one of the mainline builds!
  4. MatthewW

    MatthewW Serious Server Member

  5. koitsu

    koitsu Network Guru Member

    Look at the URL you posted in your first response to me:

    Now look closely at the most recent commit (roughly 12 hours ago):

    Commit reason: blink1-mini-tool: works on tomatousb on Asus RT-N16. cleaned up and fixed regression

    I think what they meant here was "fix blink1-mini-tool to work on TomatoUSB on the Asus RT-N16". Their use of the word "works" implies it worked before thus the commit had no purpose.

    I reviewed the actual commit/code and all it "truly" fixes is the segmentation fault situation given improper usage syntax. The other error/situation you see is separate/different -- I would therefore suggest you ask the authors/maintainers of this software to provide you with a working binary for TomatoUSB builds, or, tell you how to build the software yourself (possibly without Entware), and also tell you how to determine the proper syntax of the arguments to issue.

    github has an entire ticketing/support section. It's obvious they care about providing support for this thing, so, best make it their problem. :)
  6. MatthewW

    MatthewW Serious Server Member

    (Post #3 was waiting moderator approval before you replied, and this one might take awhile too).

    But the recent commit fixed some kind of regression. The precompiled binary link works for me (ASUS RT-N16). I haven't tested compiling it myself, but I believe Tod from ThingM compiled that version via the OpenWRT SDK.
  7. Toxic

    Toxic Administrator Staff Member

    I dont know if your complaining about the fact YOU have to wait for your post to be moderated.

    But please let me explain....

    But I owe you nothing. I do not sit 24/7 at my pc waiting on new users to the site to post so I can approve them the minute they have posted.

    This forum has a strick security policy to stop spam from new registrations.

    My site has approx 200-300 attempted registrations a day from spam bots.

    If you have to complain then go find the owners of all the spambots.
    They are the ones you need to take your grievances too.

    Sent from my GT-I9100 using Tapatalk 2
  8. MatthewW

    MatthewW Serious Server Member

    I didn't mean to complain! I admin a ~20k user forum elsewhere, so I understand the pain of spambots :(

    I specifically mentioned the moderator wait as an explanation for anyone who finds this thread later (since koitsu's info is going to show up after my reply, which will be confusing). I was just trying to be helpful for anyone searching for blink(1) threads in the future. Apologies if it came off as snark! I've lurked here for awhile and definitely appreciate this place as a resource.
  9. Engineer

    Engineer Network Guru Member

    Didn't look like a complaint to me....more of an "informative line" than a complaint.

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice