frame

Registration of Flip & Click SAM3X fails

Hello everyone!

I start this discussion as I am not sure if the Zerynth problem I have got is the same like the one with viperize...
I bought a Flick & Click SAM3X at MikroElektronika with a Zerynth VM.
I followed the instructions on this site to connect it to Zerynth Studio:
https://docs.zerynth.com/latest/official/board.zerynth.flipnclick_sam3x/docs/index.html#connect-register-virtualize-and-program
I downloadet the driver via the arduino IDE and then started Zerynth Studio. Selecting the device works fine but registration terminates with this error message:
[info] Starting device registration
[info] Burning bootloader...
Traceback (most recent call last):
  File "C:\Users\ma\zerynth2\dist\r2.0.10\ztc\ztc.py", line 111, in 
    cli()
  File "C:\Users\ma\zerynth2\sys\python\lib\site-packages\click\core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\ma\zerynth2\sys\python\lib\site-packages\click\core.py", line 696, in main
    rv = self.invoke(ctx)
  File "C:\Users\ma\zerynth2\sys\python\lib\site-packages\click\core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\ma\zerynth2\sys\python\lib\site-packages\click\core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\ma\zerynth2\sys\python\lib\site-packages\click\core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\ma\zerynth2\sys\python\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\ma\zerynth2\dist\r2.0.10\ztc\devices\devcmd.py", line 251, in register
    res,out = tgt.burn(bytearray(base64.standard_b64decode(reg["bin"])),info)
  File "C:\Users\ma\zerynth2\dist\r2.0.10\devices\flipnclick_sam3x\flipnclick_sam3x.py", line 21, in burn
    proc.runcmd("stty",str(self.port)+":1200,n,8,1")
  File "C:\Users\ma\zerynth2\dist\r2.0.10\ztc\base\proc.py", line 27, in runcmd
    return self.run(cmdval,*args,outfn=outfn)
  File "C:\Users\ma\zerynth2\dist\r2.0.10\ztc\base\proc.py", line 47, in run
    for line in p.stdout:
  File "C:\Users\ma\zerynth2\sys\python\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 265: character maps to

My computer runs with Microsoft Windows 7 Professional 64bit.
I hope I provided every necessary information and somebody is able to help me or has at least some ideas.

Max

Comments

  • Max Member
    Ok, a small update:
    I added a print(input) in the cp1252.py. This resulted in the following output in zerynth:

    b'\r'
    b'\nStatus von Ger\x84t COM28:\r\n-----------------------\r\n    Baudrate:        1200\r\n    Parit\x84t:         None\r\n    Datenbits:       8\r\n    Stoppbits:       1\r\n    Timeout:       OFF\r\n    XON/XOFF:        OFF\r\n    CTS-Handshaking: OFF\r\n    DSR-Handshaking: OFF\r\n    DSR-Pr\x81fung:     OFF\r\n    DTR-Signal:      ON\r\n    RTS-Signal:      ON\r\n\r\n'

    As I use a german OS it seems like the problem, at some point, stems from the language settings?
    And how can I change my settings to make it work?

  • Hi Max,

    this is a very weird behavior; honestly, in german language, I never test it but you can do the following checks:
     - you can install English language and try again (here a simple step by step tutorial);
     - you can check if the device is correctly recognized by your system (or from the windows device manager or by clicking the 'i' button of the Zerynth Studio); if your drivers are correctly installed you should see a serial COM* port;
     - lastly, if the registration phase does not work, you have to press the onboard erase button and try again.

    In the log line you post, the problem seems to come from 0x81 char that, in ASCII table, is an extended char.
    Let me know if this can help you :)
    Matteo Cipriani
    Zerynth Support Team
  • Max Member
    Hey Matteo!

    Thanks for your answer!
    As changing the language for our Windows is not an option, I changed to Ubuntu where I can edit everything as I like.

    With Windows 7 I checked if the device is identified correctly and it was.
    And the last part with the erase button is a good thing to know.... I'll try if it works with windows later...


    Yes, it seems like the 0x81 is the problem. Side issue: Why do these information have to be decoded? And can I change something in the decoding to make it work?

    After making zerynth work with ubuntu and installing the drivers the registration works, but the ports' names look rather confusing (I am not used to working with ubuntu). It says the port is  /dev/ttyACM0

    But at least the registration works.

    But now, the next problem is the virtualisation with ubuntu.
    The virtualisation fails with this message:

    [error] Error in virtualization Auto scan for device failed
    Try specifying a serial port with the '-p' option

    (and I started the virtualisation right after the registration and creation of the VM)

    Do I have to open a new discussion for this?

    Max
  • Max Member
    never mind. I found the solution with the erase button.
Sign In or Register to comment.

ZERYNTH Community

@ 2016 Zerynth.com, all rights reserved.