I2C Help

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

I2C Help

Thu Jan 26, 2017 1:01 pm

Can someone help me with the correct commands to run I2C?

I've tried "i2cdetect -r 0" "i2cdetect -y" "i2cdetect -y 0" with no luck, followed Vonger's blog: http://vonger.cn/?p=1800

Here's some of the commands I've ran:

root@vocore2:~# lsmod | grep i2c
i2c_core 16325 4 v4l2_common
i2c_dev 3888 0
i2c_ralink 2192 0
root@vocore2:~# insmod i2c-dev
module is already loaded - i2c-dev
root@vocore2:~# i2cdetect -r 0
-ash: i2cdetect: not found
root@vocore2:~# i2cdetect -y 0
-ash: i2cdetect: not found
root@vocore2:~# i2cdetect -y
-ash: i2cdetect: not found
root@vocore2:~# i2cget -y 0 0x4d
-ash: i2cget: not found
root@vocore2:~#

Vonger
 
Posts: 896
Joined: Sun Oct 19, 2014 6:00 am

Re: I2C Help

Thu Jan 26, 2017 1:14 pm

you did not install i2c-tools.
try opkg install i2c-tools.

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: I2C Help

Thu Jan 26, 2017 1:26 pm

Hi Vonger I did try that but I was getting an error, I will try it again after work today.

Thanks!

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: I2C Help

Fri Jan 27, 2017 2:14 am

OK here's the latest, for some reason it won't let me install i2c-tools:

root@vocore2:~# ping -c1 google.com
PING google.com (216.58.219.14): 56 data bytes
64 bytes from 216.58.219.14: seq=0 ttl=53 time=15.860 ms

--- google.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 15.860/15.860/15.860 ms
root@vocore2:~# ping -c1 google.com
PING google.com (216.58.219.14): 56 data bytes
64 bytes from 216.58.219.14: seq=0 ttl=53 time=17.253 ms

--- google.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 17.253/17.253/17.253 ms
root@vocore2:~# opkg install i2c-tools
Unknown package 'i2c-tools'.
Collected errors:
* opkg_install_cmd: Cannot install package i2c-tools.
root@vocore2:~# opkg update
Downloading http://downloads.openwrt.org/chaos_calm ... ackages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_base.
Downloading http://downloads.openwrt.org/chaos_calm ... ckages.sig.
Signature check passed.
Downloading http://downloads.openwrt.org/chaos_calm ... ackages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_telephony.
Downloading http://downloads.openwrt.org/chaos_calm ... ckages.sig.
Signature check passed.
Downloading http://downloads.openwrt.org/chaos_calm ... ackages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_packages.
Downloading http://downloads.openwrt.org/chaos_calm ... ckages.sig.
Signature check passed.
Downloading http://downloads.openwrt.org/chaos_calm ... ackages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_routing.
Downloading http://downloads.openwrt.org/chaos_calm ... ckages.sig.
Signature check passed.
Downloading http://downloads.openwrt.org/chaos_calm ... ackages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_luci.
Downloading http://downloads.openwrt.org/chaos_calm ... ckages.sig.
Signature check passed.
Downloading http://downloads.openwrt.org/chaos_calm ... ackages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_management.
Downloading http://downloads.openwrt.org/chaos_calm ... ckages.sig.
Signature check passed.
root@vocore2:~# opkg install i2c-tools
Unknown package 'i2c-tools'.
Collected errors:
* opkg_install_cmd: Cannot install package i2c-tools.
root@vocore2:~# opkg install i2c-tools
Unknown package 'i2c-tools'.
Collected errors:
* opkg_install_cmd: Cannot install package i2c-tools.
root@vocore2:~# opkg install i2c-tools
Unknown package 'i2c-tools'.
Collected errors:
* opkg_install_cmd: Cannot install package i2c-tools.
root@vocore2:~# opkg install i2c-tools
Unknown package 'i2c-tools'.
Collected errors:
* opkg_install_cmd: Cannot install package i2c-tools.
root@vocore2:~# i2cdetect -y 0
-ash: i2cdetect: not found
root@vocore2:~#

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: I2C Help

Fri Feb 03, 2017 3:25 am

OK I'm able to access I2C now but I can't get any readings, I have 4.7K pull up to 3.3v on I2C SD and I2C CLK.

I have used this ADC before and I've doubled checked all the connections (Vdd, Vss, Ain).

Here's what I'm getting:

root@vocore2:~# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77
root@vocore2:~# i2cget -y 0 0x4d
0x03
root@vocore2:~# i2cdetect -r 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77
root@vocore2:~#

Any suggestions?

Vonger
 
Posts: 896
Joined: Sun Oct 19, 2014 6:00 am

Re: I2C Help

Fri Feb 03, 2017 6:59 am

Which version you are using?
If you are using VoCore2, it already have 4.7k pull-up.
If VoCore v1, you will need a pull up.

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: I2C Help

Fri Feb 03, 2017 8:33 pm

I'm using VoCore, tried it with pull ups, pull downs, and no pull ups or pull gowns and not getting anything :-/

Vonger
 
Posts: 896
Joined: Sun Oct 19, 2014 6:00 am

Re: I2C Help

Sat Feb 04, 2017 10:46 am

Emm, no idea, maybe it is solder problem.
Check Ultimate dock sch, we use i2c communicate with the audio chip.

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: I2C Help

Mon Feb 13, 2017 5:44 am

Vonger,

I purchased a PFC8591 like the one you have in http://vonger.cn/?p=1800. I connected it just like you did (no resistors) and I'm still getting the same result. Can you try your PFC8591 with the Vocore2? I even tried switching the i2c SD and SCL connections.

This is what I'm getting:

I root@vocore2:~# i2cdetect -r 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77

Vonger
 
Posts: 896
Joined: Sun Oct 19, 2014 6:00 am

Re: I2C Help

Wed Feb 15, 2017 6:55 am

try...i2cdetect -y 0
or try other parameters.

Next
Return to VoCore2/Lite/Ultimate

Who is online

Users browsing this forum: Google [Bot] and 30 guests