Uncle Andrew.. how come we have a $2 multi MHz board?...

Anything not related to STM32
MarkB
Posts: 6
Joined: Sun Oct 02, 2016 11:40 pm

Re: Uncle Andrew.. how come we have a $2 multi MHz board?...

Post by MarkB » Tue Nov 14, 2017 2:36 pm

If the Android phone can be rooted (this is becoming more difficult) the "Linux Deploy" app will give one a chroot Linux install. I used one phone as a micro file server as one might use a RaspberryPi, except mine had a built in UPS and an integral user interface via an Android VNC client. It also served a home temperature monitor (with logging) to the web all written in standard Python and using the phone's battery temperature sensor as the measuring device.

More recently I wrote an Android app using the MIT AppInventor that is a terminal to a bluetooth connected microcontroller running a Forth environment (eForth on an STM8 or Mecrisp-Stellaris on an STM32). In essence it gives me an interactive and remotely programmable microcontroller. There are similar apps available on the Android App Store, but I didn't find one that would send a file to device.

Like zoomx, I've used old Android phones as time-lapse cameras or as remote monitoring cameras. Their shortcoming is lousy performance under low light conditions, so they're not much good as security cameras. Note that my substantial collection of Android phones is mostly low end devices from pay-as-you-go providers in "loss-leader" deals.

ag123
Posts: 770
Joined: Thu Jul 21, 2016 4:24 pm

Re: Uncle Andrew.. how come we have a $2 multi MHz board?...

Post by ag123 » Tue Nov 14, 2017 3:21 pm

dannyf wrote:
Mon Nov 13, 2017 9:05 pm
The opposite of that question would have been a lot more interesting:

Can today's smartphones be made to do something else? Like reading the input from an opamp, or lighting up a led string, ...
oh well if u don't mind paring it with a blue pill or maple mini or perhaps any stm32duino capable boards
https://felhr85.net/2014/11/11/usbseria ... roid-v2-0/
https://github.com/felHR85/UsbSerial
https://github.com/mik3y/usb-serial-for-android

u could borrow the power of the stm32 'swiss army' all purpose device (development boards) to do the job, maybe even running as your 3d printer :lol:

User avatar
ahull
Posts: 1628
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Uncle Andrew.. how come we have a $2 multi MHz board?...

Post by ahull » Tue Nov 14, 2017 4:22 pm

If the Android phone can be rooted (this is becoming more difficult)
Older Samsung devices are perfect for re-purposing, and a lot of them are relatively easy to root. If you are up for a little bit of surgery, you can pick them up with a broken screen for pocket money prices. The replacement screens are very cheap, and fitting them is relatively easy if you are careful and do you Youtube research. The easiest ones only need a hot air gun a spudger and a couple of screwdrivers to fix them.

Even something as ancient as a Samsung Ace 2 or a Galaxy II makes a pretty useful platform for controlling and hacking other stuff.

The game of cat and mouse between hardware vendors and hackers trying to root their toys is interesting to watch.

Once rooted, the alternative ROMs allow you much more scope for hacking than the stock manufacturer or phone company offerings.
- Andy Hull -

ag123
Posts: 770
Joined: Thu Jul 21, 2016 4:24 pm

Re: Uncle Andrew.. how come we have a $2 multi MHz board?...

Post by ag123 » Tue Nov 14, 2017 5:25 pm

i've been wanting to install a custom rom on my phone so that those pesky apps won't complain that the phone is rooted. A truly custom rom probably doesn't need root, as everything can be root if u want it to be :lol:

User avatar
ahull
Posts: 1628
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Uncle Andrew.. how come we have a $2 multi MHz board?...

Post by ahull » Tue Nov 14, 2017 6:48 pm

ag123 wrote:
Tue Nov 14, 2017 5:25 pm
i've been wanting to install a custom rom on my phone so that those pesky apps won't complain that the phone is rooted. A truly custom rom probably doesn't need root, as everything can be root if u want it to be :lol:
What make/model of phone?
- Andy Hull -

User avatar
RogerClark
Posts: 7166
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Uncle Andrew.. how come we have a $2 multi MHz board?...

Post by RogerClark » Tue Nov 14, 2017 7:41 pm

@ag123

Take a look at lineageos to see if your phone is supported..

In fact, I now will only buy phones which I can load Lineage or another custom ROM

XDA is also another good place for custom ROMs, e.g. I have a Samsung J5 phone which is not supported by Lineage but someone made a partially working ROM and posted on XDA. ( but some things dont work, like bluetooth audio)

I even recompiled the LimeageOS ROM for my phone, but I had to setuo a linux machine specifically for the purpose and it took about 10 hours to run the whole makefile !


However, as far as I know, these custom ROMs are just designed to be replacement versions of Android, and you dont end up with a linux box rather than a phone.

Phones and tablets don't often have any GPIO or other hardware peripherals e.g. Serial, or SPI or I2C.
So they dont seem to be able to fit the niche of a RPi + screen

User avatar
ahull
Posts: 1628
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Uncle Andrew.. how come we have a $2 multi MHz board?...

Post by ahull » Tue Nov 14, 2017 9:44 pm

If the chipset supports USB host mode (and this is also supported by the Custom ROM), you can add USB serial peripherals, SPI bridging and some gpio (by bitbanging the handshaking pins). Other hardware (keyboards, mice, HID devices etc) are also available using host mode. Having said that, you can also use WiFi to control things like ESP32/ESP8266 modules and use those to bridge to GPIO.

The Pi + screen on the other hand is a "real" linux box and is in many ways much more flexible (but you do need to provide your own battery solution for truly portable scenarios).
- Andy Hull -

User avatar
RogerClark
Posts: 7166
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Uncle Andrew.. how come we have a $2 multi MHz board?...

Post by RogerClark » Tue Nov 14, 2017 11:56 pm

I had a go at using USB to serial on an Android device some time ago.

I think it had some drivers installed, but only for specific USB VID/PID numbers and I cant remember if it was for the generic USB CDC ACM that we use

I think it was 3 or 4 years ago and I was trying to use an Arduino Pro Micro, and managed to get it to work, but I recall it not just working "out of the box"

Possibly the easiest thing to do is change the VID/PID that the Core presents


BTW.
I've always wondered if Windows etc has a VID / PID registered by default for USB CDCACM (and possibly for DFU), which could be used to save loading drivers ;-)
i.e as the drivers are pre-installed and our "installer" just does the association of VID/PID to existing driver

User avatar
zoomx
Posts: 525
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: Uncle Andrew.. how come we have a $2 multi MHz board?...

Post by zoomx » Wed Nov 15, 2017 8:49 am

RogerClark wrote:
Tue Nov 14, 2017 11:56 pm
BTW.
I've always wondered if Windows etc has a VID / PID registered by default for USB CDCACM (and possibly for DFU), which could be used to save loading drivers ;-)
i.e as the drivers are pre-installed and our "installer" just does the association of VID/PID to existing driver
Maybe this program can be useful
http://www.nirsoft.net/utils/usb_devices_view.html
but it seems that only shows devices that was connected.

Remember
Starting from version 1.35, you can view the vendor name and product name of your USB devices. In order to use this feature, you have to download the USB ID's list of Stephen J. Gowdy (http://www.linux-usb.org/usb.ids) and put the file in the same folder of USBDeview.exe
The name of the file must remain as 'usb.ids'.

User avatar
RogerClark
Posts: 7166
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Uncle Andrew.. how come we have a $2 multi MHz board?...

Post by RogerClark » Wed Nov 15, 2017 8:59 am

@zoomx

Thanks. I've used that before.. It is useful for debugging USB problems

Post Reply