• Content Count

  • Joined

  • Last visited

  1. Here is the output of the logic analyzer (kernel ~5.4). You can open it using the pulseview software. under linux mainline 5.4.sr
  2. That is not a I2C speed issue. I examined the i2c data of the OLED using a logic analyzer and found the i2c clock is both 100KHz (maybe a little slow but reasonable)
  3. I2cdetect works properly, showing a device at address 0x3c I'm using superuser permission to execute the script. If there is a permission issue, it will show a error message "permission denied" Sometimes the display will light up and show proper content, but the script will still run into this error after ~3s.
  4. I am using a orangepi win plus. I have attached a ssd1306 OLED display to the board, using i2c1 interface, using the luma.oled library as driver. import sys from PIL import Image from PIL import ImageDraw from PIL import ImageFont import subprocess from luma.core.interface.serial import i2c from luma.core.render import canvas from luma.oled.device import ssd1306, ssd1325, ssd1331, sh1106 from time import sleep serial = i2c(port=1, address=0x3C) device = ssd1306(serial, rotate=0) width=device.width height=device.height image = Image.new('1', (device.width, device.height)) # Get drawing object to draw on image. draw = ImageDraw.Draw(image) # Draw a black filled box to clear the image. draw.rectangle((0,0,device.width,device.height), outline=0, fill=0) padding = 2 top = padding bottom = device.height-padding # Move left to right keeping track of the current x position for drawing shapes. x = 0 while True: # Draw a black filled box to clear the image. draw.rectangle((0,0,width,height), outline=0, fill=0) # Shell scripts for system monitoring from here : https://unix.stackexchange.com/questions/119126/command-to-displa$ cmd = "hostname -I | cut -d\' \' -f1" IP = subprocess.check_output(cmd, shell = True ) cmd = "top -bn1 | grep load | awk '{printf \"CPU Load: %.2f\", $(NF-2)}'" CPU = subprocess.check_output(cmd, shell = True ) cmd = "free -m | awk 'NR==2{printf \"Mem: %s/%sMB %.2f%%\", $3,$2,$3*100/$2 }'" MemUsage = subprocess.check_output(cmd, shell = True ) cmd = "df -h | awk '$NF==\"/\"{printf \"Disk: %d/%dGB %s\", $3,$2,$5}'" Disk = subprocess.check_output(cmd, shell = True ) # Write two lines of text. draw.text((x, top),"IP:"+str(IP,encoding = "utf-8"), font=font, fill=255) draw.text((x, top+8),str(CPU,encoding = "utf-8"), font=font, fill=255) draw.text((x, top+16),str(MemUsage,encoding = "utf-8"), font=font, fill=255) draw.text((x, top+25),str(Disk,encoding = "utf-8"), font=font, fill=255) device.display(image) sleep(0.5) At the kernel version 5.3.9, the display worked perfectly, without any problem. But after updating the kernel version to above 5.4.20, the same code don't work at all. Traceback (most recent call last): File "./test_oled.py", line 12, in <module> device = ssd1306(serial, rotate=0) File "/usr/local/lib/python3.6/dist-packages/luma/oled/device/__init__.py", line 188, in __init__ self.clear() File "/usr/local/lib/python3.6/dist-packages/luma/core/mixin.py", line 46, in clear self.display(Image.new(self.mode, self.size)) File "/usr/local/lib/python3.6/dist-packages/luma/oled/device/__init__.py", line 220, in display self.data(list(buf)) File "/usr/local/lib/python3.6/dist-packages/luma/core/device.py", line 46, in data self._serial_interface.data(data) File "/usr/local/lib/python3.6/dist-packages/luma/core/interface/serial.py", line 119, in data write(list(data[i:i + block_size])) File "/usr/local/lib/python3.6/dist-packages/luma/core/interface/serial.py", line 128, in _write_large_block self._bus.i2c_rdwr(self._i2c_msg_write(self._addr, [self._data_mode] + data)) File "/usr/local/lib/python3.6/dist-packages/smbus2/smbus2.py", line 637, in i2c_rdwr ioctl(self.fd, I2C_RDWR, ioctl_data) TimeoutError: [Errno 110] Connection timed out Because the luma.oled library just uses the linux kernel i2c interface like the /dev/i2c-1, so it is more likely a bug related to kernel.
  5. Output is here: http://ix.io/28uM Sadly, my board's HDMI output have been damanged by static electricity when I get the output. Probably it will cause wrong information.
  6. I connect the rockpi 4 to a Samsung display whose normal resolution is 1680x1050 via a hdmi to dvi line, but the maxium resolution I can choose is 1280x1024. And when I connect it to a 4K tv via hdmi, the maxium resolution is 1920x1080, not 3840x2160. The legacy kernel (4.4.210) works perfectly in both cases.
  7. Thank you! bootloader now works normally without any storage device connected.
  8. I am using an Orange pi win plus (Allwinner A64, 2GB ram), running Armbian Bionic with Linux 5.3.9-sunxi64 The board has an 2MB on-board spi flash and I want to flash bootloader in it. The spi flash can be correctly detected in the system (showing /dev/mtdblock0). But the "install" tool in armbian-config can't install the bootloader into the flash. When I selected "Install/Update the bootloader on SPI Flash" and confirmed the warning notice, the tool printed "OK" immidiately and there is actually nothing written to the flash. After using "sudo bash -x armbian-config", I found the tool executed a command: dd if=/usr/lib/linux-u-boot-dev-orangepiwin_19.11.3_arm64/u-boot.flash of=/dev/mtdblock0 status=noxfer But there isn't a file named "u-boot.flash" in the directory. Inside the directory "/usr/lib/linux-u-boot-dev-orangepiwin_19.11.3_arm64/", there are only two files named "sunxi-spl.bin" and "u-boot.itb". So.. If it is a bug in armbian-config or flashing bootloader to flash is simply not supported? If supported, Where can I find the u-boot.flash image? (armbianconfig -u give me this URL: http://ix.io/237r , may be useful for debugging)