Discussion:
[Bitpim-devel] Samsung phones: "," char in Alias field
d***@netzero.com
2004-11-18 02:42:30 UTC
Permalink
The A650 has the same "feature": users can enter "," into the Alias field. However, upon reading this entry, BITPIM would reject this entry as invalid and continue. If users made similar changes from BITPIM, the changes would be rejected by the phone and no harm done. In any case, I just updated the A650 code to check for and eliminate the ',' from the Alias field so that the entry could be properly sent to the phone.

-Joe Pham

________________________________________________________________
NetZero Platinum $9.95.
NetZero HiSpeed $14.95.
Sign up Today at http://www.netzero.net or
Visit Sam Goody, Suncoast or MediaPlay Stores.
Roger Binns
2004-11-18 03:16:18 UTC
Permalink
Post by d***@netzero.com
The A650 has the same "feature": users can enter "," into the Alias field.
How about this as a solution (which I prefer :-)

After the line is read in, it is sent to a function that works out if the
offending comma is present and requotes the string correctly. The line is
then sent through the normal processing.

This will allow using the comma in the field and make everything look
normal. The same approach can be used if the phone screws up any other
fields or in other commands.

Roger
d***@netzero.com
2004-11-18 03:50:02 UTC
Permalink
It's certainly a better and more ideal solution, and I was thinking about that myself. However, it's a tad more complex to solve which I like :-). In the mean time, we have a work-around in place until a final solution is achieved. Who would put a "," in their Alias any way, "I, Maximus"??

-Joe Pham
Post by d***@netzero.com
The A650 has the same "feature": users can enter "," into the Alias field.
How about this as a solution (which I prefer :-)

After the line is read in, it is sent to a function that works out if the
offending comma is present and requotes the string correctly. The line is
then sent through the normal processing.

This will allow using the comma in the field and make everything look
normal. The same approach can be used if the phone screws up any other
fields or in other commands.

Roger


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Bitpim-devel mailing list
Bitpim-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitpim-devel


________________________________________________________________
NetZero Platinum $9.95.
NetZero HiSpeed $14.95.
Sign up Today at http://www.netzero.net or
Visit Sam Goody, Suncoast or MediaPlay Stores.
Roger Binns
2004-11-18 04:26:56 UTC
Permalink
Post by d***@netzero.com
Who would put a "," in their Alias any way, "I, Maximus"??
The same kind of people who would URLs in it :-) How about
"Kid, Billy the"?

Anyway you are discovering just how shoddy the phones are.
They never had general software talking to them before
so not many people knew about how low the quality of
programming and design is.

Roger
Stephen Wood
2004-11-19 18:11:12 UTC
Permalink
More Samsung fun.

The other day I modified get_phone_entry and get_calendar_entry in
com_samsung to deal with " and } in phonebook and calendar names.
(These are escaped by }\002 and }] by the phone). So it should be safe
to use these characters on the phone. (Just like it will eventually be
safe to use a "," in the alias field on the phone).

However, I can not find a way to send a " back to the phone, because }
seems not to work as an escape character (Interestingly, }=0x7d, which
is the escape character for Brew/Diagnostic mode) when sending to the
phone. Since I seem to have no shortage of sacrificial Samsung phones,
I will blast the phone with every escape combination I can think of, but
probably this will not work.

So what do we do with characters that the phone won't accept? Drop them
or put in substitutes? (I.e. " -> ' , -> ;)

Stephen

P.S. When I replaced my Sanyo phone with a Samsung, I used a commercial
sync program to transfer my phonebook. I use "last, first" for names on
my phone. All the comas got lost on the transfer and I wondered why.
Since the contact names (and all other strings) are quoted for the
A620's PBOKR/W commands, comas are fine. My phone doesn't have Alias.
The programmers must have just decided to do a blanket blowing away of
comas for Samsung phones, just to be safe, or lazy.q
Roger Binns
2004-11-20 04:42:56 UTC
Permalink
Post by Stephen Wood
(These are escaped by }\002 and }] by the phone).
In PPP (which is presumably where the phones get this from),
the \x7d character is defined as add 0x20 to the next char.
You may want to try experimenting with that.

I just looked at our unescape code and we xor with 0x20.
I am assuming we just got lucky since it is the same as
adding assuming that bit was already clear.
Post by Stephen Wood
So what do we do with characters that the phone won't accept? Drop them
or put in substitutes? (I.e. " -> ' , -> ;)
In an ideal world we would do both. For example it makes most
sense to send á as a and æ as ae. However punctuation should
probably get dropped (eg I would drop © or ®)
Post by Stephen Wood
The programmers must have just decided to do a blanket blowing away of
comas for Samsung phones, just to be safe, or lazy.q
They need to claim to support as many phones as possible, so doing a
lowest common denominator thing that is sufficient to earn a tickbox
is all they do. Also it is unlikely any of the programmers own the
phones in question ...

Roger
Stephen Wood
2004-11-20 05:28:02 UTC
Permalink
Post by Roger Binns
Post by Stephen Wood
(These are escaped by }\002 and }] by the phone).
In PPP (which is presumably where the phones get this from),
the \x7d character is defined as add 0x20 to the next char.
You may want to try experimenting with that.
I just looked at our unescape code and we xor with 0x20.
I am assuming we just got lucky since it is the same as
adding assuming that bit was already clear.
Many of the references I have seen say that xor with 0x20 is what
happens.

