Discussion:
[Bitpim-devel] 0.7-test9
Roger Binns
2004-04-27 22:29:40 UTC
Permalink
I have uploaded Windows and Linux builds to
http://sf.net/project/showfiles.php?group_id=75211&package_id=76673&release_id=234373

Please can you verify they work on your machines. I
had to do a considerable amount of figuring out packaging
the encodings stuff, together with lots of other fun
stuff. Also note that the Linux version is using Python 2.3
not the 2.2 of earlier builds.

Please post to this list if they work or don't work for you.
I believe everything will be fine.

I will do the actual release tomorrow if no problems are
reported.

Roger
Stephen Wood
2004-04-27 23:51:14 UTC
Permalink
Post by Roger Binns
I have uploaded Windows and Linux builds to
http://sf.net/project/showfiles.php?group_id=75211&package_id=76673&release_id=234373
Please can you verify they work on your machines.
On Linux RH9, if I first remove my .bitpim* files, startup bitpim, go to
the Bitpim Settings panel and click the BitFling Enabled button, I get
an exception. If I click on the BitFling settings first, click OK,
there, then I don't get an exception when enabling.

Will you be able to get the comment I made about Sanyo camera downloads
in versionhistory.htd into the official build?

Stephen

An unexpected exception has occurred.
Please see the help for details on what to do.

Traceback (most recent call last):
File "guiwidgets.py", line 448, in ApplyBitFlingSettings
File "bitflingscan.py", line 126, in decode
ValueError: invalid literal for int(): <u

...

Frame decode in bitflingscan.py at line 126
i = 0
res = []
str = '<unconfigured>'
Tom Tracey
2004-04-28 00:38:13 UTC
Permalink
Stephen Wood
2004-04-28 04:36:04 UTC
Permalink
I successfully ran bitfling to different Sanyo phones. I just did a
localhost connection, but it was definitely bitfling.

I also tried to run a bitfling client from the CVS version, but the
bitfling options seem to be missing in the settings pane. I did a cvs
-d, but I probably need to go back through the postings to see if there
is something else I need to install.
Roger Binns
2004-04-28 06:02:44 UTC
Permalink
Post by Stephen Wood
I successfully ran bitfling to different Sanyo phones. I just did a
localhost connection, but it was definitely bitfling.
Cool.
Post by Stephen Wood
I also tried to run a bitfling client from the CVS version, but the
bitfling options seem to be missing in the settings pane. I did a cvs
-d, but I probably need to go back through the postings to see if there
is something else I need to install.
Yes, you have to have pycrypto installed. Details are on
http://bitpim.sf.net/developer.html

Roger
Stephen Wood
2004-04-29 03:52:16 UTC
Permalink
I got bitfling to work between my CVS copy as client to the 0.7t9 build
as server. This was between different machines running linux. This was
done with the SCP-5500 which I was a little worried about since there
are some hacks in the code for timeouts and resending packets.

I also tried running a server on a WinME machine, but had absolutely no
luck. Nothing ever showed up in the bitfling log on the winme machine.
There are a couple of things I need to try turning off on that machine
(ICS, some spyware blocker), but I'll probably try to a WinXP machine
first.

Stephen
...
Post by Roger Binns
Post by Stephen Wood
I also tried to run a bitfling client from the CVS version, but the
bitfling options seem to be missing in the settings pane. I did a cvs
-d, but I probably need to go back through the postings to see if there
is something else I need to install.
Yes, you have to have pycrypto installed. Details are on
http://bitpim.sf.net/developer.html
Roger
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Bitpim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
Roger Binns
2004-04-29 05:12:58 UTC
Permalink
Post by Stephen Wood
I got bitfling to work between my CVS copy as client to the 0.7t9 build
as server. This was between different machines running linux. This was
done with the SCP-5500 which I was a little worried about since there
are some hacks in the code for timeouts and resending packets.
What BitFling does is remote the API from commport.py. That means
that timeouts which are handled inside those methods are then
on the remote end (eg if it takes 20 seconds to send the request
and the timeout is 3 seconds, the 3 second counter starts on
the remote end).

