View: 8259|Reply: 8

Orange Pi 3G-IoT i2c accelerometer

[Copy link]

1

threads

4

posts

51

credits

Registered member

Rank: 2

credits
51
Published in 2018-11-8 22:16:06 | Show all floors |Read mode
Edited by valspakonto at 2018-11-8 22:18

Hi all.

I'm researching the Orange Pi 3G-IoT for my client's purposes.

I'm wondering what I need to do to make accelerometer work on this board. It has everything we need except accelerometer and this is essential to this project.
The final solution will be deployed on over 30000 places, so price matters, and that's why this particular board is potential candidate, so please don't recommend any other boards if they are 2x more expensive.

So, to the question:
I'm trying to connect ADXL345 accelerometer (but can be any other cheap one, but must be accessible in large quantities),
My orange pi does have the following devices under /sys/bus/i2c/devices:
  1. 0-007f
  2. 1-0026
  3. 1-0040
  4. 1-0050
  5. 1-0055
  6. i2c-0
  7. i2c-1
Copy code

but does NOT have i2c devices under /dev folder. In fact, it does not have even /dev/i2c folder. I assume this is due to lack of i2c-dev module.
i2cdump tool looks for devices in the /dev/i2c/ folder and this can't work, obviously.


I looked for the scraps of the documentation on the web and found entry telling about compiling the android system and specifically about file "ProjectConfig.mk".
  1. CUSTOM_KERNEL_ACCELEROMETER = adxl345
Copy code

I've downloaded the whole source from the OrangePi MEGA cloud and found there that flag in ProjectConfig.mk
  1. CUSTOM_KERNEL_ACCELEROMETER = mir3da #KXTJ2-1009
Copy code
And that's right. Android system claims it has the Kionix KXTJ2-1009 accelerometer though on board there are no accelerometers.
In the source I saw there is already some code for ADXL345, but I'm still unsure how to use it.

My questions are:
1. If I change the CUSTOM_KERNEL_ACCELEROMETER to adxl345 and compile android, will it work? And will it automatically make android system seeing the ADXL345 accelerometer as one of the sensors in the SensorManager API?
2. I found on some sites that I need to compile i2c-dev module to the kernel if I want to have devices shown under /dev/i2c/ - is that right? Do I need it if I just change the CUSTOM_KERNEL_ACCELEROMETER?
3. If i2c-dev is necessary, could anyone point me at the right direction how to compile it and add the module to the kernel? I saw source codes somewhere, but I didn't do that yet. I tried i2c-dev precompiled by someone, but it was for lychee build, and obviously, didn't work.
4. Maybe I'm missing something? Maybe I'm completely wrong and need to do something else to make it work?

Thanks in advance

0

threads

6

posts

32

credits

Novice

Rank: 1

credits
32
Published in 2018-12-31 11:44:31 from mobile | Show all floors
Hi. Have you tested gps of orange pi 3g-iot

0

threads

6

posts

32

credits

Novice

Rank: 1

credits
32
Published in 2018-12-31 11:45:15 from mobile | Show all floors
My gps in not working in android on orange pi 3g iot

0

threads

6

posts

32

credits

Novice

Rank: 1

credits
32
Published in 2018-12-31 11:45:51 from mobile | Show all floors
Any suggestion? Gps app says no gps signal

1

threads

4

posts

51

credits

Registered member

Rank: 2

credits
51
 Author| Published in 2019-1-8 19:04:10 | Show all floors
ajafari200 replied at 2018-12-31 11:45
Any suggestion? Gps app says no gps signal

Hi, gps was working for me on this board. Bear in mind that gps antenna needs to see directly the satellites to get the fix, so I found my first results on the balcony The best results indoor I had, were when placed the board just by the window. On my desk I tried with another, bigger antenna from taoglas, and until gps had no fix, there were no results. I've written simple android app which sends POST request to my backend when it obtains position, then connected external powerbank and took it to the balcony and waited for like 10 minutes for fix.

And to people who are considering this board for external devices like an accelerometer - the manufacturer answered me that this board was not developed with any sensor module. We finally found board from another manufacturer, which fits our needs.

0

threads

6

posts

32

credits

Novice

Rank: 1

credits
32
Published in 2019-1-18 23:27:26 from mobile | Show all floors
Dear friend thx for your reply. Could you please tell me what board you used from another manufacturer?

1

threads

4

posts

51

credits

Registered member

Rank: 2

credits
51
 Author| Published in 2019-1-23 15:44:42 | Show all floors
Edited by valspakonto at 2019-1-23 15:46
ajafari200 replied at 2019-1-18 23:27
Dear friend thx for your reply. Could you please tell me what board you used from another manufactur ...

Sure, I hope it doesn't violate rules of this forum, but we decided to use the onion omega. It's cheap, runs linux, no problems with i2c. Needed some work and finally we have everything we wanted.

0

threads

6

posts

32

credits

Novice

Rank: 1

credits
32
Published in 2019-1-26 23:46:25 from mobile | Show all floors
Dear valspakontlo, thanks for your response. Would you please tell me which board from which manufacture you used finally

1

threads

4

posts

51

credits

Registered member

Rank: 2

credits
51
 Author| Published in 2019-1-28 19:51:53 | Show all floors
ajafari200 replied at 2019-1-26 23:46
Dear valspakontlo, thanks for your response. Would you please tell me which board from which manufac ...

As I said previously, it's onion omega.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list