I2c tools on android

I2c tools on android

An Android I2C driver test tool: detect i2c devices, dump and set i2c device registers.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Android I2C Tool Manual

This tool is to

  • detect Android I2C devices,
  • dump and set the values of I2C device registers periodically or just one time.
  • log device registers values.

The core part is running linux commannd line tool through Runtime.getRuntime().exec() , then read and parse the stand out/error and then write to log.

Build the i2c linux command line tool in target Android BSP to generate binary files: i2cdump , i2cset .

Root Android device.

Upload these two files to target device path /system/xbin , and modify the permission as 755;

If encounter the following error:

then need to modify the permission of Android I2C device file: root@android:/ # chmod 666 /dev/i2c*

Detect I2C bus and chips on target Android device

Dump all registers of specific I2C chip

  1. click right button to popup a I2C device selector dialog, then set bus number, device addres, read mode;
  2. enable read periodically;
  3. enable Log,

log path :/mnt/sdcard/i2clog/i2c_log_parsed.txt and i2c_log_raw.txt

Set value to specific I2C device register

核心是通过 Runtime.getRuntime().exec() 调用命令行工具,然后读取进程的标准输出/标准错误。核心代码在 I2cToolHelper.java 和 I2cParserHelper.java

About

An Android I2C driver test tool: detect i2c devices, dump and set i2c device registers.

Источник

I2c tools on android

Copy raw contents

Android I2C Tool Manual

This tool is to

  • detect Android I2C devices,
  • dump and set the values of I2C device registers periodically or just one time.
  • log device registers values.

The core part is running linux commannd line tool through Runtime.getRuntime().exec() , then read and parse the stand out/error and then write to log.

Build the i2c linux command line tool in target Android BSP to generate binary files: i2cdump , i2cset .

Root Android device.

Upload these two files to target device path /system/xbin , and modify the permission as 755;

If encounter the following error:

then need to modify the permission of Android I2C device file: root@android:/ # chmod 666 /dev/i2c*

Detect I2C bus and chips on target Android device

Dump all registers of specific I2C chip

  1. click right button to popup a I2C device selector dialog, then set bus number, device addres, read mode;
  2. enable read periodically;
  3. enable Log,
Читайте также:  Thermal camera для андроид

log path :/mnt/sdcard/i2clog/i2c_log_parsed.txt and i2c_log_raw.txt

Set value to specific I2C device register

Источник

ODROID

I2C on Android

I2C on Android

Post by Michel Labitzke » Wed Jul 09, 2014 5:47 pm

I searched the Forum, but unfortunately I coudn’t find anything that helps me.
All the examples I found are not for Android.

I want to connect some i2c devices (microcontroller, Touchsensor, . ) to the U3 running Android.

I have ported i2c-tools to Android.
If I do an i2cdetect -l I get

But this module isn’t included in android.

How to get this module?
Is this the right way?

EDIT:
I rebuild the kernel with GPIO SYSFS Support and accessed the Level of GPIO 199,200 and 204 successfully

Re: I2C on Android

Post by Michel Labitzke » Fri Jul 11, 2014 12:40 am

Unfortunately I have ported I2C-tools to the Android from the Tutorial (4.1.2 with Kernel inside of the Android-Tree).
Now I want to port it also to the new Android 4.4.4 and the outside kernel from github.

I have inserted the needed files to Tools/external/i2c-tools-3.1.1 but get an compilation error:

Re: I2C on Android

Post by odroid » Fri Jul 11, 2014 12:15 pm

Good to hear you can access the GPIO under Android!

I think you could do cross-build the i2c-tools statcally in your host PC.

Re: I2C on Android

Post by Michel Labitzke » Fri Jul 11, 2014 7:34 pm

Thanks for that hint.

I ported i2c-tool successfully to Android 4.4.4 (Cross Compile with NDK)
I also ported the i2c-gpio-custom Driver to Android 4.4.4 with Kernel 3.0.51

But when I do now

It seems, that another driver has greped i2c4. But how to release?

Re: I2C on Android

Post by Michel Labitzke » Fri Jul 11, 2014 11:31 pm

