Discussion:
[BitPim-devel] sms database
JusGreen Auto Wash
2012-05-19 03:47:39 UTC
Permalink
Hello, My BitPim database had become currupted somehow in January of this
year, and I only recently discovered this when I tried to retreive an old
text.

When I downloaded my text's from my phone, I could see that the texts were
being downloaded as I could read the status bar and it saying that it was
retrieving texts from the OUTBOX of my phone. Yes I only had a problem with
my SENT text's download to the BitPim database.

I feel that my database had somehow became currupted during one of my
system restores, and I had not noticed the problem till now.

After some research, I found out what sort of database BitPim used and
tried to fix the error manually. On, before this, I moved my regular BitPim
folder from the My Documents folder and allowed BitPim to create a new
database. I then tested it and it downloaded and displayed both incoming
and out going message.

It appeared that the problem was with the UID field, as a few of the
records were NULL, and most the rest were not; most of the sent texts from
my phone had not had a UID, but others did, and the ones that did displayed
in BitPim.

I converted the database to access, then wrote an ASP script to regenerate
UID's. I noticed that only the last 9 digits had changed throughout the
database. After generating UID's, imported the database back into the
BitPim database and tried to access the sms's via BitPim. It did not work...

So, this brings me here; could someone explain to me, how the UID's are
generated, so that I could repair my database. My ASP script took the first
# of the UID and hard fixed it for all records [ 1337112 ]; then it
randomly generated two more strings separated by a decimal point; one 3 [
097 ] digits and the other 6 [ 097414 ] digits.

Additionally, for each sms record, I had my script generate a record into
the sms__serials table, although, when the sms__serials table was done
building it only had 1219 records versus the 1269 in sms table; exactly the
same results as when started this show.

Any help would be appreciated. Thanks!
Dennis Reichel
2012-05-19 15:59:21 UTC
Permalink
My guess about UIDs is that they are something like email message
uids.. They commonly encode an identifier for the client that originated
the message and a timestamp
to ensure uniqueness. There's probably an RFC covering this.

A possible use of UID would be to identity replies and even threads of
messaging.

I'd suggest that you test your hypothesis that the original DB can not
be read because of the records with invalid UIDs by deleting those
suspect records and
trying to read the SMS table in Bitpim.

Also, you could set some UIDS to NULL in your working test database to
see if that causes breakage.

A useful resource: http://www.sqlite.org/sqlite.html
Post by JusGreen Auto Wash
Hello, My BitPim database had become currupted somehow in January of
this year, and I only recently discovered this when I tried to
retreive an old text.
When I downloaded my text's from my phone, I could see that the texts
were being downloaded as I could read the status bar and it saying
that it was retrieving texts from the OUTBOX of my phone. Yes I only
had a problem with my SENT text's download to the BitPim database.
I feel that my database had somehow became currupted during one of my
system restores, and I had not noticed the problem till now.
After some research, I found out what sort of database BitPim used and
tried to fix the error manually. On, before this, I moved my regular
BitPim folder from the My Documents folder and allowed BitPim to
create a new database. I then tested it and it downloaded and
displayed both incoming and out going message.
It appeared that the problem was with the UID field, as a few of the
records were NULL, and most the rest were not; most of the sent texts
from my phone had not had a UID, but others did, and the ones that did
displayed in BitPim.
I converted the database to access, then wrote an ASP script to
regenerate UID's. I noticed that only the last 9 digits had changed
throughout the database. After generating UID's, imported the database
back into the BitPim database and tried to access the sms's via
BitPim. It did not work...
So, this brings me here; could someone explain to me, how the UID's
are generated, so that I could repair my database. My ASP script took
the first # of the UID and hard fixed it for all records [ 1337112 ];
then it randomly generated two more strings separated by a decimal
point; one 3 [ 097 ] digits and the other 6 [ 097414 ] digits.
Additionally, for each sms record, I had my script generate a record
into the sms__serials table, although, when the sms__serials table was
done building it only had 1219 records versus the 1269 in sms table;
exactly the same results as when started this show.
Any help would be appreciated. Thanks!
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
--
Best Regards, Dennis Reichel
Reichel Systems Support
***@reichel.net
http://www.reichel.net
561-463-6020
JusGreen Auto Wash
2012-05-19 20:49:43 UTC
Permalink
Okay I figured out what the first ten digits of that UID are. They are the
UNIX date (most likely the UID is the timestamp of when the record was
created, not when the message was recieved.

I am still trying to figure out what the six numbers after the decimal are;
probably the time itself (just need to figurer out how to format it first.

It is probably because of bad formating via my random number generator that
the SMS's do not appear in BitPim.


Will keep the list updated!

Loading...