Quad SATA Hat Top, no OLED display information or push button action

I have the same issue. Allnet sent me a new top had and sata board and I still have no fan or oled. I did not receive a new 10 pin cable. I saw a small amount of smoke from the fan when first powering up.

pi@raspberrypi:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – 51 – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

Still do not have a working NAS.

@nerka

I think you may have incorrectly connected the wire between them, can you take a picture?

Here are a couple pictures. I did not connect the top hat to the 12v connector if that is what you are thinking.

@nerka

Sorry for the bad experience. The PHD2.0 cable (2*5pin) is inappropriate, please contact Allnet to replace it, along with the top hat.

@TonyPi4 Thank you for pointing out the real reason.

Thanks. Just to clarify, the cable is bad, or it is the wrong cable?

@nerka

It’s a wrong cable. I’ve told Allnet the details.

1 Like

I actually just went through the setup for the quad sata hat as well. The fan works on the top board, but the OLED still isn’t responsive. I also received the same 5*2 cable that is shown in the pictures provided by @nerka. Is that definitively the issue or is there something else I can try first?

@ setq

Unfortunately the OLED does not run on Raspbian 12 (bookworm):

 sudo python3 /usr/bin/rockpi-sata/oled.py                               
Traceback (most recent call last):
  File "/usr/bin/rockpi-sata/oled.py", line 28, in <module>
    disp = disp_init()
           ^^^^^^^^^^^
  File "/usr/bin/rockpi-sata/oled.py", line 22, in disp_init
    disp = Adafruit_SSD1306.SSD1306_128_32(rst=None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/Adafruit_SSD1306-1.6.2-py3.11.egg/Adafruit_SSD1306/SSD1306.py", line 287, in __init__
  File "/usr/local/lib/python3.11/dist-packages/Adafruit_SSD1306-1.6.2-py3.11.egg/Adafruit_SSD1306/SSD1306.py", line 85, in __init__
  File "/usr/local/lib/python3.11/dist-packages/Adafruit_GPIO-1.0.6-py3.11.egg/Adafruit_GPIO/GPIO.py", line 432, in get_platform_gpio
RuntimeError: Could not determine platform.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/rockpi-sata/oled.py", line 32, in <module>
    disp = disp_init()
           ^^^^^^^^^^^
  File "/usr/bin/rockpi-sata/oled.py", line 22, in disp_init
    disp = Adafruit_SSD1306.SSD1306_128_32(rst=None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/Adafruit_SSD1306-1.6.2-py3.11.egg/Adafruit_SSD1306/SSD1306.py", line 287, in __init__
  File "/usr/local/lib/python3.11/dist-packages/Adafruit_SSD1306-1.6.2-py3.11.egg/Adafruit_SSD1306/SSD1306.py", line 85, in __init__
  File "/usr/local/lib/python3.11/dist-packages/Adafruit_GPIO-1.0.6-py3.11.egg/Adafruit_GPIO/GPIO.py", line 432, in get_platform_gpio
RuntimeError: Could not determine platform.

If anyone else is having the problem: I have rewritten the library to use the newer Adafruit_CircuitPython_SSD1306 library:

Just replace the content of /usr/bin/rockpi-sata/oled.py with the following:

import time
import misc
import board
import digitalio
import adafruit_ssd1306
from PIL import Image, ImageDraw, ImageFont
import logging

# Set up logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)

font = {
    '10': ImageFont.truetype('fonts/DejaVuSansMono-Bold.ttf', 10),
    '11': ImageFont.truetype('fonts/DejaVuSansMono-Bold.ttf', 11),
    '12': ImageFont.truetype('fonts/DejaVuSansMono-Bold.ttf', 12),
    '14': ImageFont.truetype('fonts/DejaVuSansMono-Bold.ttf', 14),
}

misc.set_mode(23, 0)
time.sleep(0.2)
misc.set_mode(23, 1)

def disp_init():
    reset_pin = digitalio.DigitalInOut(board.D4)  # Use your reset pin
    i2c = board.I2C()
    disp = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c, reset=reset_pin)
    disp.fill(0)
    logger.info("Display initialized successfully.")
    return disp

try:
    disp = disp_init()
except Exception as e:
    logger.exception("Error initializing display: %s", str(e))
    misc.open_w1_i2c()
    time.sleep(0.2)
    disp = disp_init()

image = Image.new('1', (disp.width, disp.height))
draw = ImageDraw.Draw(image)

def disp_show():
    im = image.rotate(180) if misc.conf['oled']['rotate'] else image
    disp.image(im)
    disp.show()
    draw.rectangle((0, 0, disp.width, disp.height), outline=0, fill=0)
    logger.debug("Display updated and shown.")

def welcome():
    draw.text((0, 0), 'ROCK Pi SATA HAT', font=font['14'], fill=255)
    draw.text((32, 16), 'loading...', font=font['12'], fill=255)
    disp_show()
    logger.info("Welcome message displayed.")

def goodbye():
    draw.text((32, 8), 'Good Bye ~', font=font['14'], fill=255)
    disp_show()
    time.sleep(2)
    disp_show()  # clear
    logger.info("Goodbye message displayed.")

def put_disk_info():
    k, v = misc.get_disk_info()
    text1 = 'Disk: {} {}'.format(k[0], v[0])

    if len(k) == 5:
        text2 = '{} {}  {} {}'.format(k[1], v[1], k[2], v[2])
        text3 = '{} {}  {} {}'.format(k[3], v[3], k[4], v[4])
        page = [
            {'xy': (0, -2), 'text': text1, 'fill': 255, 'font': font['11']},
            {'xy': (0, 10), 'text': text2, 'fill': 255, 'font': font['11']},
            {'xy': (0, 21), 'text': text3, 'fill': 255, 'font': font['11']},
        ]
    elif len(k) == 3:
        text2 = '{} {}  {} {}'.format(k[1], v[1], k[2], v[2])
        page = [
            {'xy': (0, 2), 'text': text1, 'fill': 255, 'font': font['12']},
            {'xy': (0, 18), 'text': text2, 'fill': 255, 'font': font['12']},
        ]
    else:
        page = [{'xy': (0, 2), 'text': text1, 'fill': 255, 'font': font['14']}]

    return page

def gen_pages():
    pages = {
        0: [
            {'xy': (0, -2), 'text': misc.get_info('up'), 'fill': 255, 'font': font['11']},
            {'xy': (0, 10), 'text': misc.get_cpu_temp(), 'fill': 255, 'font': font['11']},
            {'xy': (0, 21), 'text': misc.get_info('ip'), 'fill': 255, 'font': font['11']},
        ],
        1: [
            {'xy': (0, 2), 'text': misc.get_info('cpu'), 'fill': 255, 'font': font['12']},
            {'xy': (0, 18), 'text': misc.get_info('men'), 'fill': 255, 'font': font['12']},
        ],
        2: put_disk_info()
    }

    return pages

def slider(lock):
    with lock:
        for item in misc.slider_next(gen_pages()):
            draw.text(**item)
        disp_show()
    logger.debug("Slider updated.")

def auto_slider(lock):
    while misc.conf['slider']['auto']:
        slider(lock)
        misc.slider_sleep()
    else:
        slider(lock)
1 Like