About Brad

All-around tough guy.

DeltaWifi.com and Gogo update

It’s been a few years since I first wrote about passing an hour of free TMO Gogo inflight to a Mac. We are on our way from Panama City to LAX (7 hour flight) and boarded an old Boeing 757-200ER that still rocks the old Gogo internet – woohoo! If you’re on a Delta jet with the new Ku wireless system, the instructions below likely do not work for you.

1. Open/switch to Safari and verify the “Develop” menu is present, between Bookmarks and Window menu options, in the menu bar at the top of your screen. If not, enable it with these instructions – and for those who cached my page before going taking flight, go to the menu bar and choose Safari->Preferences, click the Advanced tab, and check the box for “Show Develop menu in menu bar” – these instructions still work in macOS Monterey.
2. From Safari’s Debug menu open a new browser window/tab, preferably in incognito mode (command shift N), and choose Develop->User Agent->”Safari – iOS 14.0 – iPhone” (iOS version number doesn’t matter).
3. Go to the airport menu in the menubar on your Mac and join “DeltaWiFi.com”.
4. A new Safari window will probably pop up on it’s own, quickly go to Develop->User Agent and make sure there’s a check mark next to “Safari – iOS 14.0 – iPhone” or similar and, if not checked, select it to re-select it.
5. On the DeltaWiFi.com page that loads, you should be able to scroll down to see the pink TMO option. If the graphics and text are too large, command and “-” to make it fit in your window better. If you don’t see the TMO pink banner, try opening a new window/tab in incognito mode and make sure you completed step 3:

6. Enter a TMO phone number. Each time you request a free hour it must be the first time you tried with a specific TMO phone number for that flight.

7. You should now be online if you have a green bar near the top like the screenshot, below.

Bonus: the MacBook Pro/Gogo wifi internet connection can be shared to a tethered iOS device. For whatever reason, Bluetooth PAN is broken on my Mac running Monterey, but connecting an iPad to a Mac with a USB cable and setting the mac’s System Preferences…->Sharing window gives the iPad internet access:

Sharing_iPad_USB

Double Bonus: spoof-mac, as described here (or you could also try macchanger), allows more than an hour on the same Mac (if you have multiple active/valid TMO lines). While installing spoof-mac, my Mac was stuck on “brew update –preinstall” for a few minutes and spent another 20 minutes(!) downloading files, so make sure you install spoof-mac well before your first free hour is about to end – and if you don’t get spoof-mac installed in time, there’s one more item you can try near the end of this post.

My mac’s MAC address went from c4:b3:01:bb:0f:09 to 00:05:69:4D:C6:48; however, when I tried this, instead of seeing the green bar as in step 7, a red bar popped up saying that only one device is allowed per number per day. This was odd and we figured browser cookies were also behind this nonsense, so we brought up a new tab in incognito mode and this allowed another hour on the same Mac.

Here are the Terminal.app commands we used to install spoof-mac with brew (takes over 20 minutes on Gogo) and then spoof your mac’s AirPort MAC to get another free hour.

1. Open Terminal.app on your Mac and enter the following commands one at a time:
brew install spoof-mac
2. Go into System Preferences…->Network->AirPort->Advanced… and select the Hardware tab. At the “Configure” contextual menu, change from Automatically to Manually. Click OK, then Apply, and close out of the Network preference pane.
3. Return to Terminal.app on your Mac and enter the following commands one at a time:
spoof-mac list
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
sudo spoof-mac randomize en0
spoof-mac list

3. The last command in the above step is optional if you want to see what your new MAC address is.
4. Return to step 2 near the top of this blog post to request another hour of Gogo through TMO.

Alternatively, if you were unable to install spoof-mac it may be possible to spoof your AirPort card’s MAC address at en0 by executing the following Terminal.app command:

sudo ifconfig en0 lladdr 00:bb:cc:dd:ee:ff

(change “00:bb:cc:dd:ee:ff” to whatever you want your MAC address to be)

Open Core Legacy Patch and macbook6,1

I decided to bring an old MacBook back to life by installing an extra 1TB SSD and macOS Monterey. Aside from needing to erase and format the SSD with another Mac (the MacBook couldn’t seem to do it from the Monterey installer). Anyway, the process was easy enough with Open Core Legacy Patcher. I may end up helping others do this and figured I’d leave myself and others a cheatsheet:

Everything went fine and I’d definitely try this on another machine if the opportunity arises. Our macbook6,1 only has 8 GB of RAM and so far things seem to be running fine.

Adata XPG SX8200 Pro, Samsung 970 Evo Plus, and Sintech

In early September 2021, I popped a brand new 2TB Adata XPG SX8200 Pro into a Sintech adapter and the pair into my mid 2015 15-inch MacBook Pro (MacBookPro11,4). The tandem worked beautifully until February 25 when the Adata drive’s GUID partition became so corrupted that the drive wasn’t viewable to macOS or readable at all. Fortunately my Time Capsule had a backup less than 8 hours old.

In an interesting twist, I used the power-cycle method on the Adata SSD and was able to get it working again. My data couldn’t be recovered from the Adata SSD, but I was able to erase and re-format it as an APFS drive again. Even though Adata provided an RMA under warranty if I want to send it in, I flashed my data back to it and am using the Adata drive as-is in the Sintech adapter again. I will follow up with Adata to see if they still want to see this drive as something caused it to fail; it may be the drive is failing, the Sintech adapter is dying, or maybe even the MacBook Pro sent some unkind juice?

While the Adata SSD was briefly out of action, I popped a Samsung 970 Evo Plus 2TB into the Sintech adapter. The Samsung SSD seemed to work for about 12 hours, but the next morning the MacBook Pro was booting to the desktop and then automatically restarting on its own. The Samsung SSD was manufactured September 2021 and I tried to patch it with Samsung’s latest firmware “Samsung_SSD_970_EVO_Plus_4B2QEXM7.iso”, but this file said the Samsung’s SSD was already current. Despite this ad saying that the Samsung 970 Evo Plus 2TB is compatible if running the current firmware, I didn’t find this to be true. I also tried the Samsung SSD with another Sintech adapter I have (the stubby one for MacBook Air devices), but it didn’t work. After all this happened, I decided to return the Samsung SSD as I seemed to have the Adata device back up and running again.

Below are Blackmagic numbers with the Adata drive and this Sintech adapter. I’m pleased with the pair when they keep my data intact:

Windows and Re-connecting to Network Drives

Sometimes my work machine running Windows 10 loses it’s VPN connection, but when the VPN connection is re-established I’m finding the network drives no longer want to connect.

Click the Start button, then type in “cmd” and enter to bring up a command prompt. Then insert the following text:

net use p:

Which then spews out the following if you’re lucky:

Local name p:
Remote name \\yourcompanydomainname.com\projects
Resource type Disk
The command completed successfully.

After returning to navigate folders in Windows indeed the network file paths are working again – woohoo! I think in the old days Windows I occasionally had to re-run a .bat script to re-establish network file path connectivity, but this seems to be a bit easier.

DRAT and macOS Monterey

Earlier this week, a third party NVMe SSD failed as the boot drive inside my MacBookPro11,4. The drive had been backed up less than 8 hours from the disaster, but I was hoping to fiddle with the failed drive a bit more to recover files on the desktop that were saved within the last 8 hours.

Jivan Pal and others have developed DRAT for macOS and linux to work with APFS drives that might have some sort of corruption (I’m assuming this is extremely rare). Immediately after the failure, the SSD drive wasn’t visible in Finder or Disk Utility and obviously wouldn’t mount. After employing the power cycle method using an USB enclosure the NVMe was suddenly viewable in Disk Utility, but still couldn’t be mounted.

And that’s when I came across Jivan Pal talking about his open-source software, DRAT. My NVMe SSD is throwing error messages that mention the Space Manager is invalid. I’m not sure DRAT will help with this issue, but I figured it was worth a shot before I sent the SSD away on warranty for a replacement.

To install DRAT, you’ll need to visit this site, find the highest number for the latest version, click the triangle next to “Assets”, and if you’re on a Mac click on the file name “drat-0.1.3-darwin-amd64” or whatever the number is that corresponds to the version you’re seeing when reading this.

When the file is downloaded place it in the /Applications/Utilities folder, then open Terminal.app to execute these two lines of code:

cd /Applications/Utilities
chmod +x drat-0.1.3-darwin-amd64
./drat-0.1.3-darwin-amd64

When you execute the code with the last line of code, move back to Finder and offer access to this app in your Security settings, Apple logo->System Preferences…/Security & Privacy->General tab, and click “Allow Anyway”.

