New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after setting config to ISO14443A_READER, config cannot be changed via python #20

Closed
cons0l3 opened this Issue Oct 8, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@cons0l3
Contributor

cons0l3 commented Oct 8, 2016

~> python3 chamtool.py -v -p /dev/ttyACM0 -c ISO14443A_SNIFF
[2016-10-08 20:37:36.060585] Opening serial port /dev/ttyACM0 succeeded
[2016-10-08 20:37:36.064505] Executing <VERSION?>: 101:OK WITH TEXT
[2016-10-08 20:37:36.175404] Executing <CONFIG=?>: 101:OK WITH TEXT
[2016-10-08 20:37:36.182485] Response: NONE,MF_ULTRALIGHT,MF_CLASSIC_1K,MF_CLASSIC_1K_7B,MF_CLASSIC_4K,MF_CLASSIC_4K_7B,ISO14443A_SNIFF,ISO14443A_READER
Traceback (most recent call last):
File "chamtool.py", line 205, in
main()
File "chamtool.py", line 186, in main
result = cmdFuncs[cmd](chameleon, arg)
File "chamtool.py", line 44, in cmdConfig
result = chameleon.cmdConfig(arg)
File "/root/ChameleonMini.git/Software/Chameleon/Device.py", line 230, in cmdConfig
return self.getSetCmd(self.COMMAND_CONFIG, newConfig)
File "/root/ChameleonMini.git/Software/Chameleon/Device.py", line 177, in getSetCmd
return self.writeCmd("{}{}{}".format(cmd, self.SET_CHAR, arg))
File "/root/ChameleonMini.git/Software/Chameleon/Device.py", line 126, in writeCmd
status = self.serial.readline().decode('ascii').rstrip()
UnicodeDecodeError: 'ascii' codec can't decode byte 0x99 in position 3: ordinal not in range(128)

working in minicom --device /dev/ttyACM0 and typing "CONFIG=NONE" I receive:
..+RNONE100:OK
or
..�.NONE100:OK

Working in minicom or via python actual sets the new config correctly. Only the additional characters in the response are messy.

The Chamleon response with four byte addtional values. They change every call to CONFIG=XXX. It does not matter which config is choosen.

chamtool.py can of course skip those additional lines, but I guess it is something in the firmware...

@david-oswald david-oswald added the bug label Oct 9, 2016

@david-oswald

This comment has been minimized.

Show comment
Hide comment
@david-oswald

david-oswald Oct 9, 2016

Collaborator

Please note that chamtool is still work-in-progress, so not expected to work without problems. Will be fixed over the coming weeks.

Collaborator

david-oswald commented Oct 9, 2016

Please note that chamtool is still work-in-progress, so not expected to work without problems. Will be fixed over the coming weeks.

@dev-zzo

This comment has been minimized.

Show comment
Hide comment
@dev-zzo

dev-zzo Oct 12, 2016

Contributor

@cons0l3: Judging by the output you provided... Please verify you don't have log functionality enabled to log to the screen; use LOGMODE? to check that and LOGMODE=OFF to turn logging off, see the documentation for more details. Let us know if that helped.

Contributor

dev-zzo commented Oct 12, 2016

@cons0l3: Judging by the output you provided... Please verify you don't have log functionality enabled to log to the screen; use LOGMODE? to check that and LOGMODE=OFF to turn logging off, see the documentation for more details. Let us know if that helped.

@cons0l3

This comment has been minimized.

Show comment
Hide comment
@cons0l3

cons0l3 Oct 12, 2016

Contributor

yes, LOGMODE=OFF to the rescue. No more garbeld output during chamtool.py or directly. I read in the doc that LOGMODE=OFF is the default, but do not remember ever have touched the LOGMODE setting up to this point.

see #24 I offer to change the chamtool.py to not assume LOGMODE=OFF or MEM

Contributor

cons0l3 commented Oct 12, 2016

yes, LOGMODE=OFF to the rescue. No more garbeld output during chamtool.py or directly. I read in the doc that LOGMODE=OFF is the default, but do not remember ever have touched the LOGMODE setting up to this point.

see #24 I offer to change the chamtool.py to not assume LOGMODE=OFF or MEM

@cons0l3 cons0l3 closed this Oct 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment