Wednesday, March 18, 2020

Installing TWRP on Samsung Galaxy Tab 8.9 SGH-i957

All files (TWRP, Danno ROM, Gapps) located here:

https://forum.xda-developers.com/showthread.php?p=76879448#post76879448

Instructions using Odin to flash TWRP on the tablet:
https://www.theandroidsoul.com/how-to-install-twrp-recovery-using-odin/

Moved the ROM and Gapps files over to the TWRP folder (in stock android GUI allow USB mode) from Windows

Install from zip file both the ROM and Gapps.  Reboot.

Saturday, February 22, 2020

cannot start vmware USB arbitration service error 2

Had this issue, needed to run the manual process of installing hcmon to fix it.

https://kb.vmware.com/s/article/2043656


  • VMware USB Arbitration service fails to start in VMware Workstation
  • While powering on a virtual machine, you see the error:

    Host USB device connections disabled: The connection to the VMware USB Arbitration Service was unsuccessful. Please check the status of this service in the Microsoft Management Console.
     
  • Attempting to start the service manually from Windows Services fails with the error:

    Windows could not start the VMware USB Arbitration Service on Local Computer. Error 2: the system cannot find the file specified.
 Cause
This issue occurs if some of the files that are required to run the service are missing. The files may be missing if the product was installed or upgraded using an account that does not have sufficient privileges/permissions.
 Resolution
To resolve this issue:
  1. Launch a command prompt on the host machine using an Administrator account. For more information, see the Microsoft TechNet article Start a command prompt as an administrator.

    Note: The preceding link was correct as of January 25, 2013. If you find the link is broken, provide feedback and a VMware employee will update the link.
     
  2. Run this command:

    net start hcmon
     
  3. Open the Windows service console and start the service manually.
If the service fails to start, try installing the hcmon service manually.
To install the hcmon service manually:
  1. Launch a command prompt on the host machine using an Administrator account.
  2. Run this command:
     
    • In a 32-bit host operating system:

      "C:\Program Files\VMware\VMware Workstation\vnetlib.exe" -- install hcmon

      In a 64-bit host operating system:

      "C:\Program Files (x86)\VMware\VMware Workstation\vnetlib64.exe" -- install hcmon

       
  3. Open the Windows service console and start the service manually. The service should now start successfully.
If the issue persists even after trying the preceding steps, reinstall/repair VMware Workstation as a user with Administrative rights on the Windows host. For more information, see the Getting Started with VMware Workstation guide.

4 channel Amazon wifi relay Tasmota flash

I had to take chunks from various tutorials, and honestly don't know if I had bad connections and other bumps in the road that made this more convoluted than necessary, but none the less, here we go:

- Reference URLs of tutorials- read through all of them:

https://notenoughtech.com/home-automation/nodered-home-automation/hacking-esp8285-geekgerit-4-way-relay-controller/

https://community.home-assistant.io/t/hacking-the-psf-b04-esp8285-4-channel-relay-board-and-with-tasmota-and-unable-to-drive-all-4-relays-concurrently/155919

https://www.hagensieker.com/wordpress/2019/02/21/hacking-unknown-2-channel-relay-with-tasmota/

https://www.youtube.com/watch?v=BUfWytrzrJ4&t=275s


- I tried the first URL without success, in hindsight I think the following would work

- Use the ground on the top left, not the GND mid left for grounding out GPIO14
- Press the top mid button to get into flash mode- press until mode where it repeatedly cycles the relays on/off in series.
- Then used ESPEasy_mega to flash the tasmota bin file
- After resetting power the board should become an access point to configure wifi, but you can also connect via FTDI adapter and Termite to input SSID1 and password1.

Use steps from hagensieker URL to go into WebUI and set to 4ch relay, and set relays to inching for garage door openers.

Follow various tutorials if integrating into Home Assistant (I have yet to do it)

Find commands to put only certain relays into inching mode, others into latching (For lights).

