Need to realize a concept of firmware & SD card content updating

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm making an electronic rosary and I'm trying to see if Arduino Leonardo could help in an updating issue. I hope that talking about theological devices isn't against some rule on the forums. Here's my concept:

The rosary has texts, images and songs recorded on the SD card that is almost never removed. As of every year, there is a calendar showing Scriptures for every day and month and they need to be downloaded. I'm thinking of monthly or yearly updates. My concept is that the user connects the rosary to their PC and runs an app that's on the SD card, which downloads latest updates from the Church server. The updates can be firmware updates where the bootloader is invoked and loads a HEX file which is downloaded from the server through the app or SD card updates where the bootloader adds, modifies and removes files from the SD card according to the instructions from the server through the app.

 

The reason why I chose Leonardo is because the end-user would have trouble with COM ports so it's better to have an USB-based AVR microcontroller that does all the work. Now, the question is what kind of a device the microcontroller should display itself as. I don't want the end-user to have to install some special drivers for this and have trouble with false-alarm antivirus programs. This is why instead I've decided to use a HID library if one exists. What do you think about that?

 

If it's good to use the HID library, what kind of a device more specifically should the microcontroller display itself as? If the app is on the SD card, the microcontroller needs to offer to the end-user that file by displaying itself as a USB Mass Storage Device. What kind of a library should I use? Please, only permissive open-source licensed libraries. No ASF's license or GPL or ShareAlike.

 

The microcontroller needs to have some kind of communication with the app in order to transfer updates. What kind of communication which doesn't require special drivers should I use? A COM port is a problem because I have Sony Ericsson PC Companion Suite and it's messing with my Croduino (Arduino Duemillanove derivative) by resetting it constantly. I don't want to force people to uninstall such software from their PC. The communication needs to be uninterferable by any other program than the app. What kind of USB communications would you recommend? Could this COM port problem be bypassed somehow?

 

So let's say that the rosary needs a firmware update. That means that the program execution has to be in the bootloader section to do so which also means that it should not disturb the communication between the microcontroller and the SD card which is going to happen anyway due to that resetting the microcontroller and loading bootloader's global variables and stuff will corrupt the previous RAM data about the communication. I just hope that the SD card is somehow resettable in the meantime. So is it?

 

The reason why I don't want the updates to go through the USB Mass Storage Device thing is because it's possible that the rosary gets a virus from an infected computer which would just infect other computers. If the files go through a hidden communication system, then the virus cannot do anything. You might be asking me how does the app appear in the USB Mass Storage mode on the PC. I'm thinking that the microcontroller just spawns a flash drive icon on the PC's My Computer window and that all its contents are read-only. Do you think I'm complicating this? How would you do this?

 

Thank you for your time and patience.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why not just have the rosary documents on a thumb drive and a high level application to access the appropriate material according to date? At this point, I cannot see the function of an AVR!

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's because the device is a rosary/watch hybrid and not a PC where you plug a USB stick.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How are you going to present these files (images, sound files, and documents) to the user? Sounds more like a smart-phone app. By the way, I would never consider an Arduino board as part of a commercial product. Maybe your own board patterned after one of the Arduinos, but you have no guarantee of continued availability. Great for prototype but not as a production component.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Sun. Jul 31, 2016 - 03:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is this a religious thread or a gardening thread? cheeky

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would make it appear as an MSD when it requires a firmware update then just drag/drop a .bin file to the "drive" and it updates.

 

If you don't want to make it a multi-class device so the MSD is always there have the user hold a button or something as it enumerates and it only enumerates as the MSD while the button is held.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perhaps you want to use an avr with USB support and just connect your rosary to the pc to update the sd card. I think there is even sample code on how to do that.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What kind of an AVR with USB support do you recommend? I prefer one that doesn't require PDI or JTAG or the expensive MK2 in order to be programmed. I'll need to write my own bootloader or modify an already existing one in order to make it load a firmware update. I don't think I can do that by using the bootloader itself to load itself. It's impossible. I just hope the AVR is compatible with USBasp.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Most models of AT90USB come with DFU installed and can be programmed with nothing more than the USB A-B cable you are bound to be using anyway. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What about megaAVRs or something that has a development board or is in a DIP package? I don't want to complicate around with making my own PCBs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The "mega" chips that have USB are:

 

http://www.atmel.com/selector.ht...

 

They are all non-DIP packaged but if you get something like an AT90USBKEY you get an at90usb1287 (the top of the range) mounted on a very capable little board already. Alternatively just get the raw chip and something like this:

 

http://www.futurlec.com/SMD_Adap...

 

If you want USB in a DIP package then dare I suggest it but Micochip do USB micros in DIP.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess I'll go with Arduino Leonardo. It has the USB functionality and most RAM and Flash. By looking online, I found a library called LUFA. Do you think it would be possible to make a virtual COM port along with a USB Mass Storage all in one? Would it be possible to set the COM port's description and the UMS description so that my program can immediately find them without special user intervention?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Foxcat385 wrote:
Do you think it would be possible to make a virtual COM port along with a USB Mass Storage all in one?

Yes LUFA can implement multi-class deviecs.

Foxcat385 wrote:
Would it be possible to set the COM port's description and the UMS description so that my program can immediately find them without special user intervention?
Err no.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So how is the program going to know which drive and COM port the device is? I don't want to bother people with going to Device Manager.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You make it a COM port and let your high level software sort it out, like a FitBit. No (well, very little) user effort required. Forget about the drive business at the PC end of it. Manage all that inside your device. Done that with an SD card and a serial (aka USB) port. Not hard at all. ElmChan is your  friend on this one.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net