Consequently I would right thing to happen for all existing code.
The thing that will go wrong is if you watch the clock on the BitPim
end.
Post by Stephen Wood
I also tried running a server on a WinME machine, but had absolutely no
luck. Nothing ever showed up in the bitfling log on the winme machine.
As you surmise it is probably firewall. Try doing a telnet to the
port.

Roger
Steven Palm
2004-04-29 14:07:12 UTC
Permalink
Okay, testing...

I get the same exception Stephen reported when clicking enable before
going into the settings on the "Enable bitfling".

After I started bitfling and then launch BitPim and try to do a test, I
get:

Failed: exceptions.Exception: No SSH on the other end: 127.0.0.1/12652

Bitfling log shows:

8:59:49.936: Starting on port 12652
9:00:06.424: No defined users for address ('127.0.0.1', 51572)
9:00:06.312: SSH worker thread 1/5: Connection from ('127.0.0.1',
51572) not accepted

(BTW: I have to put in code to autosize the window on bitfling or it's
another 0x0 window)

It then asks if I want to accept the certificate, but never tells me
that the test "passed". While this window is open, the menubar goes
into a cycle of enable/disable (menu root entries grey out, then come
back, etc...).

Within an hour I will be at work where I can test this on a clean
machine to make sure all dependencies are bundled in and I'll have the
packages to you.

Steve
Steven Palm
2004-04-29 14:11:04 UTC
Permalink
Post by Steven Palm
It then asks if I want to accept the certificate, but never tells me
that the test "passed". While this window is open, the menubar goes
into a cycle of enable/disable (menu root entries grey out, then come
back, etc...).
I take that back.... Well, I closed the test window, but the program
was unresponsive. Eventually I gave up and quit BitFling which
triggered an exception and then I got a Success in the BitPim program.
Weird.... It said it succeeded, but the remote version was None.
Steven Palm
2004-04-29 18:35:21 UTC
Permalink
Post by Steven Palm
I take that back.... Well, I closed the test window, but the program
was unresponsive. Eventually I gave up and quit BitFling which
triggered an exception and then I got a Success in the BitPim program.
Weird.... It said it succeeded, but the remote version was None.
And later, it failed... It's an encodings issue, the log file in the
bitfling client claimed it didn't know encoding US-ASCII. If I run it
from the dev source tree, not the bundle, it's fine. So, throw me a
bone Roger and let me know what files it's not packaging up. ;-)
Roger Binns
2004-04-29 18:52:46 UTC
Permalink
Post by Steven Palm
And later, it failed... It's an encodings issue, the log file in the
bitfling client claimed it didn't know encoding US-ASCII. If I run it
from the dev source tree, not the bundle, it's fine. So, throw me a
bone Roger and let me know what files it's not packaging up. ;-)
In bp.py, add a line doing this:

import encodings.ascii

You may also need a plain "import encodings".

Roger
Steven Palm
2004-04-29 19:33:12 UTC
Permalink
Post by Roger Binns
import encodings.ascii
You may also need a plain "import encodings".
Okay, that worked... Now... I don't have any devices in the bitfling
window to enable, even though the phone is plugged in. Have I missed a
step?
Stephen Wood
2004-04-29 20:06:23 UTC
Permalink
I don't either. But on the BitPim side, if I browse for devices (with
Bitfling enabled and everyone having the right addresses, usernames and
passwords) I see all the devices show up, with "bitfling::" in their
names. Perhaps this window is a future space for the flinger to
restrict which devices the flingee is allowed to talk to.

Stephen

