Phones + Arduino

Hi, i'm planing a project that requires small bits of communication with a Smartphone via USB, i want to get info from the phone like model and Battery level, is it possible with arduino or any PIC?

Forgot to clarify, there's has to be no interaction with the phone from the user, i want to be able to track that info in real time on every loop automatically

Some thoughts on this;

You need to give the make and model of the phone.

Does the technical literature for the phone say that the information you require is available via USB?

USB things are Hosts or Devices. Arduinos are devices but host shields are available for them. For the Arduino to get information from the phone with no interaction by the phone user it sounds as if the Arduino has to be the host and the phone the device.

ardly:
Some thoughts on this;

You need to give the make and model of the phone.

Does the technical literature for the phone say that the information you require is available via USB?

USB things are Hosts or Devices. Arduinos are devices but host shields are available for them. For the Arduino to get information from the phone with no interaction by the phone user it sounds as if the Arduino has to be the host and the phone the device.

If possible i want it to be compatible with at least the most popular models/brands, i thought that maybe if the way of obtaining the model of the phone was Universal i could make it derive into the code that could work with the model.

Also when i was doing PICs with mobile devices i was able to pick up the encrypted code of received text messages and, for example, turn on/off 1 or more out of 8 leds depending on the contents of the Text, without interacting with it, later i adapted the same system to turn off lights or electrical devices in my house by sending texts to the connected phone from anywhere in the world. I wanna know if it's possible to get battery info in the same way

A USB is a just a physical connection. What information can be exchanged over the USB depends on the devices. A common operating system on mobile phones is Android. You need to research if the Android OS can monitor battery level (it is very likely that it can) and then pass that information on via USB (that also seems likely).

So lookup Android, API and battery level.

Safeguard:
Hi, i'm planing a project that requires small bits of communication with a Smartphone via USB,

Safeguard:
there's has to be no interaction

Sounds like a contradiction. Who, or what, connects the cable?

You might ask at a cell phone repair store if/how one can access the cell phone internals via the USB connection. They probably use a PC if they do so.

Nick_Pyner:
Sounds like a contradiction. Who, or what, connects the cable?

I think he means that once setup the information can be collected continuously automatically without the user having to do anything.

As well as connecting the cable I am pretty sure there is going to have to be some app, written for the phone, which is run and given permission to use the USB. After that I don't see why it cannot keep providing data to the Arduino.

It would probably help if the OP explained his objective.

ardly:
It would probably help if the OP explained his objective.

Indeed.......

Hi, anyone solve something like this?

I have the HM-10 modules, and I wanna connect it to headset ONLY to get the call button push.
I wanna turn on lights with arduino, when I press the Call Button of my headphones

Thanks in advance

auveele:
Hi, anyone solve something like this?

I have the HM-10 modules, and I wanna connect it to headset ONLY to get the call button push.
I wanna turn on lights with arduino, when I press the Call Button of my headphones

Thanks in advance

Please start by reading the sticky, then update your own thread applying what you learned reading the sticky, instead of attempting to hijack an unrelated one.

Android Debug Bridge (part of Android Studio), if enabled on the phone, allows one to do pretty much anything the phone is capable of via USB. Android studio requires a pretty capable PC, never mind a microcontroller.

With garden variety microcontrollers, one could write a phone app that communicates with the microcontroller via USB on phones that support USB OTG (phone as host, mcu as client) which is probably most recent models.

That said, I'm struggling to imagine a scenario where either of the above is a sensible solution.