Shop OBEX P1 Docs P2 Docs Learn Events
IOS iPad Downloader — Parallax Forums

IOS iPad Downloader

UnsoundcodeUnsoundcode Posts: 1,532
edited 2014-04-23 21:10 in Propeller 1
@Parallax dev team

I realize TechBasic has been dropped in favor of X Code, or at least it appears that way.

Still there are some that would like to progress with TechBasic and the Prop/Stamp for their own individual projects.

The Parallax team have developed a downloader for the current IOS project, can this downloader be shared now that
1. Downloader (working)

I ask this because I know it has always been the intent for the project to be completely "open" and I am wondering if there is something holding it back or if it is just that no one has asked before.

regards

Jeff

Comments

  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-04-22 16:44
    Hey Jeff,

    I'm very glad that you asked.

    Up until now, an iOS XBee downloader has been bouncing back and forth between the developer (ByteWorks), our Sr. Software Engineer Jeff Martin, and sometimes myself. We're successfully downloading programs over the DIgi XBee 6SB WiFi module to a Propeller, without a co-processor.

    This Monday, the three of us met to discuss our next steps. Mike has a few final pieces to put into the PropLoader and then it will go to the Apple store for approval. It will be a free download and we'll make all the X-Code available.

    If you'd like, I could post some screen shots of what this looks like on an iPad.

    We're now moving into porting Simple IDE to iOS. This would be accompanied with some changes to the Propeller Activity Board to connect the programming pins and reset to the XBee's Tx/Rx/D0.

    The project we worked on with TechBASIC was very important for this one. It established the possibility, found the right people, and got us started. I'm not done with Tech BASIC by any means and would like to continue what we started.

    Ken Gracey
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2014-04-22 17:20
    Thanks for the quick reply Ken.

    I read the article http://www.parallax.com/news/2014-03-18/parallax-support-ipadiphone-based-propeller-application-downloads-propeller and it is very impressive. It's my opinion that your team chose the right route and I believe the end product will be very polished and professional.

    My interest, and I think it will benefit others, is the source for the actual download process.

    Is it something that can be used with the TechBasic app or is it specifically for X Code. If it's X Code then it will probably do me no good but if it is adaptable to TechBasic then yes I would be very interested.

    Are my expectations reasonable, and is it feasible.

    I don't mind the wait, I'm hoping I will be able to build it into my own TechBasic application.

    Jeff
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-04-22 18:39
    My interest, and I think it will benefit others, is the source for the actual download process.

    Then we should be able to make you happy. As part of this project, my key Software Engineer Jeff Martin proved out every bit and timing on a Windows system with his own software. He did this to establish clear parameters and expectations for the X-Code part of the project. So, we'll have two code deliverables to share: our documented Windows code and the same for X-code. At this stage, the only "gotcha" we've encountered is a bug deep in the 6SB firmware that the Digi Product Manager is trying to resolve. This particular issue requires us to either pre-configure a 6SB for this project using X-CTU, but if they resolve the bug then we should be able to put the device into discovery mode and use it right outta the package with minor iPad configuration.

    So, as closed as Apple is - and as much heartache as this project gives Heater - we'll share everything we've done without restriction.

    Within a week or two maximum the download from iPad should be totally done, save the bug issue unless it also gets resolved.

    I am particularly excited about this because it's looking very likely that we'll have actual editing and download of GCC files from an iPad.

    Ken Gracey
  • Mike GreenMike Green Posts: 23,101
    edited 2014-04-22 19:18
    I too have a strong interest in this project. What are the initial sources for the downloadable Propeller code? Obviously, one source would be via iTunes transfers. Another might be via copy & paste or "send to ...". Yet another possibility would be via a web server or cloud service like Dropbox. What are your initial plans and known future plans for subsequent versions?
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-04-22 20:12
    Mike Green wrote: »
    I too have a strong interest in this project. What are the initial sources for the downloadable Propeller code? Obviously, one source would be via iTunes transfers. Another might be via copy & paste or "send to ...". Yet another possibility would be via a web server or cloud service like Dropbox. What are your initial plans and known future plans for subsequent versions?

    Hey Mike!

    Thanks for asking. For now, there are two ways:

    - drop them into your iPad via iTunes into the "Prop Downloader" application
    - code of our choice is available in the application distribution

    We will first add FTP as a means to get files to the iPad. This is an easy step, so we directed the ByteWorks developer to first attempt a port of SimpleIDE to iOS. We anticipate some pretty big show-stoppers along the way with C file management (which is kinda a pain on a PC/Mac) but he thinks this step will be quite easy, so we encouraged him to proceed with the SimpleIDE port first. So, in time, we will also add:

    - FTP support to get files to the iPad

    I will ask about adding DropBox and e-mail, too. I'm sure they're also feasible.

    Ken Gracey
  • dgatelydgately Posts: 1,630
    edited 2014-04-22 20:26
    Ken Gracey wrote: »
    I will ask about adding DropBox and e-mail, too. I'm sure they're also feasible.

    The email method is fairly simple from an iApp. You just create a handler method in the app code that can accept files (in various types) from email or other sources. Your app also registers the file types it can open. When the user receives an attached file in an email message, they are given a choice of apps and other services that can open the file. As an example, my spinTab iOS app receives source and .zip files from email messages, opens them (expands the .zip files) and places them in a list for the user to select.

    There's nothing really special about this use case!

    dgately
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-04-22 21:47
    dgately wrote: »
    The email method is fairly simple from an iApp.

    dgately

    Great. I'll be sure that Jeff and Mike see your input. I'm not a programmer here but what you described seems like it'd be quite straightforward for them to implement.
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2014-04-23 07:38
    I am really pleased to see the ideas and interest on this subject, it confirms my thoughts that there are going to be a large number of Parallax to iPad users.

    The "in progress IDE and loader" will be awesome and I am excited to learn that certain features will be available to use in TechBasic.

    I see TechBasic being more for the minority but to be able to create specialized GUI's without having the advanced knowledge professional program developers have. This is not limited to the Propeller there has already been a show of interest in the Stamp forum.

    Transferring files by email and iTunes is like a step backwards in computing terms so Dropbox would be the ultimate solution. FTP is what I have been using on my personal lan for text and binary which copies the files directly to the TechBasic sandbox, which is where I would want them for downloading. Windows has its own inbuilt FTP app so you dont even need additional software.

    Jeff
  • MikeW50MikeW50 Posts: 15
    edited 2014-04-23 07:41
    This thread has moved fast in a single day. :) I'm developing the Prop Loader and am the author of techBASIC. Here's my own perspective:

    • As dgately pointed out, sending binaries to PropLoader via email is pretty easy. It's something I've done for another app, and it's rather easy to set up.

    • I have not implemented DropBox support in an app, but DropBox has an API for iOS, so I don't expect it would be difficult. Apple has rejected some apps with DropBox support, but as long as the download files are free, I don't think we would be rejected.

    • Another method that would work is iCloud integration. Does anyone care?

    • It isn't possible to handle downloading binaries with the current version of techBASIC because you need to use UDP to hit the reset line to begin the load process. The next release of techBASIC will correct that problem.

    • You can use an XBee WiFi to communicate between techBASIC and a Propeller board now. Two groups have already done this independently. The short version is you set the XBee WiFi up to handle serial communications via xctung, then use the techBASIC WiFly Terminal app as a starting place for your serial communications. You need to change the IP address and port inside the WiFly Terminal app, but otherwise the app works as-is. Handle serial communication from the Propeller side like you always do.

    • My interest in using techBASIC with the Propeller-basd products is still there. The Objective C app simply acknowledges that techBASIC and Objective C each have their own strengths and weaknesses. Objective C is better for writing an iOS based development environment. When we started, it was unclear if an iOS device could reliably download binaries to a Propeller board using XBee WiFi, so the obvious first step was a proof-of-concept app, which is what Prop Loader is. It will get some thorough testing in various network conditions, but my own testing was very positive.

    That said, Objective C is not the best way for people with an iPad to write code that will interact with their robots. Yes, it works--just as I _could_ write SimpleIDE in techBASIC--but it's not the best fit. Objective C would require you to write the code on a Mac, join the developer program at $99/year, and move the program to your iOS device to test with your robot. With techBASIC, you can write the app to interact with your robot right on your iPad or iPhone. You can make quick changes there, too.

    I expect folks will opt for Objective C for apps that require wide distribution, don't change much if at all once completed, or that need access to specialized APIs that are not available from techBASIC. I expect techBASIC will remain a viable solution for people who want immediate control over their robots, with the ability to quickly change the app without the need to use a Mac or join the developer program.

    Mike
  • MikeW50MikeW50 Posts: 15
    edited 2014-04-23 07:46
    Now I have some questions for you guys. :)

    • You're asking about loading binaries from within techBASIC. What's the use case?

    • Other than UDP, is techBASIC lacking anything you need to implement your apps to control your robots?

    • If I put a blog on my web site showing how to interface between techBASIC and an Activity Bot using an XBee WiFi, what would you like the blog to cover? (See http://www.byteworks.us/Byte_Works/DIY_Blogs.html for some examples of previous blogs.)

    • Is there anything you want to use techBASIC for other than writing apps to interact with an Activity Bot? If so, what?

    • Other than the features discussed so far, what else do you want the Prop Loader to do?

    Mike
  • Jeff MartinJeff Martin Posts: 758
    edited 2014-04-23 08:39
    Hi,

    I wanted to give some more details regarding the Prop Loader app.

    As was already said, this app was developed as a proof-of-concept. Mike and I achieved promising results right away, with some outstanding issue to be resolved afterwards. We later decided to spruce it up a bit and make it an app that everyone can use to download pre-compiled binaries to the Propeller.

    I've been doing lots of testing and experimenting to resolve those other issues we found along the way. As such, I needed better insight into what was going on, so I re-coded things to run from a desktop so that I could use tools like WireShark to watch traffic flow. This also had the benefit of getting us closer to the other desired result... eventual wireless downloading support from a desktop/laptop. I've learned a heck of a lot during this time, went down many promising but eventual dead-end roads, experienced successes and struggles (misconceptions, a couple bugs in the XBee S6B firmware, tech support emails flying back and forth, electrical problems, phase of the moon, you name it).

    This week I'm proving (or disproving) an alternative method of downloading over this XBee WiFi link to the Propeller in hopes to settle on something with a much greater degree of reliability over various network conditions. If it proves to be worthy, we'll be updating the Prop Downloader app to use that method. It's a little too early to make that switch just yet, but we're very close to a decision.

    Either way, we'll share all the source code and details when the dust settles from our construction and destruction! This will be pretty soon now. You'll be able to use the software we provide and/or the details of the communication methods in any way you wish to cut the cord!
  • Mike GreenMike Green Posts: 23,101
    edited 2014-04-23 09:34
    I can't speak for Parallax, but I would be interested in using a TechBasic program as a Propeller program generator or simple compiler, then using another TechBasic program to download the generated code to a Prop.
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-04-23 16:20
    Downloading is obviously the first requirement.

    I would expect any app that provides simple robot control, together with a complementary prop binary, would benefit the target users.

    My interest is in being able to write/modify spin/pasm programs, compile and then download and test, all from iPad. A simple terminal program is therefore also necessary, as this is how I test most of my programs. Note so far, none of my boards/programs have been for robotics.
  • dgatelydgately Posts: 1,630
    edited 2014-04-23 21:10
    MikeW50 wrote: »
    • If I put a blog on my web site showing how to interface between techBASIC and an Activity Bot using an XBee WiFi, what would you like the blog to cover? (See http://www.byteworks.us/Byte_Works/DIY_Blogs.html for some examples of previous blogs.)

    • Is there anything you want to use techBASIC for other than writing apps to interact with an Activity Bot? If so, what?

    • Other than the features discussed so far, what else do you want the Prop Loader to do?

    what would you like the blog to cover?
    The blog at: http://www.byteworks.us/Byte_Works/Blog/Entries/2013/9/11_Connecting_to_an_Arduino_with_and_iPhone_or_iPad.html seems to cover its subject in-depth. It's a great example of what is needed to comprehend, build and run the project. Do the same for iPad to ActivityBot and you'll have an excellent blog post!

    Is there anything you want to use techBASIC for other than writing apps to interact with an Activity Bot? If so, what?
    A generic app for communicating with other Propeller-based boards (they would be required to follow a similar config as the Activity Bot with WiFi, of course) would provide more than just a "bot" loader/controller. Any propeller user could benefit from the app.
    An app that provides an editable set of controls/displays for a propeller board (LEDs, ADC, buttons, Ping))), compass, accelerometer, IR, etc...). The user could use menus to select needed controls, add them to the display, link them to specific pins on the board, etc... An editor that allows the user to build a custom view of their propeller board with controls and data displays.

    An app that provides a prop simulator...

    Other than the features discussed so far, what else do you want the Prop Loader to do?
    Debugging features that allow the user to query the state of the propeller board, get access to what's in EEPROM & RAM, possibly access to an SD card's file system, etc...


    Thanks,
    dgately
Sign In or Register to comment.