Respectech Posts: 279 Joined: Wed Nov 13, 2013 9:20 am languages_spoken: English, German, some Ukrainian, some Spanish ODROIDs: All the ODROIDs!!

Well, the ones released since the U2. Location: California Has thanked: 0 Been thanked: 1 time Contact:

Re: I2C on Android

Post by Respectech » Sat Jul 12, 2014 1:52 am

Re: I2C on Android

Post by Michel Labitzke » Tue Jul 15, 2014 11:45 pm

I must revert this:

Re: I2C on Android

Post by uspace » Thu Jul 31, 2014 3:25 pm

Dear Michel Labitzke

May I get the your android to communicate with I2C on Odroid U3 ?

Re: I2C on Android

Post by Michel Labitzke » Thu Jul 31, 2014 3:32 pm

uspace wrote: Dear Michel Labitzke

May I get the your android to communicate with I2C on Odroid U3 ?

Aren’t you able to build the android on your own?
I can help you.

Re: I2C on Android

Post by uspace » Thu Jul 31, 2014 4:42 pm

Dear Great Michel.

Thank you for your response.

I am a skilled java developer and android app, but I have not experience building android myself.
And, There is a Linux expert friend.

Читайте также:  Эквалайзер для андроид визуализация

Thanks for your help .

Re: I2C on Android

Post by Michel Labitzke » Thu Jul 31, 2014 6:00 pm

Re: I2C on Android

Post by bolzenwolf » Sat Sep 20, 2014 1:37 am

I’m also trying to implement some projects using i2c / gpio on android 4.4.
After some days of playing around I got i2c-tools working. But the main problem still is i2c-gpio-custom.

I recompiled kernel and build the needed kernel module (source from kernel 3.8) but the compiled module couldn’t be loaded.
So how did you got i2c-gpio-custom module working?

Источник

ODROID

[GUIDE] I2C on Android

[GUIDE] I2C on Android

Post by Michel Labitzke » Sun Jul 27, 2014 1:21 am

I have been asked a lot of times how I get the I2C working on Android and I would like to share my research with you.
So here is a short tutorial, to get I2C working on Android with ODROID U:

1. Reserve two GPIO Pins from the Connector
I use PIN 199 and 200

You can decide on your own, which pin should be SDA and SCL.
Then register a new i2c bus as i2c-gpio4 in the board config as the code below shows.

Remember that ODROIDU comes with 1.8 V logic. So you have to get a level shifter to shift the 1.8 V from the board to the normally used 3.3V on I2C busses.

Feel free to test, ask and comment this short tutorial.

Re: [GUIDE] I2C on Android

Post by sert00 » Sun Jul 27, 2014 6:14 am

Re: [GUIDE] I2C on Android

Post by odroid » Sun Jul 27, 2014 9:23 am

Re: [GUIDE] I2C on Android

Post by Michel Labitzke » Mon Jul 28, 2014 11:15 pm

Re: [GUIDE] I2C on Android

Post by andgar » Tue Sep 30, 2014 3:28 am

Re: [GUIDE] I2C on Android

Post by Michel Labitzke » Tue Sep 30, 2014 3:23 pm

you have to place the source of i2c-tools in the SOURCE Tree of Android, not in the Filesystem ON odroid.
Take a look here (scroll down to «Android source code»):
http://com.odroid.com/sigong/nf_file_bo . g=&bid=239

Re: [GUIDE] I2C on Android

Post by andgar » Wed Oct 01, 2014 4:21 am

/bin/repo» appear «can’t create //bin/repo: Read-only file system». is this a permission issue?. I have read that «$ sudo mount . » can make it writable, but I’n not sure if this is in the right direction, because I have Android 4.4.4 recently updated by ODROID Update app into my eMMC card. So what it is happened?.
or
Perhaps I must to build it all from source in a new SD card.
Sorry about this elementary questions.

Источник

borned-mind / gist:e9986407327f6a6c224c79c1e9f4d280

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters

Читайте также:  Пропали данные с sd карты android
1. Нужно сначать i2pd заходим на http://i2pd.website и нажимаем скачать. Выбираем android.
2. Распакуйте архив. Выставите, если не выставленно, в безопасности неизвестные источники.
3. Установите apk. Если у вас андроид v6 и более проделайте вот это -> https://github.com/PurpleI2P/i2pd/wiki/How-to-run-I2Pd-on-Android-6.
4. Запустите, зайдите на http://127.0.0.1:7070 в браузере, если у вас статус сети OK и Firewalled, а clock skew, то требуется настроить время в точь в точь. По возможности с интернета.
5. Выключите i2pd.
6. Установите редактор файлов, если вы ещё не установили.
7. Зайдите в папку i2pd на своем устройстве, и создайте там файл tunnels.conf(если ещё не созданно).
8. Настройте браузер например firefox на прокси
8.1 Зайдите на about:config
8.2 В поиске введите proxy
8.3 >>
8.4 зайдите на http://telegram.i2p
8.5 Увидьте b32 адреса.
8.5 Увидьте пример для i2pd.conf
8.6 скопируйте, если не собираетесь делать по примеру
9. Откройте наш созданный tunnels.conf и впишите туда это
9.1 перезагрузите i2pd
10. Откройте Telegram. Зайдите данные и диск -> настройки прокси
10.1 поставьте там localhost и порт которые указали слушаться на адрессе. Например 4460
11. Проверьте.
12. Почему I2Pd, а не Tor.
I2Pd лучше Tor, как минимум тем, что не требуется подключаться к мостам обходя блокировку Tor, что бы подключиться к главным серверам.
Нету например такого: atlas.torproject.org (логи всех релаев, да-да, все пишется)
Полная децентрализация.
Забанив одного сеть работает.
И многое другое.
Минус:
Скорость, но скорость должна расти с большим колл-вом людей в сети. Да и ECIES достаточно быстр.
TOR:
Батарей Изгоив. 23.9, [12.04.18 19:28]
@pisekot, я не писатель, поэтому добавь http://telegra.ph/Kak-polzovatsya-TorORBOT-dlya-Telegramm-04-12 ввв свой гайд
Батарей Изгоив. 23.9, [12.04.18 19:28]
исключения
Батарей Изгоив. 23.9, [12.04.18 19:28]
российских узлов
pisekot, [12.04.18 19:32]
[В ответ на Батарей Изгоив. 23.9]
Забыл, ща сделаю.
mik aniko, [12.04.18 19:33]
[В ответ на Батарей Изгоив. 23.9]
в конце статьи чёт много переводов строк
mik aniko, [12.04.18 19:33]
[Переслано из CryptoГОСТ (12.46 RUB) | «НЕВИДИМЫЙ ИНТЕРНЕТ»]
http://telegra.ph/Kak-polzovatsya-TorORBOT-dlya-Teleg..
Батарей Изгоив. 23.9, [12.04.18 19:37]
@gostco, я не спецом
Батарей Изгоив. 23.9, [12.04.18 19:37]
они сами чудным образом появились с ошибков JS
Батарей Изгоив. 23.9, [12.04.18 19:37]
Будто майоры спецом
mik aniko, [12.04.18 19:37]
))
Батарей Изгоив. 23.9, [12.04.18 19:37]
типа ты чо людям тут гайды пишешь на нахуй
Батарей Изгоив. 23.9, [12.04.18 19:37]
я удалял сидел их
Батарей Изгоив. 23.9, [12.04.18 19:38]
потом заебался
Батарей Изгоив. 23.9, [12.04.18 19:38]
вооот
Батарей Изгоив. 23.9, [12.04.18 19:39]
@gostco, причем появились по среди гайда
mik aniko, [12.04.18 19:39]
[ Файл : 181e8e3986b241ca483a4.jpg ]
на последнем издыхании телефона))
Батарей Изгоив. 23.9, [12.04.18 19:39]
.
Батарей Изгоив. 23.9, [12.04.18 19:39]
это норма!
pisekot, [12.04.18 19:42]
[В ответ на Батарей Изгоив. 23.9]
pisekot, [12.04.18 19:42]
Обновил.
http://telegra.ph/Telegram-cherez-TOR-na-android-04-12-2

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Оцените статью