P.S. Is it BitFling or Bitfling?
Post by Steven Palm
Okay, that worked... Now... I don't have any devices in the bitfling
window to enable, even though the phone is plugged in. Have I missed a
step?
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Bitpim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
Roger Binns
2004-04-29 20:45:53 UTC
Permalink
Post by Stephen Wood
Post by Steven Palm
Okay, that worked... Now... I don't have any devices in the bitfling
window to enable, even though the phone is plugged in. Have I missed a
step?
I don't either.
Of course you both read the help :-)

http://bitpim.sourceforge.net/testhelp/bitfling-configure.htm

The expires field is not used and will be removed.

In the future you will be able to limit what devices
can be accessed in the lower pane.

http://bitpim.sourceforge.net/testhelp/bitfling-security.htm

There is currently no limiting to what ports can be opened
via BitFling by an authenticated user. Unauthenticated users
can't get that far.

Yes, that pane will have a way of limiting ports. (It will
start out with everything disabled, and you will be able to
enable specific ports, as well as particular USB vid/pid
combinations).
Post by Stephen Wood
names. Perhaps this window is a future space for the flinger to
restrict which devices the flingee is allowed to talk to.
Yup.
Post by Stephen Wood
P.S. Is it BitFling or Bitfling?
The former, so that it corresponds to BitPim.

Roger
Steven Palm
2004-04-29 21:27:15 UTC
Permalink
Post by Roger Binns
Of course you both read the help :-)
Uh, Um, Oh, Yeah! :-)

I hope this isn't in the help I read... LoL... But using "auto" on
the remote machine doesn't work... It causes the host machine to show
this:

getting configvalue
value is 1 now about to set config
config set
claiming 1
getting configvalue
value is 1 now about to set config
config set
claiming 2

But it doesn't work. If I manually pick the port bitfling:: it works
fine.

So, having tested it at least to know it *CAN* work if set up right,
I'll build something for you when I get home tonight Roger.

Steve
Roger Binns
2004-04-29 21:32:01 UTC
Permalink
Post by Steven Palm
I hope this isn't in the help I read... LoL... But using "auto" on
the remote machine doesn't work...
http://bitpim.sourceforge.net/testhelp/bitpim-bitfling-configure.htm

If you select "Auto" for your port, it will not include the BitFling
ports. You need to manually select a BitFling port if you want to
use one.

Basically I figured that if you want to use BitFling ports, you must
manually choose them. You do still get the asterisk telling you
which could be your phone.

Roger
Steven Palm
2004-04-29 18:53:01 UTC
Permalink
Post by Steven Palm
And later, it failed... It's an encodings issue, the log file in the
bitfling client claimed it didn't know encoding US-ASCII. If I run it
from the dev source tree, not the bundle, it's fine. So, throw me a
bone Roger and let me know what files it's not packaging up. ;-)
Details:

13:50:45.230: Starting on port 12652

13:51:09.868: Connected (version 2.0, client pyssh_1.1)

13:51:09.713: SSH worker thread 1/5: Connection from
('192.168.168.106', 49596) accepted

13:51:13.646: SSH worker thread 1/5: SSH negotiated from
('192.168.168.106', 49596)

13:51:13.940: SSH worker thread 1/5: Checking authentication for user
'n9yty'

13:51:14.093: Exception in thread Threading SSH server controller for
:12652

13:51:14.102: Traceback (most recent call last):
File "/usr/local/src/bitpim/bitpim/bitfling/xmlrpcstuff.py", line
305, in run23
self.processmessage(msg)
File "/usr/local/src/bitpim/bitpim/bitfling/xmlrpcstuff.py", line
344, in processmessage
ok=self.OnNewUser(msg.clientaddr, msg.data[0], msg.data[1])
File "/usr/local/src/bitpim/bitpim/bitfling/bitfling.py", line 683,
in OnNewUser
return self.mainwin.IsConnectionAllowed(clientaddr, username,
password)
File "/usr/local/src/bitpim/bitpim/bitfling/bitfling.py", line 504,
in IsConnectionAllowed
if not self._verify_password(password, pwd):
File "/usr/local/src/bitpim/bitpim/bitfling/bitfling.py", line 536,
in _verify_password
print password, pwd, val.hexdigest(), val.hexdigest()==hash
LookupError: unknown encoding: US-ASCII

