Reputation: 2509
I have an Arduino device connected through USB to the Android smartphone.
Is it possible to get the mobile's IMEI without routing it using my Arduino board?
Upvotes: 0
Views: 182
Reputation: 6280
By default I hope not, or else it would be a security issue.
The Android device controls what information is shared with the attached device.
You can probably create an Android app that will detect a plugged Arduino device in a special way and share that information (write it to USB from the app). In this case you have to install and run this app first on the mobile phone.
If you don't have an app, you can probably pretend that Arduino is a "debugger device" (like a PC with a debugging driver), and then the Android OS will ask if you trust it or not, and then can issue debugger commands from Arduino. That's much more complicated, because such drivers differ between manufacturers.
Upvotes: 1