2 Wire 2701-B firmware upgrade. A sort of success ramble.

Pulled out an old 2 Wire 2701-B gateway modem to use as a replacement for a dead Linksys switch.

The modem original firmware version was 5.29.109.5

Problems:
  • Devices could not connect to the 2 Wire WIFI in WPA or WPA2 mode. Didn't bother with WEP
  • LAN performance was abysmal. Network connections would drop. 
  • Local RDP experience was at dialup level.  

A horrible solution for a replacement switch..

Remember giving AT&T customer service a hard time about this device back in the day. I now remember why.

This is abandoned hardware. No support available. Locating firmware proved challenging. No DD WRT or Tomato support.

(Direct links to Google docs listed firmware downloads were ignored. Links that were a part of a discussion thread were explored).

Stumbled on an old site which led to a maybe compatible solution. A firmware for a much later model from a different provider.

2700-2701--QT04-6.1.5.48.2sp

Firmware incompatibility can and will permanently damage a device. Consider this before attempting.

The plunge:

The firmware successfully loaded then rebooted into a spiffy new interface.

...status section of the interface
...status section of the interface


The Bad:

Downgrading is no longer an option with this firmware.

DHCP Settings ip values not cleared when DHCP is disabled. Interferes with adjusting the LAN or WAN settings.

Trick: assign DHCP IP range to something other than the desired LAN / WAN ip.  Save with DHCP enabled. Then save with DHCP disabled.

WPA2 connection work but only with DHCP enabled. A less than desirable option.

Noise. Device attempts to connect DSL resulting in an annoying click on each failed attempt. Eventually times out.

Lights. Good lord the blinking lights. Fixed that up with some black tape.

The Good:

Ethernet performance improved dramatically. This was unexpected. Making it a more than adequate replacement.

Interface appears faster than the original. Not particularly useful, just interesting.

Port scan reveals 80, 443, 2869 (icslap) open.



Anyway:

Got lucky here, thought I'd share. Some poor soul with a similar device may find this blurb useful.





MYSQL REGEXP / NOT REGEXP multiple JSON fields


Futzing around with personal projects. Trying to stay relevant. This particular project makes use of JSON support on mysql.

I know right? I did it anyways.

The following clause was used as filter:

Select
.… 
AND
(
LOWER( json_unquote(cd.data->'$.title') ) REGEXP ? OR
LOWER( json_unquote(cd.data->'$.title.$t') ) REGEXP ? OR
...
)
AND
(
LOWER( json_unquote(cd.data->'$.title') ) NOT REGEXP ? OR
LOWER( json_unquote(cd.data->'$.title.$t') ) NOT REGEXP ? OR 
...
)

But that was not not performing as expected. After some trial and error. The following solution seems to work best. concat_ws the fields into a string.

Select
....
AND
CONCAT_WS(' ',
    LOWER( cd.data->'$.text' ),
    LOWER( cd.data->'$.text.$t' )
) REGEXP ?
AND
CONCAT_WS(' ',
    LOWER( cd.data->'$.text' ),
    LOWER( cd.data->'$.text.$t' )
) NOT REGEXP ?

Can’t speak for efficiency but is working as expected so far.
Hope you find useful.

Syslog spam: xdg-document-portal - unique: , opcode: STATFS

Noticed a lot of the following popping up in the syslog.

xdg-document-portal[19996]: unique: 457, opcode: STATFS (17),....
xdg-document-portal[19996]:    unique: 457, success, outsize: ....

Really tried to ignore it. Much fail.

Did some reading. Found this.

Naturally the suggested fix did not work ( or I just did it wrong ).

Learned that this is a flatpak thing. Probably leftover from the previous Gnome installation.

Ran the following

flatpak list

Apparantly not using any flatpak applications.

sudo apt remove flatpak

reboot, check syslog.

On to next adventure. 👊


Mysql Reminder - A Delete Duplicates that works fast.

Note to self. Deleting dupes

This takes forever:

SET SQL_SAFE_UPDATES=0;
DELETE a 
FROM 
 tbl1.tbl_data as a, 
    tbl1.tbl_data as b