If cannot command multiple relays at once, do the chip mod found in the community.home-assistant.io URL.

- What I actually did.
- youtube URL, installed the ewelink app, connected to the board, updated the firmware to 3.3.x
- Did no use the windows flashing software from the youtube tutorial, I was still having a hard time putting the board into flashing mode and doubting my RX/TX soldering job.
- Starting using a different GND point for the GPIO10 lead, and then pressed the mode button until the relay would go into a mode where relays kept cycling on/off
- RX/TX FTDI adapter was now reading the board, it was in flash mode (remember tutorial mentions you must power the board with 5v microUSB, not just via FTDI adapter).
- Used ESPEasy_mega to flash over Tasmota bin
- reset power
- No need to use Termite to update SSID1 and Password1 info, tasmota went into wifi mode server 192.168.4.1, so used wifi to connect to "tasmota-5933" and used webUI to update wifi info.
- Tasmota flashed

- I appear to be having the problem the home assistant thread had, where I cannot power more than one relay at a time, looks like I will need to remove the 'unknown' chip and jumper the terminals in accordance to that thread's tutorial.

Still need to find commands to put certain relays into inching, others into latching (if possible), and integrate via MQTT into Home Assistant.

Monday, February 10, 2020

remount VMWare datastore after RAID rebuild

So I had to rebuild my RAID on my ESXi host.  Upon reboot the host successfully loaded up ESXi, but the VMs were invalid, the datastore gone.  Going to storage ESXi could see the presented disk and a VMFS partition.

Lots of VMWare forum articles and posts later with no resolution I found this site that saved my bacon.

https://masteringvmware.com/force-mount-vmfs-datastore-using-esxcli/

In case the site ever goes down, copied below:


Tuesday, December 24, 2019

PSF-B04 over the air flash to sonoff plus configuration

PSF-B04 appears to be the ESP8285



My photo showing 5v, ground, rx, tx, and GPIO 16 soldered to
Before soldering like I did, this post has more help with finding solder points that are easier, away from the chip- also advice to remove an unknown chip if you run into issues of the device rebooting when hitting all the relays at once.







Two relay board:
Backup original firmware:
https://notenoughtech.com/featured/is-it-worth-hacking-sonoff-basic/

Get into boot-loader:

button furthest from relays- changes latching setting of relays

middle button triggers relay closest to buttons

button closets to relay triggers relay closer to PSF module

random holding of buttons to get red LED fast blinking = wifi mode, the magic combo seems to be holding the button closest to relay down for about 7 seconds, then the next button over for about 7 seconds.

Serial method not working, either my TTL serial adapter is bad, or my soldering was bad.


Wifi method:
https://www.youtube.com/watch?v=ONFhXM5R-t4

Neither CMD or VisualStudio CMD line worked

Used Anaconda Prompt (Python)

Also command "pip3 install --user -r requirements.txt" is outdated, must use,
"py -m pip install --user -r requirements.txt"