Variables by last 8 frames, innermost last

Frame __bootstrap in
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/
threading.py at line 436
self = <BitFlingService(Threading SSH server controller for
:12652, started daemon)>

Frame run23 in /usr/local/src/bitpim/bitpim/bitfling/xmlrpcstuff.py at
line 301
msg = Message: cmd=CMD_NEW_USER_REQUEST data=('n9yty',
u'password')
self = <BitFlingService(Threading SSH server controller for
:12652, started daemon)>

Frame processmessage in
/usr/local/src/bitpim/bitpim/bitfling/xmlrpcstuff.py at line 344
msg = Message: cmd=CMD_NEW_USER_REQUEST data=('n9yty',
u'password')
resp = None
self = <BitFlingService(Threading SSH server controller for
:12652, started daemon)>

Frame OnNewUser in /usr/local/src/bitpim/bitpim/bitfling/bitfling.py at
line 683
username = 'n9yty'
clientaddr = ('192.168.168.106', 49596)
password = u'password'
self = <BitFlingService(Threading SSH server controller for
:12652, started daemon)>

Frame IsConnectionAllowed in
/usr/local/src/bitpim/bitpim/bitfling/bitfling.py at line 504
username = 'n9yty'
password = u'password'
ret_allowed = False
addresses = ['*']
val = None
self = <bitfling.bitfling.MainWindow instance; proxy of C++
wxFrame instance at _5d0500_wxFrame_p>
expires = 0
uname = 'n9yty'
pwd =
'9ee37bb5a4d23e9f$a1cd32e0f44bf583703dce0b8a4b0307d49af2a0'
v = ('192.168.168.106', 'n9yty', u'password')
ret_expiry = 0
peeraddr = ('192.168.168.106', 49596)

Frame _verify_password in
/usr/local/src/bitpim/bitpim/bitfling/bitfling.py at line 536
hash = 'a1cd32e0f44bf583703dce0b8a4b0307d49af2a0'
val = <sha.SHA object at 0x239af00>
i = 14
self = <bitfling.bitfling.MainWindow instance; proxy of C++
wxFrame instance at _5d0500_wxFrame_p>
pwd =
'9ee37bb5a4d23e9f$a1cd32e0f44bf583703dce0b8a4b0307d49af2a0'
str = [158, 227, 123, 181, 164, 210, 62, 159, 112, 97,
115, 115, 119, 111, 114, 100]
x = 100
password = u'password'
salt = '\x9e\xe3{\xb5\xa4\xd2>\x9f'
Roger Binns
2004-04-29 19:24:18 UTC
Permalink
Post by Steven Palm
LookupError: unknown encoding: US-ASCII
Did an import of encodings or encodings.ascii fix
this?

Feel free to remove that print line as well. I
assume the password which is in Unicode is being
converted to ascii for printing. Removing the
print line should remove the need for that conversion.

Roger
Stephen Wood
2004-04-30 03:02:25 UTC
Permalink
Post by Roger Binns
Post by Stephen Wood
I also tried running a server on a WinME machine, but had absolutely no
luck. Nothing ever showed up in the bitfling log on the winme machine.
As you surmise it is probably firewall. Try doing a telnet to the
port.
Roger
I turned off Microsoft Internet Connection Sharing on the WinME server
machine. That helped a lot, I could read from the phone, but I had to
specify the port, browsing got an exception. This happened both with
the client being Linux CVS, or the Linux 0.7test9 build.

Perhaps we should note in the documentation that running ICS on the
target machine can impair bitfling. Maybe picking a smaller port
number, not much above 1024 might help??