Stephen
Roger Binns
2004-11-20 05:47:09 UTC
Permalink
Post by Stephen Wood
Many of the references I have seen say that xor with 0x20 is what
happens.
I just happened to be reading a web page that said the add
today:

add:

http://www.netfor2.com/ppp.htm

xor:

http://www.zvon.org/tmRFC/RFC1549/Output/chapter4.html
http://theory.cs.uni-bonn.de/ppp/part4.html
http://www.sweetcherrie.com/jos/src/ppp.c.html

Looks like it was wrong. I'll undo the change and revert back to xor.

Roger
Vic Heintz
2004-11-18 22:11:57 UTC
Permalink
Post by d***@netzero.com
The A650 has the same "feature": users can enter "," into the Alias
field. However, upon reading this entry, BITPIM would reject this
entry as invalid and continue. If users made similar changes from
BITPIM, the changes would be rejected by the phone and no harm done.
In any case, I just updated the A650 code to check for and eliminate
the ',' from the Alias field so that the entry could be properly sent
to the phone.
I will leave the details to you pros but just so we understand the
problem here is a sample output as seen in kermit:

at#pbokr=44
#PBOKR: 44,10,0,0,"A test",1,0,,,5551234567,0,,,,,,,Begin
alias,,,,,,,,,,,,,,,,,,,,,,,end alias,0,,,"Email",5,0,"",20041118T171056

OK

Unless bitpim sees something different from what I see on the screen
then it seems a complex issue to isolate "Begin
alias,,,,,,,,,,,,,,,,,,,,,,,end alias" as a single field. (The above
theoretically has only 26 fields.)

Vic
Roger Binns
2004-11-19 02:19:06 UTC
Permalink
Post by Vic Heintz
at#pbokr=44
#PBOKR: 44,10,0,0,"A test",1,0,,,5551234567,0,,,,,,,Begin
alias,,,,,,,,,,,,,,,,,,,,,,,end alias,0,,,"Email",5,0,"",20041118T171056
The idea is that line gets fed to a pre-processor that knows it
is a response to pbokr and that it can be screwed in this way.
The pre-processor scans from the begining up until the begining
of the alias field. It also scans from the end until the end
of the alias field. It then returns the beginining bit,
the alias inside quotes, and the end.

The returned result is then fed into the normal code oblivious
to how it could have been screwed up. (I actually do something
analogous in the Brew filesystem code where some phones have
an incorrect field and the code works around it and makes
everything look normal afterwards).

Roger
Stephen Wood
2004-11-25 04:15:21 UTC
Permalink
On Thu, 2004-11-18 at 17:11, Vic Heintz wrote:
...
Post by Vic Heintz
I will leave the details to you pros but just so we understand the
at#pbokr=44
#PBOKR: 44,10,0,0,"A test",1,0,,,5551234567,0,,,,,,,Begin
alias,,,,,,,,,,,,,,,,,,,,,,,end alias,0,,,"Email",5,0,"",20041118T171056
I added a routine "defrell" to com_samsung. If the above response is
the string s, then

self.defrell(s, 17, 26)

returns:
#PBOKR: 44,10,0,0,"A test",1,0,,,5551234567,0,,,,,,,"Begin alias,,,,,,,,,,,,,,,,,,,,,,,end alias",0,,,"Email",5,0,"",20041118T171056

The arguments are the original string, the column which the alias is in
and the total number of columns that the string should have.

Vic, can you try putting a " into the alias (if the phone will allow it)
and see what PBOKR returns. If the phone doesn't escape the ", then
defrell is going to have to be more complicated. (But probably still
doable.)

Stephen
Roger Binns
2004-11-25 05:06:15 UTC
Permalink
Post by Stephen Wood
I added a routine "defrell" to com_samsung.
Out of curiousity, what exactly does the word mean?

Roger
Stephen Wood
2004-11-25 05:51:43 UTC
Permalink
Frell is a word in a parallel universe in the TV show Farscape. If it
were translated into the equivalent word in this universe, it couldn't
be used on TV.

I could have used un instead of de. de sounds better.

I was hoping not to have to explain it.

Stephen
Post by Roger Binns
Post by Stephen Wood
I added a routine "defrell" to com_samsung.
Out of curiousity, what exactly does the word mean?
Roger
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Bitpim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
Roger Binns
2004-11-25 06:01:28 UTC
Permalink
Post by Stephen Wood
Frell is a word in a parallel universe in the TV show Farscape.
That brings back memories. I used to watch the show until it
totally lost the plot :-)

