Jump to content

kris85pl

Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

947 profile views
  1. I used pull up resistors 2k2 and i think nothing changed. I tried also 4k, no change. I have maybe 5-6 read error, next I have one read but wrong, one of 10 maybe is good read. I must say that I tried also distro without i2-sunxi.h changes but with 2k2 resistors. It seems that changes in i2c-sunxi.h file bring nothing, or maybe I must make changes in other files ? Someone tried ? Maybe better way is use arduino for this purpose ?
  2. No, I have none. Do You meane pull up resistors, or some pull up command ? How to do that ? Are they necessary ?
  3. Update: I compiled kernel like in this description : https://docs.armbian.com/Developer-Guide_Build-Preparation/ and next i found i2c-sunxhi.h and changed in this area : /* Transfer speed. */ #define SUNXI_TWI_SPEED_200K (200000) #define SUNXI_TWI_SPEED_400K (400000) #define SUNXI_TWI_SPEED(ch) (ch == SUNXI_TP_CHAN ? SUNXI_TWI_SPEED_400K : SUNXI_TWI_SPEED_200K) to #define SUNXI_TWI_SPEED_200K (100000) #define SUNXI_TWI_SPEED_400K (100000) So I changed (I think so) 200 and 400KHz to 100KHz Next I ran "./compile.sh ignore_updates=yes" with ignore_updates to avoid replace "my modified" i2c-sunxhi.h by original one. I choose sd card installation. i ran this compilation on my opi pc, I installed i2c-tools. When I type i2cdetect -y 1 I can see: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 0b -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- .... but when I'm trying to read actual battery voltage which should be read by command : i2cget -y 1 0x0b 0x09 w , I see Error: Read failed, but maybe 1 of 30 read some values but they are wrong, example: 0xff8c, and sometimes I'm getting good read, but chance is 1 to 100 or worse. Could You help me ? P.S. Maybe I'm trying to do impossible. Maybe exist some usb to i2c adapter which works with armbian and which I could use for my purposes ? Could someone suggest some ?
  4. Thanks for reply. Could You give some tutorial how to compile kernel on armbian ? May I compile on this working distro, or must I use other compilation ?
  5. Hi. Where is this file i2c-sunxi.h located ? Can I make changes on working distro, I have many items installed and I don't want to install it from begining. Do I must extract image file of armbian, and next find there this file, make change int this file and make image from modified content ? Please help/
  6. I added : to the bottom of file, and changed GPIO.setup to GPIO.setcfg but i have now error: Any suggestion ?
  7. Hi. I have orange pi pc with armbian installed. I'm powering opi pc with battery, I would like to make something like ups. Some time ago I found solution to monitor battery voltage for raspberry pi wit ADC, exactly mcp3002. It uses script in python. Here is link for this solution: http://raspi.tv/2013/controlled-shutdown-duration-test-of-pi-model-a-with-2-cell-lipo I made prepared everything like is shown on diagram, I'm using breadboard and also mcp3002. With raspberry pi it works with python script from: http://raspi.tv/download/batt_test_raspi.tv.py.gzbut I have a problem with adapt this script with OPi PC. I think, that here is a problem with some libraries, some libraries are different for rpi. Here is contains of "batt_test_raspi.tv.py.gz": Friend suggest me to install GPIO libraries for my OPi PC with armbian from this tutorial : http://www.instructables.com/id/Orange-Pi-One-Python-GPIO-basic/, I made all procedure. Next he suggest to change in original script in line from: "import RPi.GPIO as GPIO" to "import pyA20.gpio as GPIO" and in line which contains : # Define Pins/Ports SPICLK = 8 # FOUR SPI ports on the ADC SPIMISO = 23 SPIMOSI = 24 SPICS = 25 I changed to : # Define Pins/Ports SPICLK = port.PC2 # FOUR SPI ports on the ADC SPIMISO = port.PC1 SPIMOSI = port.PC0 SPICS = port.PC3 But script doesn't work. I've got error: "Traceback (most recent call last): File "batt_test_raspi.tv.py", line 15, in <module> GPIO.setmode(GPIO.BCM)" I set # in this line, next I got error: "Traceback (most recent call last): File "batt_test_raspi.tv.py", line 35, in <module> SPICLK = port.PC2 # FOUR SPI ports on the ADC NameError: name 'port' is not defined" So I add on the top of script: "from pyA20.gpio import port" Now I have error: Traceback (most recent call last): File "batt_test_raspi.tv.py", line 110, in <module> GPIO.setup(SPIMOSI, GPIO.OUT) # set up the SPI interface pins AttributeError: 'module' object has no attribute 'setup' I don't know what to do next, my linux and python knowledge is not good. Please anyone to help me get it to work. Regards, Kris P.S. Sorry for my english.
  8. Hi. My name is Kris. I bought orange pi pc few months ago. I bought also wifi usb dongle, brand is NETIS, model wf2116. This card is based on 8192cu and it has two antennas. I installed latest Armbian for orangepi pc, 5.14, jessie server. All I need is to set this card to AP mode and get full 300 mb/s speed. I followed with this instruction to enable AP mode: http://elinux.org/RPI-Wireless-Hotspot. I'd like to notice, that I have also raspberry pi model b and this method works perfectly with this card with raspbian. With orange pi pc and armbian 5.14 jessie server I have problem. I done exactly as is described here http://elinux.org/RPI-Wireless-Hotspot , only I left original hostapd installed in armbian, I didn't install new package from apt-get. When I type lsusb, my card is: Result of "lsmod": /etc/hostapd.conf: (for testing I created open network, without password, and only g mode) /etc/network/interfaces: ifconfig: iwconfig: After system start I can see network with ssid: "Test" , but when I try to connect with e.g. phone - opi pc are restarting, and from console I get these errors : My question is : WTF ? I'm fighting with this from few weeks, I asked friend who tried help me remotely to fix this problem, he bought also this card (with this chipset, but without antennas),his card is working out of box, mine without success Please help me, Kris
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines