Giter VIP home page Giter VIP logo

cclib's People

Contributors

sjord avatar wavesoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cclib's Issues

Flashing CC2531 with approx 250 KB firmware takes 2 hours

Ping
OK
Get instruction table version
OK
INFO: Found a CC2531 chip on /dev/ttyACM0

Chip information:
      Chip ID : 0xb524
   Flash size : 256 Kb
    Page size : 2 Kb
    SRAM size : 8 Kb
          USB : Yes
Sections in CC2531ZNP-Pro-Secure_LinkKeyJoin_mod.hex:

 Addr.    Size
-------- -------------
 0x0000   8176 B
 0x1ff6   10 B
 0x3fff0   1 B
 0x2000   239616 B

This is going to ERASE and REPROGRAM the chip. Are you sure? <y/N>:  y

Flashing:
 - Chip erase...
 - Flashing 4 memory blocks...
 -> 0x0000 : 8176 bytes
    Progress 100%... OK
 -> 0x1ff6 : 10 bytes
    Progress 100%... OK
 -> 0x3fff0 : 1 bytes
    Progress 100%... OK
 -> 0x2000 : 239616 bytes
    Progress 0%...
    Progress 79%...

Each percent in final stage takes approximatelly 60 s. Is it inherent to the CC Debug protocol?

Error while running cc_info.py Python script

I have connected Arduino UNO with CCLi proxy and ran following tool :
cc_info.py
which result in following error:
ERROR: ord() expected a character, but string of length 0 found

My OS is: Ubuntu 14.04.3 LTS
Arduino recognized as /dev/ttyACM0

Please advise.

Start linear address in hex file

I have a HEX file with a 05 record type in it, start linear address:

:020000040000FA
:10000000021305022003FFFFFFFFFF02200BFFFF8B
...
:0400000500001305DF
:00000001FF

As you can see there is an instruction that tries to set the start address to 0x1305. Also, the first instruction at location 0x0000 is a LJMP to 0x1305. Currently CCLib will raise an exception because it does not support the 05 record type.

I am unsure what this record should do. I guess it should set the program counter to the specified value. Does this make sense? This would only work if using cc_resume.py, and not when resetting the chip.

showing error in __init__.py

untitled
while trying to debug the CC2541 chip from the terminal i change into the folder which is having that source files and i ran the
CC_info.py COM11
from the cmd prompt terminal. then it was showing the paranthesis error for print functions inside the source files, then i cleared all those errors now clearing all those error, one more error came like for
k,v in kwargs.iteritems():
attributeerror:'dict' object has no attribute 'iteritems'

trying to read the firmware of a cc2541 0x41.. would return all bytes as 0xFF

cc_info seems to return ok'ish data (but for the license, bt address and HW version)
Here is the output of ble_info.py What could possibly be going on? (I am asking because I presume it might be somethihg obvious I am not seeing)

INFO: Found a CC2540/41 chip on /dev/ttyUSB0

Chip information:
      Chip ID : 0x4113
   Flash size : 128 Kb
    Page size : 2 Kb
    SRAM size : 8 Kb
          USB : No

Device information:
 IEEE Address : {some hex number}
           PC : 0000

Firmware information:
      License : ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
   BT Address : ff:ff:ff:ff:ff:ff
 Hardware Ver : ff

Debug status:
 [ ] CHIP_ERASE_BUSY
 [ ] PCON_IDLE
 [X] CPU_HALTED
 [ ] PM_ACTIVE
 [ ] HALT_STATUS
 [ ] DEBUG_LOCKED
 [X] OSCILLATOR_STABLE
 [ ] STACK_OVERFLOW

Debug config:
 [ ] SOFT_POWER_MODE
 [ ] TIMERS_OFF
 [X] DMA_PAUSE
 [X] TIMER_SUSPEND

flashing TI CC2531 stick with TI Zstack ZNP firmware

Just wanted to say that I successfully flashed the CC2531 USB stick with the TI provided firmware that can be found here: https://github.com/mtornblad/zstack-1.2.2a.44539/tree/master/CC2531

I used Arduino MKR1000 board which is a 3.3V board so I just connected CC_DD_I and CC_DD_O together.
I used the "Write anywhere" branch from @Sjord #18
And I had to remove the second line from the end (:0400000500002DD0FA) because #16

However I could not flash the hex file for CC2531 from here: https://github.com/zigbeer/documents/tree/master/zigbee-shepherd
I did not debug this further because I succeeded to flash CC2531ZNP-Pro-Secure_LinkKeyJoin.hex

I also had troubles trying to flash using an 8Mhz 3.3V Pro Micro. I traced the problem to that I could not communicate reliably with the Pro Micro serial at 115200 speed.

CC2530 support

I have this CC2530 board. It seems to work with the CC254X driver. Since the CC2530 and CC2540 share one user guide, it would seem that they are totally compatible.

I used a Teensy as connector. Since it runs 3.3V, I didn't use any resistors. I short-circuited the pins CC_DD_I and CC_DD_O.

cc2530

With the CC254X driver, running cc_info.py gives this output:

INFO: Found a CC2540/41 chip on /dev/cu.usbmodem2135071

Chip information:
      Chip ID : 0xa524
   Flash size : 256 Kb
    Page size : 2 Kb
    SRAM size : 8 Kb
          USB : No

Device information:
 IEEE Address : 00124b000b0a
           PC : 0000

Debug status:
 [ ] CHIP_ERASE_BUSY
 [ ] PCON_IDLE
 [X] CPU_HALTED
 [ ] PM_ACTIVE
 [ ] HALT_STATUS
 [ ] DEBUG_LOCKED
 [X] OSCILLATOR_STABLE
 [ ] STACK_OVERFLOW

Debug config:
 [ ] SOFT_POWER_MODE
 [ ] TIMERS_OFF
 [X] DMA_PAUSE
 [X] TIMER_SUSPEND

I haven't tried running anything else yet. Do you have any suggestions on how to verify this works correctly? If I want CCLib to support the CC2530, should I make a new driver or change the 254X driver? @wavesoft, can I send you this board over the mail so you can test it?

Windows support

Hello,

Should this work on Windows? The Python script waits indefinitely upon starting it on the Arduino's serial port, before printing anything.

Clarification of use of the library and tools needed in addition to info page.

Hello,
I would like to ask a few i think simple and probably dummy questions to be sure what can I expect:

  1. The library makes the arduino CC Debugger hardware (alike) if you do not have one around and can be used as programmer/flasher for firmware files for CC2540 BT4.0 modules , and it doesn't mather what is the actual vendor of the PCB, for example can I use it to flash new firmware to HC-08 BLE module from china http://des.everbuying.net/uploads/2015/201507/heditor/201507280914003477.JPG ?
  2. If i would like to write a firmware there is a boot loader to flash, and firmware, and can I flash both with this scripts ?

I'm asking because all references are for "real" cc debugger, and i do not have one around i have bought one but it will come to me in 4 days, and i must flash a HC-08 with a specific firmware for my prototype for tomorrow otherwise someone will cut my head off because of delay.....

http://www.dfrobot.com/wiki/index.php?title=How_to_flash_a_new_CC2540_chip_with_DFRobot_BLE_service%3F

Any help and instructions will be appreciated

Cheers
:/

CC2531: Resistors issue

My issue looks pretty much as #24, however I have different target device.

My setup: CC2531 on the usb dongle, Arduino nano (tried different set of pins, I also checked they are good at both INPUT and OUTPUT).

