Loading
Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

Android Bluetooth Reprap App

by pipakin, published

Android Bluetooth Reprap App by pipakin Nov 11, 2011

Description

An early development version of the Bluetooth RepRap control app. Interfaces with a Bluetooth serial module that is connected to the RepRap's rx/tx lines.

If you want to use it with an alt serial port, You'll need to use my sprinter fork that has alt serial support. As a bonus, this version of sprinter also supports the high(er) speed file transfer that is built in to the app.

This SHOULD also be compatible with makerbots as long as you're willing to mod the electronics.

Bluetooth module i used: sparkfun.com/products/10269
Custom Sprinter Firmware: github.com/pipakin/Sprinter
Code is available here: github.com/pipakin/Android-Bluetooth-Reprap
Market Link: market.android.com/details?id=com.hermit.btreprap
Market Link (free): market.android.com/details?id=com.hermit.btreprap.free

Supports:
Axis movement and homing
Temperature control (temperature status NYI)
SD card listing
Printing from SD Card
Pushing files to the RepRap SD card
Printing directly from the android phone
High(er) speed file transfer with custom Sprinter firmware

TODO:
Installation manual for Bluetooth module
Inquiry scan to show unpaired devices

Known Issues:
If Bluetooth isn't enabled, it can sometimes cause a force close.
If the Bluetooth signal isn't good enough the app might get stuck on initialization.
If the phone goes to sleep the Bluetooth connection doesn't re-initialize properly (for now the program won't let the phone sleep)
You need to pair with your bluetooth device BEFORE running the program. The program only queries for already bonded devices.

UPDATE:
After a conversation with Kliment, I think it should be fine to attach it to the primary serial port, as long as both the bluetooth module and the usb aren't trying to send at the same time.

CHANGELOG:

0.2.0
* Added upload option to send files to the RepRap
* Added bed temperature support

Recent Comments

view all
Cool, I wrote an app that uses USB-OTG to print from an android device (http://www.thingiverse.com/thing:44286). I might add bluetooth printing as well. Good work !
any way to use marlin?
Is this the module you guys are talking about?

mdfly.com/index.php?main_page=product_info
&
amp;cPath=8_47
&
amp;products_id=769
&
amp;zenid=el9982sc71ct0b23as7i0ftrs1

What is the difference between that and the BlueSMiRF? Why such a massive price difference?

Liked By

view all

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

1. Get a Bluetooth module
2. Wire it to the rx/tx lines
3. Install the app on your android
4. Pair with the Bluetooth module
5. Run the app and select the appropriate device.
6. Print with only your phone!
Cool, I wrote an app that uses USB-OTG to print from an android device (http://www.thingiverse.com/thing:44286). I might add bluetooth printing as well. Good work !
any way to use marlin?
Will this be able to alert you when your print completes?
"After a conversation with Kliment, I think it should be fine to attach it to the primary serial port, as long as both the bluetooth module and the usb aren't trying to send at the same time."

so does this work over usb?
hmm this did not work over usb on my tablet. wonder if i have to have bluetooth on. would be great to be able to use this over usb to get my printer primed so i can just drop in an sd card when it's ready.
Nope, doesn't work over usb. I don't actually own a tablet capable of usb host mode, so I can't really write to that.

Unless someone wants to buy me a tablet that is :)
Any chance of it reporting back the current temp of the bed/tip? And maybe some extruder controls (extrude
&
amp; retract + speed
&
amp; distance) so that it can also be used to change filiment? :)
smartroad: Have you gotten the BT-thing to work on your Huxley?
Hay Snille, sorry for the delay! I did get it up and running, I'll try and get some pictures of the setup.
OMG i want this for my Huxley!
I have been SO out of touch for a while. Got a newborn in the house and the holidays CLOBBERED my free time. I'm going to get back up to speed and working on the app soon, hopefully I'll have something out by the end of the month.
Definately, I'm working on those now, though the holidays have kept me so busy I haven't managed to work on the app at all for the last 2 weeks.
Hi,