(see this thread: https://www.reddit.com/r/learnpython/comments/a2xusa/pip3_is_not_recognized_as_an_internal_or_external/)


Then run python.exe sonota.py

SSID = ITEAD-1000705895
password = 12345678 (sonoff default).

Was getting AttributeError: 'NoneType' object has no attribute 'set_nodelay'

commented out section found here
https://github.com/mirko/SonOTA/issues/169

still seemed stuck- once got to a repeated cmd prompt output of "when download finishes, you have a few minutes to connect to final... wifi ... blah blah I rebooted the relay board and BOOM, the python script kicked in and the board flashed.  I don't think the commented out python line mentioned in the git thread fixed the issue, just lowered the 'log noise' in the prompt.

This was my 5th or so attempt, having the board in latch settings (relay stays open or closed, no delay action) might have helped per this other thread and method (but doubt this).
https://www.hagensieker.com/wordpress/2019/01/26/sonoff-rf-with-tasmota-firmware-in-homeassistant/

The device then presenting a wifi hotspot as sonoff-<four random numbers>

I did not connect to this, it went away eventually- I then found it's IP address via router

Typed in IP into we-browser and surprised to find a sonoff basic module webGUI

Fail - or so you would think - the Sonoff Basic Module is the first displayed, not the four channel - change via configuration in webGUI (makes me wonder about the actual four channel board that this brand sells- one could control two garage doors AND other features like lights).

Refer back to the blog that does the serial port wired hack on guidence
https://www.hagensieker.com/wordpress/2019/02/21/hacking-unknown-2-channel-relay-with-tasmota/



Amazon review mentions using one of the GPIOs for a reed switch to make the garage door status of being open or closed also a feature of this device (in combination of using samsung smart things, this might not be a feature easily setup in hass.io).
Per review, "Used it with my garage door opener project. Flashed it with Tasmota and found GPIO14 on the ESP chip which I use for connecting a reed switch (door sensor) too. "

Tuesday, December 3, 2019

CentOS 7 setup for golden image

Recently have been burning through CentOS VMs lately, and wanted to setup a CentOS 7 "golden image" to clone for future builds.

** NOTES, IRT Splunk severs, do not install GUI (causes proxy bridge interface weirdness), setup firewall rules).

- Install Centos7 with decent VM specs (two core, 2 gigs ram)
- Install NIC
- Install net-tools (for ifconfig command)
- install GUI (DO NOT INSTALL GNOME, BREAKS ALL THE THINGS)
- yum update
- remove virbr0 interface and libvirtd service as it messes up the Splunk install (TBD if the issue)
- disable SELinux
- disable or create firewall rules
- install A3Sec app on Splunk
- Set timzone
- Trouble shoot why having A3Sec and Snort for Splunk at the same time breaks Splunk's time parsing capability.


Ensure during boot up from CentOS7 ISO in VMWare datastore, select turning on the NIC in the GUI installation process, specify drive (30 gig size from earlier configuration), create root password and user account.

Install networking on headless CentOS7 build
https://lintut.com/how-to-setup-network-after-rhelcentos-7-minimal-installation/

Install ifconfig
https://linuxconfig.org/howto-install-ifconfig-on-centos-7-linux

Install nano:  yum install nano

Mount CD for Splunk ISO
https://linuxconfig.org/how-to-mount-cd-dvd-rom-on-centos-rhel-linux

Install GUI ** DO NOT DO !! ***
https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-gnome-gui-on-centos-7-rhel-7.html

And then for good fun, install htop
http://cheapwindowsvps.com/blog/how-to-install-htop-on-centos-7/

neofetch
http://www.vassox.com/linux-general/install-neofetch-on-centos-7-rhel/

LNAV log
https://www.unixmen.com/install-use-lnav-on-centos-7/

- adding epel-release for LNAV makes htop available as well.

virbr0 and libvirtd removal
https://www.thegeekdiary.com/how-to-remove-virbr0-and-lxcbr0-interfaces-on-centos-rhel-5-and-rhel-7/

disable SELinux
https://linuxize.com/post/how-to-disable-selinux-on-centos-7/

disable firewall
https://www.liquidweb.com/kb/how-to-stop-and-disable-firewalld-on-centos-7/

Make firewall rules- add exceptions for 8000, 8089, 9997, 514, 1514
https://blog.christophersmart.com/2014/01/15/add-permanent-rules-to-firewalld/

Install Splunk on CentOS
https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchTutorial/InstallSplunk

A3Sec App
https://splunkbase.splunk.com/app/2739/#/details

Set timezone
https://www.cyberciti.biz/faq/centos-linux-6-7-changing-timezone-command-line/

Trouble shoot A3 sec time stamp parsing breaking- update props.conf to parse time
https://answers.splunk.com/answers/626816/pfsense-event-date-time-wrong.html

Change splunk license to free immediately before expatriation of trail.