I always get ERROR: The chip is not responding. Check your connection and/or wiring! message when target chip connected (when it's not – then I get message that chip is not found).

I also have logic analyser, so that is the image. You can see decoded exchange with computer in the bottom right. Probes are on the CC2531 side except channel 03 "data out".
screenshot 2019-01-13 at 15 55 30

Looks like CC2531 holding all the lines tied up so my arduino cannot put them down. Maybe internal pullups of CC2531 have less resistance?

Wrong flash size read if chip is DEBUG_LOCKED

Hello again.

According to the cc_info output, my CC2541 chip has 16kb flash (looks similar to #1). In the datasheet however it's stated only 128kb and 256kb versions and markings on the chip itself tell me I have 256kb.

What is recommended way to find, verify and fix the issue?

Testing CC2541

(My experience and knowledge with the topic is very limited, please be inform in advance, thanks.)

To dive into my testing environment, I did setup my board and when I do run following command:
./cc_info.py -p /dev/ttyACM0

I do see lights blinking in my Arduino UNO then light of my device(powered with CC2541 chip) blink for three times, but I don't see any output in my console, it hangs there until I press CTRL+C to exit.

I will be more than happy to act as tester for progress this great library forward. please tell me what to do and I will try to be as fast as possible to test your instructions.

Thanks!
Sid

p.s. I already read issue #1 but I think those instructions and line numbers are different by now, am I right?

Problem with CClib proxy

Hello! I have such error after ./cc_info.py -p /dev/cu.usbmodem1411

ERROR: Could not find CCLib_proxy device on port /dev/cu.usbmodem1411

I use Arduino UNO

Support for cc2640

Hi, I started to work with cc26040 but I don't have the dev kit to load the firmware on it, so I'm trying to use Arduino to do it.

СС2530 Connect problem (ChipID always 0x0)

Hi. I have a XL2530-D01 module (based CC2530 F256)

I connect the module to the Arduino as follows
wiring schema

Arduino sketch default, with pins:

int CC_RST   = 5;
int CC_DC    = 4;
int CC_DD_I  = 3;
int CC_DD_O  = 2;

And i have error (no response chip) (chip id always return 0x00)

More outputs from cc_info.py

PS D:\CCLib-master\Python> python.exe .\cc_info.py -p COM7
sendFrame #1 - 240
readFrame #1 - 1
readFrame #2 - 0
readFrame #3 - 0
readFrame #return - (0x00)
sendFrame #1 - 241
readFrame #1 - 1
readFrame #2 - 0
readFrame #3 - 1
readFrame #return - (0x01)
sendFrame #1 - 3
readFrame #1 - 2
readFrame #2 - 0
readFrame #3 - 3
readFrame #return - (0x03)
ERROR: The chip is not responding. Check your connection and/or wiring!
PS D:\CCLib-master\Python>

python 2.7 or later is asking for me to encode

when i'm trying to get the chip information by using cc_info.py through cygwin or command prompt terminal. it is telling that
unicode strings are not supported, please encode to bytes: '▒\x00\x00\x00
It is telling encode to bytes. Not able to identify what is the error happened only i'm new to the python language help me in some way.

Testing CC2531

Too bad, it seems not to work with a CC2531, neither on Mac, Raspian nor Debian.

The Dongle is found:
[ 3.273108] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[ 3.425810] usb 1-1.2: New USB device found, idVendor=0451, idProduct=16ae
[ 3.436546] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3.451040] usb 1-1.2: Product: CC2531 USB Dongle
[ 3.459365] usb 1-1.2: Manufacturer: Texas Instruments

$ python2.7 cc_info.py -p /dev/ttyACM0
ERROR: The chip is not responding. Check your connection and/or wiring!
$

The Sketch was compiled with Arduino IDE 1.0.5.

TX+RX just flashes shortly on the Leonardo (the internal LED does not) and then the Error Message appears in the Terminal. Nothing more.

How can I help ?

support for CC2530

I think your studies is contain CC2530 support because i saw that Chip-specific code for CC253X and CC2540/41 SOC on cc254x.py file. I changed name of file and class as cc2530 for working with cc2530. then I registered this class on ccdebugger.py file.
I know cc2540/41 commands and cc2530 commands are same (only ieee address is different). When i run cc_info.py it giving error :

Could not find CCLib_proxy device on port /dev/ttyUSB0

How can we solve it, i want to add it to here ?

CC2531 license

I have a CC2531 stick and I managed to flash it with a LinkJoin firmware but wanted to reflash it with something ProSecure only. Now I have a problem with the flasher asking for a license key.
So I have made up one but I get a following error now:
image
What can I do to make it work?

ERROR: Could not detect a CCLib_proxy connected on any serial port

Hello,

I'm trying to run cc_info.py for CC2531, but it seems on windows is not connecting to Arduino board (I'm using an Arduino Uno) and I get the following error: ERROR: Could not detect a CCLib_proxy connected on any serial port without any serial led blinks, and if I'm trying from Raspberry it gets stuck and I have to abort the script but in the beginning communicates for a second with Arduino board. Do you know a solution for this problem?

Thank you!

Suggestion to change cc_delay to make it MCU speed agnostic

It seems like the cc_delay function is heavily dependent on MCU speed, thus the timing on the CC interface won't be valid for faster MCUs. I suggest to change the function to take the MCU speed into account or use Arduino delay functions.

Any input?

support for CC2451 ?

I spent a good amount of time doing all the wiring only to find out this is not compatible with the CC2451 :-(

would it be too difficult to support it ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.