great software. Im trying to open the Project in Eclipse, but only getting errors. What environment did you use to write the software?
Eclipse. I might have missed something in the github commit.
It would be most excellent if you added direct FTDI communications support for Android 3.1+ devices (Currently tablets, or the Galaxy Nexus) so we could actually use this app without any modifications on appropriate devices.

android.serverbox.ch/?p=370

We've used that at work with great success, though unfortunately our programmer wrote pretty terrible code and it needs a lot of cleanup before we can share anything.

I did learn that you have to read 4096 bytes at a time from the FTDI chip or you'll lose data, as it doesn't care if you read 1 byte or 4096, it drops the buffer after each read.

Annoyingly though, we've got these fancy new Arduino boards without an FTDI. I'm not sure how communications is established with them, but perhaps its similar?
Oh, I forgot to mention, the code in that link didn't work on the Samsung Galaxy Tab 10.1 with Android 3.1 - it seems to be missing some Android API functions. Worked on an Acer Iconia A500 though.
You mean direct usb connection? I'd be interested but it's tough to test when you don't have one of those devices. the emulator I hear is not a terribly good substitute.
Yeah, I mean direct connection to the existing USB port. Android tablets and the new Galaxy Nexus support USB hosting, so they can communicate just like a laptop would.
I think we should also look into changing the motherboard to the ADK for that simply because it has a built in USB port and Google has written a library for Arduino. It would make people's lives easier (Modding electronics wise) as well as creating to software easier due to the library's written by the Arduino and Google teams.
pipakin: how fast is your upload before and after the blockwise recieve? Would block-recieve also speed up things on normal usb transfers?
The block communications is ~10x faster than normal. It should be exactly the same speed increase for normal usb. I keep meaning to integrate it into pronterface but I'm lazy and I have 2 kids under 3 years old...
very nice. We could recycle the buffer for recalculated moves for storing blocked transfers while writing to sd card. People before claimed, that writing to sd card by usb tranfser bottelnecks at the sd card writing, as it is not done in 512 byte chunks.
Most excellent. I'm working on something similar for iOS. What were your biggest issues? So far mine has been Apple's lack of direct access to the bluetooth stack.
None really, TBH the app was super easy to write. Dealing with the market was a bit of a hassle, but I've got it down now.
just got a bluetooth module for another project that fell through. will try and get this up and running. yay!!! thankyou so much!
Great job with this!

Is there any reason the Bluetooth Mate Silver wouldn't work? I can get it locally rather than ordering the BlueSmirf silver online...

sparkfun.com/products/10393

or I can get the BlueSmirf Gold which is quite a bit more expensive.

sparkfun.com/products/582
I'd just like to add real quick, SJFW supports using Bluetooth and USB simultaneously on RAMPS with no interference, and also is SUPER easy to wire a bluetooth dongle to, and you can use a simple 5v Bluetooth dongle you can buy for $13 from mdfly.com.

That's all - this is awesome! I wrote the BT support into SJFW hoping someone would do something like this!
Sweet :) Those modules should work with Sprinter as well, wish I'd known about those...
Is this the module you guys are talking about?

mdfly.com/index.php?main_page=product_info
&
amp;cPath=8_47
&
amp;products_id=769
&
amp;zenid=el9982sc71ct0b23as7i0ftrs1

What is the difference between that and the BlueSMiRF? Why such a massive price difference?
The Bluetooth Mate Silver should be fine. Any bluetooth serial module will work, as long as it is voltage-compatible with your electronics.
Update posted! Now has the ability to load files from the phone to the printer as well as print files that are on the phone.

The update has been published on the market but it takes time to show up there.
I've always told myself that the selling point of a tablet for me is if it were able to connect to a 3D printer and print... Looks like you're bringing that wish into reality ;)

Is thank you the right words? :-D

Now only if tablets and/or Andy phones can generate gcode files... hmm...
You're welcome! I have 2 plans for skeining:

1. Use some sort of web service to skien files for me
2. Port a java skiening algorithm to android (possibly using ndk to speed things up)

1 gives you access to a server with potentially more power, but has real money overhead costs. 2 gives you an android native solution but is a HUGE pain to im
plement (and can't leverage the community power that exists behind skeinforge).
1. You can talk with Triffid Hunter, he is working on "webskein": triffid-hunter.no-ip.info/webskein/ -- you can find Triffid Hunter on R2C2 development discussion group: groups.google.com/group/r2c2-reprap-and-cnc

2. "HUGE pain to implement"
&
lt;-- can't the OpenSource RepRap Java software be re-used? or the SuperSkein (http://github.com/MaskedRetriever/SuperSkein) also in Java?

Anyway, this must be done, we must be able to browse ThingIverse and print, directly from Android!
OMG please yes please omg! =-O
Python is available on Android as I understand. Not sure how hard it would be to port it over
Mind you would it not be better to port it to androids native rather then python on Java on processor. All having their own overheads. Skeining on my Intel Atom is painfully slow (the machine I currently use to manage my machine), not sure how much more powerful the latest ARM's are.
I also think a java version would be better (although I am not a programmer).

There is RepRap software in Java and even another one in Java for STL -
&
gt; GCode, those could be used.

I wish a quick and very simple algorithm could be done from ground, for Android Java, so it could also be quick to use on the Android. Later, integrate ThingIverse on it, just an Intent for when downloading STL files to STL-
&
gt;GCode-
&
gt;3DPrinting :-)

We will soon provide this module to R2C2 electronics*, if anyone want to join us in development: groups.google.com/group/r2c2-reprap-and-cnc

* 3dprinting-r2c2.com/?q=content/first-r2c2-module-bluetooth
It would be interesting if you could print with wires perhaps with USB over a tablet?
Another thing to add to the TODO list, be able to scan the QR thingiverse QR code, and then be able to print from that
Once we get some sort of web service skeinforge, I totally agree.
Git hub doesn't exist he sais...

Edwyn
Not sure what you're trying to say here...
Want !

That could be neat for shows/exhibitions, just the pcb on a side of the huxley and the phone on the other as a modular touchscreen :)
Dang, I was gonna do this too! Another feature I imagine is using a GWT app to seamlessly skein stls for printing. Since skeinforge is 100% python, it wouldn't take much to integrate it into a GWT app.
Oops, s/GWT/GAE, but you get the idea.
I actually have a friend who is going to write a web service frontend for skienforge for just this purpose, but if you beat him to it, I'd be happy to integrate yours into the app.
Built in skiening? :-) :-)
Yup the idea would be either a public server (that is somehow funded) or you could set up your own server to provide the web service. That way the app just uploads the file there, waits for it to skein and downloads the result, but it all happens seamlessly to the user. it might be nice if the server could grab the files straight from thingiverse, to save some mobile bandwidth.
Yes, this must be done. I want to be able to whip out my phone, go to thingiverse and print something all without using a computer.
Darn, I was just thinking of doing that a week ago, but didn't have the time. :)
Hey! Great!!!

I wanted to do the same, so I will just follow your work!! Please read my post about this subject:

3dprinting-r2c2.com/?q=content/first-r2c2-module-bluetooth
Just curious, why 2 modules?

Also, yeah, I was surprised when I didn't find anybody already doing this.
2 modules because R2C2 expansion header have 2 UARTs :-) -- then I can connect from Linux Ubuntu and from Android also. I can always just assembly/use only one module.

Could you please join us at: groups.google.com/group/r2c2-reprap-and-cnc ??
We will provide to R2C2 users this module and we have already some ideas... some ideas about your TODO, etc.
Soooooooo cool!
I gotta admit, I might have jumped up and down in glee the first time I actually got it to print using the phone :D

Now if I ever take the printer to a show I won't have to lug around a computer, too.
Just ordered Bluetooth module. I can put my simple Arduino controller on hold for now :-)
Top