Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » I2c bus(Not able to open i2c device)
I2c bus [message #1776856] Wed, 22 November 2017 09:59 Go to next message
khaleel shaik is currently offline khaleel shaikFriend
Messages: 19
Registered: November 2017
Junior Member
Hello

I successfully access Gpio through jdk.dio library.
Now im trying to access i2c device through index id method , but im facing below error
Quote:

2017-11-22 09:19:43,220 [Component Resolve Thread (Bundle 7)] INFO o.e.k.i.I2c - java.io.IOException

what i have did is
this is my jdk.dio.policy file (/opt/eclipse/kura/kura/jdk.dio.policy) in target
Quote:

grant {
permission jdk.dio.DeviceMgmtPermission "*:*", "open";


permission jdk.dio.gpio.GPIOPinPermission "*:*", "open,setdirection";
permission jdk.dio.gpio.GPIOPortPermission "*:*";
permission jdk.dio.i2cbus.I2CPermission "*:*";
permission jdk.dio.spibus.SPIPermission "*:*";
permission jdk.dio.uart.UARTPermission "*:*";
permission jdk.dio.watchdog.WatchdogTimerPermission "*:*";
permission java.security.AllPermission;
};

i added below line in jdk.dio.properties (/opt/eclipse/kura/kura/jdk.dio.properties) in target
Quote:

41 = deviceType: i2cbus.I2CDevice, address:0x52, addressSize:7, clockFrequency:400000

where 0x52 is my i2c device address.
Is this the path of jdk.dio.policy and jdk.dio.properties i am modifying is correct or some other files i need to modify?
Is something else i need to do?

Regards
khaleel

[Updated on: Wed, 22 November 2017 10:03]

Report message to a moderator

Re: I2c bus [message #1780831 is a reply to message #1776856] Mon, 29 January 2018 05:12 Go to previous message
LI Yi is currently offline LI YiFriend
Messages: 37
Registered: June 2017
Member
hello, I am trying to use jdk.dio in kura. I have searched a lot in web. But i still do not understand how to use it. For example, How to output a high level to
GPIO port? what is Raspberry PI 3 B port number or port name in jdk.dio? Can you give me any advices ? thank you very much .
Previous Topic:Emulated Simple Artemis MQTT Broker localhost Configuration
Next Topic:Need Help: Error when deploy Greenhouse sample on RPi3b
Goto Forum:
  


Current Time: Fri May 03 19:58:05 GMT 2024

Powered by FUDForum. Page generated in 0.02987 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top