?

Log in

No account? Create an account
recent stories superwonderfulous peoples pick a day, any day! who, me? go back in time! go back in time! move boldly ahead! move boldly ahead!
Python help, please!! - Ldy, the lemony, ligerish ducttaparian's Magic Treehouse of Lost Thoughts
A classy broad's life... with footnotes.
ldy
ldy
Python help, please!!
14 tall tales or Tell me a story
Comments
From: (Anonymous) Date: January 9th, 2010 02:45 am (UTC) (permalink)
HI. I have a bodybugg and am trying to clear the data using the hack.

I'm having the same problem with the program not being about to open the COM port.

Have you found an answer?

Good luck.
From: (Anonymous) Date: March 6th, 2010 08:22 pm (UTC) (permalink)
repost from the bmhack blog:

To fix the Access Denied problem:

in the script, right before
ser.open()

add this:

ser.close()

The script will look like this:

def OpenSerial(fname="/dev/ttyUSB0"):
ser=serial.Serial(fname,baudrate=921600,timeout=.01)
ser.close()
ser.open()

Works on Win7 64bit Ultimate... Didn't have to do this on Vista 64bit.
ldy From: ldy Date: March 28th, 2010 10:22 pm (UTC) (permalink)
Well, it did clear up the Access Denied issue. Now if it could only find the file... (sigh!)

THIS CODE IS DECLARED BY THE AUTHOR TO BE IN THE PUBLIC DOMAIN.
NO WARRANTY EXPRESSED OR IMPLIED OF ANY KIND IS PROVIDED.
Traceback (most recent call last):
File "C:\python26\scripts\bmhack-z718b.py", line 1180, in
sys.exit(main())
File "C:\python26\scripts\bmhack-z718b.py", line 1101, in main
ser = OpenSerial(dopts["--fromSerial"])
File "C:\python26\scripts\bmhack-z718b.py", line 87, in OpenSerial
ser=serial.Serial(fname,baudrate=921600,timeout=.01)
File "C:\python26\lib\site-packages\serial\serialutil.py", line 192, in __init
__
self.open()
File "C:\python26\lib\site-packages\serial\serialwin32.py", line 53, in open
raise SerialException("could not open port %s: %s" % (self.portstr, ctypes.W
inError()))
serial.serialutil.SerialException: could not open port COM7:: [Error 2] The syst
em cannot find the file specified.
ldy From: ldy Date: March 28th, 2010 10:27 pm (UTC) (permalink)
HA! I'm a dork. It assigned it a different COM port this time and I just didn't notice. Works with the fix (and the correct COM port!) :D
14 tall tales or Tell me a story