where 
 json_unquote(a.data->'$.text') = json_unquote(b.data->'$.text')  
AND 
 a.updated < b.updated;    
SET SQL_SAFE_UPDATES=1;



This Gem Works well.

SET SQL_SAFE_UPDATES=0;
 DELETE tbl_data from tbl_data
  inner join (
     select max(updated) as lastupdated, data->'$.text' as text
       from tbl_data
      group by text
     having count(*) > 1) duplic on duplic.text = data->'$.text'
  where updated < duplic.lastupdated;
SET SQL_SAFE_UPDATES=1;

Convert an original IPad into a Kodi media device. Poorly written ramble.

A friend brought one of them original Apple IPads over. His issue is a common one.

Wikipedia 1st gen iPad & iPad Mini 03 2013 6246"What the fuck do I do with this thing?"




This IPad looked brand new, barely used. Locked at IOS version 5.1.1. Here's is what I learned:

  • Very few useful IOS apps left to download for this device. 
  • The App Store experience is terrible. 

Apple no longer provides updates. Owners are left to form their own support communities and tools.

Out of morbid curiosity. I did some reading.



Pwnership.

Apple goes to great lengths to protect Apple products from it's owners. One reason this guy would never invest in Apple products (again) , recommend Apple products to anyone, allow anyone to recommend Apple products to this guy.
- this guy 😉
First thing that needs to be done is take ownership. This thing is old, pretty sure the warranty is null and fuck Apple restrictions anyway!

Found success with the following applications.

RedSn0w
ITunes 64bit version 12.0.1

ITunes version is important as later releases will cripple RedSn0w's abilities.

If the latest iTunes version is already installed. It may need to be uninstalled along with it's related components. There are instructions to help with this process.

Assuming the appropriate iTunes version is installed along with IPad detection and setup. RedSn0w can then be executed..

The RedSn0w alternate option "jailbreak -> backup and restore" was selected. The primary DFU option was not tested. Also didn't feel like holding down buttons.

If successful a "jailbroken" IPad should reload sporting a brand new application icon called Cydia on a new screen.

If not. Confirm correct RedSn0w to ITunes compatbility

Additional Tools


Run the Cydia application, follow the instructions. An update will be in order. Recommend doing the complete update.

Cydia offers a lot of options that can improve the Ipad experience. Here we will focus on:


  • OpenSSh. Tool will allow the user a Debian like access to the IPad file system over the network.
  • Mobile Terminal (optional). This tool will allow the user direct access to the files system via a native terminal window.
The built in Cydia search tool helps a lot.


Kodi mediacenter.



The Kodi in Cydia repository that is available to the IPad is old and stuck at IOS 5.1.1 version compatibility. Useful but lacks modern features.

Kodi in the appstore is new but locked at a later IOS version. No download for you.

One solution is to directly download the latest Kodi DEB package for IOS devices and install via command line.

Now, downloading with Safari failed miserably.😡

  1. Safari cannot download without added extensions (These extension can be found in Cydia).
  2. Safari cannot properly render the webpage for viewing.

Solution is to download that file to a PC, then copy that file to the iPad file-system via SSH or SCP.

After which the following command can then be used to install Kodi.
dpkg -i kodi-packagename.deb

...replacing kodi-packagename.deb with the correct filename.

After a moment.  A Kodi icon should be available on the IPad screen.

Hurrah.😂

Kodi setup

One important detail is the lack of Hardware Acceleration for the IPad . Kodi defaults to requiring Hardware Acceleration, as a result video playback will fail. To resolve this problem, Hardware Acceleration will need to be disabled in Kodi settings.

Fun/Profit

Installing Kodi converted this IPad device into a much better media device. Additional Kodi Programs, Music and Video Apps can be installed to further expand Kodi's capabilities. 

Cydia also offers access to an assortment of games, emulators, themes and utilities that further extends IPads abilities. 

All worth exploring.

My friend is happy with his new toy. An abandoned device finds new purpose. I learned something. Call this a win.😎





goBloggerCrawler Blogger Web Crawler in Go

Go-based web crawler used to efficiently extract structured data (titles, video URLs, and tags) from Google Blogger sites using concurrent p...