Stephen

An unexpected exception has occurred.
Please see the help for details on what to do.

Traceback (most recent call last):
File "./bitflingscan.py", line 162, in run
res=func(*args, **kwargs)
File "./bitflingscan.py", line 66, in scan
ports=self.client.scan()
File "./bitfling/client.py", line 35, in scan
return self.server.scan()
File "./bitfling/xmlrpcstuff.py", line 429, in __call__
return self.__send(self.__name, args)
File "./bitfling/xmlrpcstuff.py", line 518, in __send
raise common.getfullname(klass)(str)
AttributeError: 'module' object has no attribute 'UpdateLists'

Variables by last 8 frames, innermost last

Frame __bootstrap in /usr/lib/python2.2/threading.py at line 414
self = <BitFlingWorkerThread(BitFling worker thread, started daemon

Frame run in ./bitflingscan.py at line 160
q = <Queue.Queue instance at 0x92f327c>
func = <bound method flinger.scan of <bitflingscan.flinger instance
kwargs = {}
res = None
self = <BitFlingWorkerThread(BitFling worker thread, started daemon
args = ()

Frame scan in ./bitflingscan.py at line 66
self = <bitflingscan.flinger instance at 0x8fae144>

Frame scan in ./bitfling/client.py at line 35
self = <bitfling.client.client instance at 0x960eac4>

Frame __call__ in ./bitfling/xmlrpcstuff.py at line 429
self = <bitfling.xmlrpcstuff._Method object at 0x971294c>
args = ()

Frame __send in ./bitfling/xmlrpcstuff.py at line 518
methodname = 'scan'
resplen = 328
self = <XML-RPC over SSH proxy for saw @ floor:12652>
args = ()
request = "<?xml version='1.0'?>\n<methodCall>\n<methodName>scan</meth
p = <xmlrpclib.ExpatParser instance at 0x9797f04>
u = <xmlrpclib.Unmarshaller instance at 0x966e4fc>
klass = 'exceptions.AttributeError'
str = "'module' object has no attribute 'UpdateLists'"
e = <Fault 17: "exceptions.AttributeError:'module' object has no
response = "<?xml version='1.0'?>\n<methodResponse>\n<fault>\n<value><s
Roger Binns
2004-04-30 03:33:29 UTC
Permalink
Post by Stephen Wood
I turned off Microsoft Internet Connection Sharing on the WinME server
machine. That helped a lot, I could read from the phone, but I had to
specify the port, browsing got an exception.
The exception is because code in bitfling calls usbscan without checking
that usb is available. (In your case it isn't). I have just committed
a fix.
Post by Stephen Wood
Perhaps we should note in the documentation that running ICS on the
target machine can impair bitfling. Maybe picking a smaller port
number, not much above 1024 might help??
Windows doesn't treat any port numbers as special. I don't know what
WinME does with ICS to confuse issues. I would imagine it does do
port blocking of some sort.

I do intend to make the Windows BitFling work with uPnP which should
go a long way. But at the end of the day BitFling is an advanced
feature and requires a bit more skill and knowledge by anyone using
it.

BTW here is upnp done in Python:

http://icepick.info/2003/09/17/upnp_example.py

Roger

Roger Binns
2004-04-28 06:23:51 UTC
Permalink
Post by Stephen Wood
Will you be able to get the comment I made about Sanyo camera downloads
in versionhistory.htd into the official build?
I won't rebuild the help for the build since that then requires
redoing the build. However after the build I will update the
website version of the help which will then have the full
details.
Post by Stephen Wood
File "guiwidgets.py", line 448, in ApplyBitFlingSettings
File "bitflingscan.py", line 126, in decode
ValueError: invalid literal for int(): <u
I will just document this and fix it for the next release. The code
has a little difficulty decoding the obfuscated password when one
hasn't been set already :-)

Other than that it seems it all works fine so I will go ahead and
release what we have.

Steven, feel free to do your Mac builds.

Roger
Steven Palm
2004-04-28 20:33:39 UTC
Permalink
Post by Roger Binns
Steven, feel free to do your Mac builds.
As time permits... I will try to at least do the basic testing already
discussed here on the Mac before I send the code off into the wild as
it were. I'm hoping sometime today to have it ready.
Tom Tracey
2004-04-28 01:47:56 UTC
Permalink
Here is the same error in Windows (XP):

An unexpected exception has occurred.

Please see the help for details on what to do.

Traceback (most recent call last):

File "gui.pyo", line 860, in OnEditSettings

File "guiwidgets.pyo", line 613, in ShowModal

File "guiwidgets.pyo", line 528, in setfromconfig

File "guiwidgets.pyo", line 448, in ApplyBitFlingSettings

File "bitflingscan.pyo", line 126, in decode

ValueError: invalid literal for int(): <u

Variables by last 8 frames, innermost last

Frame run in gui.pyo at line 349

args = (['C:\\Program Files\\BitPim\\bitpim.exe'],)

m = <gui.MainApp instance; proxy of C++ wxPyApp instance at _8e7

Frame MainLoop in wxPython\wx.pyo at line 1974

self = <gui.MainApp instance; proxy of C++ wxPyApp instance at _8e7

Frame MainLoop in wxPython\wx.pyo at line 92

_kwargs = {}

self = <gui.MainApp instance; proxy of C++ wxPyApp instance at _8e7

_args = ()

Frame OnEditSettings in gui.pyo at line 860

self = <gui.MainWindow instance; proxy of C++ wxFrame instance at _

_ = <wxPython.events.wxCommandEventPtr instance; proxy of C++ wx

Frame ShowModal in guiwidgets.pyo at line 613

self = <guiwidgets.ConfigDialog instance; proxy of C++ wxDialog ins

Frame setfromconfig in guiwidgets.pyo at line 528

self = <guiwidgets.ConfigDialog instance; proxy of C++ wxDialog ins

Frame ApplyBitFlingSettings in guiwidgets.pyo at line 448

self = <guiwidgets.ConfigDialog instance; proxy of C++ wxDialog ins

_ = None

Frame decode in bitflingscan.pyo at line 126

i = 0

res = []

str = '<unconfigured>'


"It's all about the ride..."
Tom Tracey
Puyallup, Washington
www.tomtracey.com
Proudly driving my "New" 1981 Yamaha Seca 750!

"I was made to last forever,
Though my body turn to sand,
My soul is in His hand..."
-=- Audio Adrenaline -=-
----- Original Message -----
From: "Stephen Wood" <***@genhomepage.com>
To: <bitpim-***@lists.sourceforge.net>
Sent: Tuesday, April 27, 2004 4:51 PM
Subject: Re: [Bitpim-devel] 0.7-test9
Post by Stephen Wood
Post by Roger Binns
I have uploaded Windows and Linux builds to
http://sf.net/project/showfiles.php?group_id=75211&package_id=76673&release_id=234373
Post by Stephen Wood
Post by Roger Binns
Please can you verify they work on your machines.
On Linux RH9, if I first remove my .bitpim* files, startup bitpim, go to
the Bitpim Settings panel and click the BitFling Enabled button, I get
an exception. If I click on the BitFling settings first, click OK,
there, then I don't get an exception when enabling.
Will you be able to get the comment I made about Sanyo camera downloads
in versionhistory.htd into the official build?
Stephen
An unexpected exception has occurred.
Please see the help for details on what to do.
File "guiwidgets.py", line 448, in ApplyBitFlingSettings
File "bitflingscan.py", line 126, in decode
ValueError: invalid literal for int(): <u
...
Frame decode in bitflingscan.py at line 126
i = 0
res = []
str = '<unconfigured>'
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Bitpim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
Loading...