Roger
Vic Heintz
2004-11-25 13:23:37 UTC
Permalink
Post by Stephen Wood
...
Post by Vic Heintz
I will leave the details to you pros but just so we understand the
at#pbokr=44
#PBOKR: 44,10,0,0,"A test",1,0,,,5551234567,0,,,,,,,Begin
alias,,,,,,,,,,,,,,,,,,,,,,,end
alias,0,,,"Email",5,0,"",20041118T171056
I added a routine "defrell" to com_samsung. If the above response is
the string s, then
self.defrell(s, 17, 26)
#PBOKR: 44,10,0,0,"A test",1,0,,,5551234567,0,,,,,,,"Begin
alias,,,,,,,,,,,,,,,,,,,,,,,end
alias",0,,,"Email",5,0,"",20041118T171056
The arguments are the original string, the column which the alias is in
and the total number of columns that the string should have.
Vic, can you try putting a " into the alias (if the phone will allow
it)
and see what PBOKR returns. If the phone doesn't escape the ", then
defrell is going to have to be more complicated. (But probably still
doable.)
Phone lets you put in " char but apparently replaces it with } char in
PBOKR:
at#pbokr=45
#PBOKR: 45,10,0,0,"A Test",1,0,,,5551234567,0,,,,,,,Aka
}weirdo},0,,,"",5,0,"",20041125T081329

Vic
Vic Heintz
2004-11-25 13:35:56 UTC
Permalink
Post by Stephen Wood
...
Post by Vic Heintz
I will leave the details to you pros but just so we understand the
at#pbokr=44
#PBOKR: 44,10,0,0,"A test",1,0,,,5551234567,0,,,,,,,Begin
alias,,,,,,,,,,,,,,,,,,,,,,,end
alias,0,,,"Email",5,0,"",20041118T171056
I added a routine "defrell" to com_samsung. If the above response is
the string s, then
self.defrell(s, 17, 26)
#PBOKR: 44,10,0,0,"A test",1,0,,,5551234567,0,,,,,,,"Begin
alias,,,,,,,,,,,,,,,,,,,,,,,end
alias",0,,,"Email",5,0,"",20041118T171056
The arguments are the original string, the column which the alias is in
and the total number of columns that the string should have.
Vic, can you try putting a " into the alias (if the phone will allow
it)
and see what PBOKR returns. If the phone doesn't escape the ", then
defrell is going to have to be more complicated. (But probably still
doable.)
More info. Apparently all text fields replace the " with } :
at#pbokr=45
#PBOKR: 45,10,0,0,"A Test}",1,0,,,5551234567,0,,,,,,,Aka
}weirdo},0,,,"Email with a }",5,0,"",20041125T083045

Vic
Stephen Wood
2004-11-25 16:06:52 UTC
Permalink
Post by Vic Heintz
at#pbokr=45
#PBOKR: 45,10,0,0,"A Test}",1,0,,,5551234567,0,,,,,,,Aka
}weirdo},0,,,"Email with a }",5,0,"",20041125T083045
Vic
Thats the normal behavior. It is actually }\002. (\002 is " xor'd with
0x20). get_phone_entry will take care of converting these back into
"'s.

I'll modify get_phone_entry later today so that it does the defrelling.

Stephen
The Doctor
2004-11-28 17:42:21 UTC
Permalink
I know this has nothing to do with BitPim, per se, but I recall
reading that some of these cell phones contain Global Positioning
Satellite receivers which are used to support "location based"
services, like "Where is the nearest Starbucks?". Is the GPS receiver
accessible via the modem style command system? If so, then I could,
in theory, use my cell phone as a GPS receiver input to my laptop.

Thanks in advance,

Joe
Roger Binns
2004-11-28 23:01:44 UTC
Permalink
Post by The Doctor
If so, then I could,
in theory, use my cell phone as a GPS receiver input to my laptop.
In practise you can't quite. The phone records GPS signals and sends
a summary to the towers. The towers know precisely where they are
and use triangulation to locate the phone. All this information is
processed on the carriers network, with the information being available
on their servers. In theory your phone can then download the location
information (you can find the IP addresses and port numbers buried deep
in the phone config). In practise none of the servers allow download
and none of the phones do it yet.

There are some other solutions to what you are trying to do:

http://www.costco.com/Browse/Product.aspx?prodid=10037473

For $350 you get a colour GPS that has the ability to do routing,
as well as software to run on your PC. (I personally have a lower
end combination of this hardware and software).

http://www.microsoft.com/streets/ProductDetails.aspx?pid=001

You can get the latest Streets and Trips with a USB based GPS
device. (You can find this very reasonably priced at Costco
stores). It isn't as nice as having the standalone unit since
it can't route you if you are by yourself.

http://www.geocaching.com/

Try geocaching - it's fun and requires a gps.

Roger

Loading...