String data from Serial to arduino

I am having trouble understanding the route I should take here. I am trying to make an iButton reader. They are 1 wire devices that has a 16 digit Serial number to each one. I have an Arduino board 3.3v with a BLE module, I was able to talk to an iPhone and Serial.Print the iButton Serial. Okay, so far so good. Now I need to store up to 2000 S/N's. Each S/N will have small amount of into on it like Unit number or name.

I am assuming the on board memory is not enough to store that info. What I want to have happen is this: iPhone reads connected device, and Serial.prints all 2000 S/N and Unit numbers associated with that S/N. OR it can export that file and send it to the arduino which in turn writes it to the SD card. From there I also want to be able to set a timeout sequence, so the unit will DELETE the file after a certain period of time that the iPhone app will designate.

Here is where I am having problems with understanding. How do I export from a phone information to the Arduino that it can write it to an SD card for a lookup type table. When I scan an iButton, it will look for a match in the table. When match is found OLED screen will show UNIT number. After X hours, lets say 5. All S/N get purged and the person is directed to go back to the iPhone to redownload all the info.

Any help in ANY of these area's would be really helpful.

Thanks again everyone.

Now I need to store up to 2000 S/N's

16 digits = 16 nibbles = 8 Bytes BCD
2000 * 8 Bytes = 16K

Or, you could store as characters = 32K !!!

Now, you have to add the metadata! (Your "small amount" of info)

To locate the lookup, you need an index in SRAM or an algorithm that can randomly work on the table in a more traditional binary search, checking the mid entry and halving each time. Of course, this implies a sorted table by I-button Serial Number. Worst case, you would have to sequentially scan serial numbers one by one. If the metadata is blocked, you waste space for short descriptions and if the metadata is random length, you must have a mechanism to find the next serial number in the stream.

You may be able to pull thus off within the iPhone with an app, but the Arduino is a very poor choice for such search logic. The Due or Tre (512 MB RAM) are probably the only viable platforms outside of using an iOS, Android, or PC for the database. At least, this is my opinion. Even if you could squeeze the data routines into an Atmega1284 with 16K of SRAM, I do not think it is the correct host.

Ray

Okay, so how about this:

Device connects via USB

Serial.print a value stating its ready

Serial.read new strings to store for a lookup.

Lets say at most we would be looking up 50 strings.

Each string would look something like this: E31000034B540001, 11F, Backdoor Key (S/N, Unit#, Location)

Is there a way I can download each string via serial to the device. Then have a lookup table or some type of search function that checks the iButton SN that is read. If it finds a match, It would Print on an LCD screen ("Unit 11F Backdoor Key") After I am done with the device, I connect to the device, and can purge all the strings I sent to it.

If you have any significant number of these strings then it would IMO make more sense to have the Arduino request them from a connected PC as required.

The program that the Arduino board will interface to has to check if the arduino is ready to recieve the data. There will be 10 of these devices plugged in at one time. I push a button, and it signals which device will pull the strings. The strings will only be set per device for security reasons, and purged when they connect back to the PC.