As suspected, the NVMe SSD is too far gone as back in Terminal.app and a request for DRAT to inspect the drive yields the following output:

sudo ./drat-0.1.3-darwin-amd64 inspect /dev/disk3s1
Password:
Opening file at `/dev/disk3s1` in read-only mode ... OK.
Simulating a mount of the APFS container.
Reading container superblock at address 0x0, assuming default block size of 4096 bytes ... FAILED: read_blocks: An unknown error occurred whilst reading from the stream.
ABORT: Failed to successfully read block 0x0.

I wasn’t able to recover any files with DRAT, but I think I was close. I ended up using the trial version of Disk Drill to view a single file I was curious about and stopped my recovery effort there – my other backup was good enough. Should I return to DRAT, the online instructions were helpful.

Spectre Automatic Firmware Upgrade and Permissions

I’m working on a project with an Advantech router (SR305 v3) that needs infrequent firmware security updates. It has the ability to pull the firmware updates from a third party web server on a specified schedule. To do this, the web server (Apache running on macOS Monterey Sonoma) needs read access to the directory and files the firmware is saved in.

Advantech’s latest firmware is usually posted here. After downloading the firmware files and saving them in the web server directory “Spectre_firmware”, proper file and directory permissions are enabled on the web server by opening Terminal.app and running the following command:

sudo chown -Rv _www /Library/WebServer/Documents/Default/brad/images/Spectre_firmware

This information is for later reference if we decide to script the update process.

Reset Homebridge Authentication Credentials

I had to restore my iPhone from a backup and in the process wiped out my Authenticator/two factor information, which disabled Homebridge authentication. No sweat, from Terminal.app:

sudo hb-service stop

Navigator to your home folder and Homebridge settings:

cd ~/.homebridge

Now rename auth.json:

mv auth.json auth_old.json

Restart homebridge:

sudo hb-service start

And with a browser navigate to you’ll be able to authenticate with admin/admin through Homebridge’s web user interface. In the upper righthand corner of your web browser’s tap the 3 dots, tap “User Accounts”, and finally tap “ENABLE 2FA” to re-enable two factor authentication.

Installing Mojave in VirtualBox

I have some 32-bit apps I wanted to retain access to, so it was time to virtualize Mojave under Monterey. I found these excellent instructions, hopefully they help you too:

https://www.whatroute.net/installerapp2iso.html

Of course I installed VirtualBox Extensions in the middle of this and somehow needed to follow advice at these links:

https://stackoverflow.com/questions/65149373/kernel-driver-not-installed-rc-1908-getting-errors-in-macos-big-sur-11-0-1

https://stackoverflow.com/questions/41691803/how-to-install-guest-addition-in-mac-os-as-guest-and-windows-machine-as-host

And note to self and others who arrive here, as of today I do not recommend instructions in the following two links as they did not work for my set up:

https://appletoolbox.com/need-to-run-32-bit-apps-on-macos-catalina-use-a-mojave-virtual-machine/

https://forums.virtualbox.org/viewtopic.php?t=95049

So far things are working well. If all of this virtualization should later fail and I’m unable to continue on with my previous work in the app Addresses & Labels, I vow to follow others’ advice and give this app a shot or maybe even consider gLabels through macports.

Also, for those coming here for the first time, maybe consider skipping all the steps above and try this instead.

ABSPATH and WordPress

My blog was displaying a funky error message at the top of every page:

ABSPATH already defined in /Library/WebServer/Documents/Default/wp-config.php on line 25

After looking at line 25:

define('ABSPATH', dirname(__FILE__).'/');

I added one line above it:

if ( !defined('ABSPATH') )

And now the funky error message is gone.

Swift, build, run, LMP?

For future reference, when building a Swift package, use Terminal and move into the directory of the Swift project. In Terminal, type:

swift build

The build should finish with “Build complete!”

For the hcitool project, I then tried to run it with:

.build/x86_64-apple-macosx/debug/hcitool ibeacon

A prerequisite for this stunt is to have Xcode installed if you’re on a Mac. Eventually I want to find out my Mac’s Bluetooth LMP with instructions on this site by using this command:

sudo hcitool info 9C:65:B0:A0:1E:BD

I’m hoping I find an LMP of 8. Maybe I’ll get another chance if this issue is resolved.