{"action":"created","issue":{"url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/145","labels_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/145/comments","events_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/145/events","html_url":"https://github.com/intel-iot-devkit/mraa/issues/145","id":59405411,"number":145,"title":"Changing i2c bus speed on Edison","user":{"login":"lectroidmarc","id":136927,"avatar_url":"https://avatars.githubusercontent.com/u/136927?v=3","gravatar_id":"","url":"https://api.github.com/users/lectroidmarc","html_url":"https://github.com/lectroidmarc","followers_url":"https://api.github.com/users/lectroidmarc/followers","following_url":"https://api.github.com/users/lectroidmarc/following{/other_user}","gists_url":"https://api.github.com/users/lectroidmarc/gists{/gist_id}","starred_url":"https://api.github.com/users/lectroidmarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lectroidmarc/subscriptions","organizations_url":"https://api.github.com/users/lectroidmarc/orgs","repos_url":"https://api.github.com/users/lectroidmarc/repos","events_url":"https://api.github.com/users/lectroidmarc/events{/privacy}","received_events_url":"https://api.github.com/users/lectroidmarc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-01T16:55:36Z","updated_at":"2015-03-01T17:26:21Z","closed_at":"2015-03-01T17:26:21Z","body":"I apologize if I'm totally off base here, my C is a bit weak so I'm just going to ask stupid questions...\r\n\r\nIn [mraa_intel_edison_i2c_freq()](https://github.com/intel-iot-devkit/mraa/blob/e8bc227a92fa702bceef5052961123c2e511e811/src/x86/intel_edison_fab_c.c#L675) it appears that to change the I2c bus speed it's trying to write \"std/fast/high\" to `/sys/devices/pci0000:00/0000:00:09.1/i2c_dw_sysnode`.  The problem is, on my Edison, `/sys/devices/pci0000:00/0000:00:09.1/i2c_dw_sysnode` is a *directory* containing two files `bus_num` and `mode`.\r\n\r\nSo, shouldn't it be trying to change `/sys/devices/pci0000:00/0000:00:09.1/i2c_dw_sysnode/mode`?\r\n\r\nFurther, could `mraa_intel_edison_i2c_freq()` be updated to also change the file `/sys/devices/pci0000:00/0000:00:08.0/i2c_dw_sysnode/mode` to change I2C1 as well?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/comments/76616778","html_url":"https://github.com/intel-iot-devkit/mraa/issues/145#issuecomment-76616778","issue_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/145","id":76616778,"user":{"login":"arfoll","id":514406,"avatar_url":"https://avatars.githubusercontent.com/u/514406?v=3","gravatar_id":"","url":"https://api.github.com/users/arfoll","html_url":"https://github.com/arfoll","followers_url":"https://api.github.com/users/arfoll/followers","following_url":"https://api.github.com/users/arfoll/following{/other_user}","gists_url":"https://api.github.com/users/arfoll/gists{/gist_id}","starred_url":"https://api.github.com/users/arfoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arfoll/subscriptions","organizations_url":"https://api.github.com/users/arfoll/orgs","repos_url":"https://api.github.com/users/arfoll/repos","events_url":"https://api.github.com/users/arfoll/events{/privacy}","received_events_url":"https://api.github.com/users/arfoll/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T17:26:21Z","updated_at":"2015-03-01T17:26:21Z","body":"Hi @lectroidmarc, you're 100% right, I have no idea how this worked previously - what's weird is that I checked with a scope and all... maybe the folder structure changed between the test build I used and the r2 edison SW release.... In any case I've fixed it with 677af126aab3c3773f5bd26ca17ba917c9403216.\r\n\r\nI've also had a look at i2c bus 1, I think I've got the correct path but I can't check as I dont have physical access to an edison until monday and mine is on an arduino breakout. i2c-6 seems to switch well at least. Can you confirm it's working now? FYI - you can grab the latest prebuilds from http://iotdk.intel.com/repos/1.1/intelgalactic-dev/ just go to /etc/opkg/mraa-upm.conf on your board and switch add '-dev' to the intelgalactic folder. (it should be built within the next few minutes)."}}