Giter VIP home page Giter VIP logo

Comments (48)

stheine avatar stheine commented on May 11, 2024 16

@ago19800

Sorry I didn't understand what to do.
Can you explain me better

After cloning the repo, edit CCDebugger.c, modify the line 177

static int cc_delay_mult=50;

into

static int cc_delay_mult=80;

and the line 83

  cc_delay_calibrate();

into

//  cc_delay_calibrate();

save the file and call make to rebuild the binaries.
call cc_chipid and see if it responds with b522.
If not, you might have to repeat the above, setting the new value from 80 to 90 or any other number (in my case, the calculated value was 29, so I tried the values 30/40/50/60/70/80/90 until it finally worked). after each modification of the number, don't forget to call make to rebuild the binaries.

from flash_cc2531.

tykarol avatar tykarol commented on May 11, 2024 10

I went around this problem using the "-m" parameter:

./cc_checkid -m 90
./cc_erase -m 90
./cc_write -m 90 xxx.hex

Maybe it will help someone else :)

from flash_cc2531.

ago19800 avatar ago19800 commented on May 11, 2024 6

@ago19800

Sorry I didn't understand what to do.
Can you explain me better

After cloning the repo, edit CCDebugger.c, modify the line 177

static int cc_delay_mult=50;

into

static int cc_delay_mult=80;

and the line 83

  cc_delay_calibrate();

into

//  cc_delay_calibrate();

save the file and call make to rebuild the binaries.
call cc_chipid and see if it responds with b522.
If not, you might have to repeat the above, setting the new value from 80 to 90 or any other number (in my case, the calculated value was 29, so I tried the values 30/40/50/60/70/80/90 until it finally worked). after each modification of the number, don't forget to call make to rebuild the binaries.

Thanks it works :)

from flash_cc2531.

AbaloneIron avatar AbaloneIron commented on May 11, 2024 5

And don't be a dumb-ass like me. If you have an older Raspberry Pi, and don't have 40 pin bus, the defaults won't work. Do a "gpio readall" to see what you are working with, move some connections around to valid gpio's and use some of the switches that are available to the command. This worked for me when I got connected to my satisfaction: ./cc_chipid -r 2 -c 5 -d 4

Hope this makes sense.

from flash_cc2531.

konyee avatar konyee commented on May 11, 2024 4

I had same issue. Workaround: remove cc_delay_calibrate() from cc_init() an set cc_delay_mult=80. make it. after cc_chipid you should read ID=b522. Tested with rpi3b

from flash_cc2531.

Jtef avatar Jtef commented on May 11, 2024 3

I managed to successfully connect after I updated wiringpi as @geertmeersman indicated for Raspberry Pi 4.
Cheers!

from flash_cc2531.

ago19800 avatar ago19800 commented on May 11, 2024 1

IMG_20191125_151406_802
Uploading IMG_20191125_151138_373.jpg…

from flash_cc2531.

grigio avatar grigio commented on May 11, 2024 1

For me the problem of ID = 0000. was the Raspberry Pi Model B Rev 2.

I've used the esp8266 and it worked immediatly with the same wiring with this path https://www.zigbee2mqtt.io/information/alternative_flashing_methods.html#via-arduino-unoesp8266-with-ccloader-3hrs

from flash_cc2531.

geertmeersman avatar geertmeersman commented on May 11, 2024 1

For the ones with a Raspberry Pi 4:
Install the latest version of wiringpi =>
cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb

from flash_cc2531.

eric-void avatar eric-void commented on May 11, 2024

I've the same issue. Found a solution?

from flash_cc2531.

imdos avatar imdos commented on May 11, 2024

Yes, just flashed it with smartFR and the debugger without problems. Haven't bothered further to be honest.

from flash_cc2531.

FF-Fox avatar FF-Fox commented on May 11, 2024

I had the same issue, this was the dmesg output:

[    3.353374] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[    3.505494] usb 1-1.2: New USB device found, idVendor=0451, idProduct=16ae, bcdDevice=45.00
[    3.520837] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.531805] usb 1-1.2: Product: CC2531 USB Dongle

I couldn't get it to work with flash_cc2531 no matter what. Since I didn't have a CCdebugger and didn't want to wait for one to arrive, I took a different approach. I did have an arduino Nano laying around, on a breadboard. So I just swapped the jumper cables from the rpi to the breadboard and used CCLoader. This is the result of dmesg after the flash:

[    3.353358] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[    3.508948] usb 1-1.2: New USB device found, idVendor=0451, idProduct=16a8, bcdDevice= 0.09
[    3.524062] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.534956] usb 1-1.2: Product: TI CC2531 USB CDC

And now it works with Zigbee2MQTT.

So, not really a solution for this problem, but another workaround if you don't have a CCdebugger but an arduino at your disposal.

from flash_cc2531.

ago19800 avatar ago19800 commented on May 11, 2024

Hi I flashed with ccloader it seems to me all went well, but when I connect cc2531 to the raspberry is not recognized, advice?
Thanks

from flash_cc2531.

AlmightyFrog avatar AlmightyFrog commented on May 11, 2024

Not sure If suggestion of @konyee did help me or not. I had issue that ID by cc_chipid was always ffff.

After changing @konyee sugestion I got at least different readings.
Mostly ID = b522, but sometimes also ID = 0088 and ID = 0000.

I just anyhow tried cc_write and it seemed to work flash correctly (at least it told verify successful). Also device is now recognized as USB ACM device and as per zigbee2mqtt it contains firmware of zStack with revision 20190608 which is just what I tried to flash.

from flash_cc2531.

ago19800 avatar ago19800 commented on May 11, 2024

I had same issue. Workaround: remove cc_delay_calibrate() from cc_init() an set cc_delay_mult=80. make it. after cc_chipid you should read ID=b522. Tested with rpi3b

Sorry I didn't understand what to do.
Can you explain me better
Thanks

from flash_cc2531.

stheine avatar stheine commented on May 11, 2024

I had same issue. Workaround: remove cc_delay_calibrate() from cc_init() an set cc_delay_mult=80. make it. after cc_chipid you should read ID=b522. Tested with rpi3b

Thanks for that info. In My case I had to set cc_delay_mult=90 until cc_chipid finally responded with b522, but then I successfully flashed.

from flash_cc2531.

ThePatcher80 avatar ThePatcher80 commented on May 11, 2024

and how i do that?
don't forget to call make to rebuild the binaries.

from flash_cc2531.

ago19800 avatar ago19800 commented on May 11, 2024

and how i do that?
don't forget to call make to rebuild the binaries.

You have to give only make. Stop

from flash_cc2531.

JonSilver avatar JonSilver commented on May 11, 2024

I had same issue. Workaround: remove cc_delay_calibrate() from cc_init() an set cc_delay_mult=80. make it. after cc_chipid you should read ID=b522. Tested with rpi3b

This fix worked for me as well. I have 2 CC2531 USB boards with an external SMA antenna, and 2 with a PCB trace antenna. Before the fix, the SMA antenna boards were recognised fine, and could be programmed and verified. But the PCB trace antenna boards could not, having chip ID ffff.

After the fix, all the boards could be recognised, erased, written and verified.

@jmichault Can this fix not just be incorporated into the code so users don't need to hack and make?

from flash_cc2531.

jmichault avatar jmichault commented on May 11, 2024

The last release has increased delays for better stability and a new command line option to force the multiplier delay : -m .
Can you try this ? For example:
./cc_write -m 100 FILE_TO_FLASH.hex

from flash_cc2531.

kornykorn avatar kornykorn commented on May 11, 2024

I'm having the same issue on a pi 3b+ (with openhabian, also tried with raspbian).

Using the standard- settings, I receive ID 1fff, 3fff, 7fff or something simillar (xfff).
I changed the code like suggested (removed the calibrate-call) and tried delay-mult values from 0 to 300 - without succes.
low values lead to random IDs (most of the time eding with one or 2 times f, like xxff), mid-range values (roughly 20 to 150) to ID's like initially, and high values to ffff.

I also re-checked the wiring a couple of times, but this looks all good (soldered wires, roughly 30cm long).

Does anybody have an Idea?

Thanks!

EDIT, 17.1.2019:
Found the issue, I had a broken wire. Now everything works like expected (Pi 3B+, Openhabian)

from flash_cc2531.

grigio avatar grigio commented on May 11, 2024

Tried #9 (comment) with Raspberry Pi Model B Rev 2 but I always get ID = 0000.

[    2.262963] usb 1-1.2: Product: CC2531 USB Dongle
[    2.262973] usb 1-1.2: Manufacturer: Texas Instrument

from flash_cc2531.

oscarlinux avatar oscarlinux commented on May 11, 2024

@ago19800

Sorry I didn't understand what to do.
Can you explain me better

After cloning the repo, edit CCDebugger.c, modify the line 177

static int cc_delay_mult=50;

into

static int cc_delay_mult=80;

and the line 83

  cc_delay_calibrate();

into

//  cc_delay_calibrate();

save the file and call make to rebuild the binaries.
call cc_chipid and see if it responds with b522.
If not, you might have to repeat the above, setting the new value from 80 to 90 or any other number (in my case, the calculated value was 29, so I tried the values 30/40/50/60/70/80/90 until it finally worked). after each modification of the number, don't forget to call make to rebuild the binaries.

Thanks this worked for me!

from flash_cc2531.

gladius7 avatar gladius7 commented on May 11, 2024

When entering the command:
./cc_chipid
  gives me
./cc_chipid: error while loading shared libraries: libwiringPi.so: cannot open shared object file: No such file or directory
though
git clone https://github.com/jmichault/flash_cc2531.git
set and transition I do
cd flash_cc2531
Can anyone help?
cc2531a

from flash_cc2531.

magostinelli avatar magostinelli commented on May 11, 2024

@gladius7 sudo apt-get install wiringpi

from flash_cc2531.

Equidamoid avatar Equidamoid commented on May 11, 2024

Had the same problem, cc_chipid was giving either 0000 or ffff. Proposed changes in CCDebugger.c did nothing.

Solved by bending the pins on the board and using combination of slightly mangled dupont connectors and pieces of paper for isolation.

First flashing gave 5 errors, second one succeeded.

from flash_cc2531.

ljan avatar ljan commented on May 11, 2024

@tykarol this should be in the tutorial! Thanks a lot

from flash_cc2531.

gtb08177 avatar gtb08177 commented on May 11, 2024

Solved by bending the pins on the board and using combination of slightly mangled dupont connectors and pieces of paper for isolation.

Hey @Equidamoid , I am seeing the same as you - could you go into a little bit more detail on the bending of pins and paper isolation? My depont cables seem to fit nicely but curious to the isolation piece.

Thanks

from flash_cc2531.

Equidamoid avatar Equidamoid commented on May 11, 2024

from flash_cc2531.

moskovskiy82 avatar moskovskiy82 commented on May 11, 2024

Increasing the value to 90 from default 80 helped!!!
Thanx. I believe this should be included in the zigbee2mqtt page

usb 1-1.3: New USB device found, idVendor=0451, idProduct=16ae, bcdDevice=45.00

from flash_cc2531.

DrDOIS avatar DrDOIS commented on May 11, 2024

I had the same issues, getting IDs like 1fff, 3fff and 7fff. In the end the issue was my assumption about the order of pins, which I counted like those of a MC (counter clockwise). Make sure you count them like on the Raspberry (There is even a 10 at Pin 10 which I read as IO).

from flash_cc2531.

Kamilake avatar Kamilake commented on May 11, 2024

image
image
Thank you very much! I completely solved the problem.
Set the value of cc_delay_mult to 500.

from flash_cc2531.

lslomczynski avatar lslomczynski commented on May 11, 2024

Hello everyone!

Just wanted to say:

  • Thank you for providing your solutions!
  • For mine CC2531 with external antenna the proper value of cc_delay_mult was 110 :-)

from flash_cc2531.

lnarolski avatar lnarolski commented on May 11, 2024

In my case programming started working after changing from Raspberry Pi 4B to Raspberry Pi 3B and using the solution above (i had to set cc_delay_mult to 90)

from flash_cc2531.

wang70880 avatar wang70880 commented on May 11, 2024

Previously I also failed to get the correct ID. After several trials and errors, I found that I connected the debug port in the wrong direction. Hope this can help someone.

from flash_cc2531.

theshooter1844 avatar theshooter1844 commented on May 11, 2024

And don't be a dumb-ass like me. If you have an older Raspberry Pi, and don't have 40 pin bus, the defaults won't work. Do a "gpio readall" to see what you are working with, move some connections around to valid gpio's and use some of the switches that are available to the command. This worked for me when I got connected to my satisfaction: ./cc_chipid -r 2 -c 5 -d 4

Hope this makes sense.

Thank you so much. This saved me hours. I can confirm that RPi Model B Rev 2 doesn't use all the GPIO pins. With "gpio readall" I found out what pins were working, used the same ones: ./cc_chipid -r 2 -c 5 -d 4 connecting on the GPIO to pin13 (RST), pin18 (DC) and pin16 (DD). And got it finally to "flash OK".

from flash_cc2531.

 avatar commented on May 11, 2024

0000 and ffff with pi3 and default wires
34CBB229-8964-4237-96C6-E4968B5FAA7C

from flash_cc2531.

philipp2310 avatar philipp2310 commented on May 11, 2024

0000 and ffff with pi3 and default wires
34CBB229-8964-4237-96C6-E4968B5FAA7C

to be honest I would say, you just short the pins with your setup

from flash_cc2531.

topche avatar topche commented on May 11, 2024

I have some issue here.
I did change
static int cc_delay_mult=110;
and
// cc_delay_calibrate();
make it again
and still have ID=0000

check the wiring and it is fine:

https://photos.app.goo.gl/vmNmipNFFUEqo5KV8

any ideas ?

from flash_cc2531.

jmichault avatar jmichault commented on May 11, 2024

On your photos, i have the impression you have connected 1,5,6 and 7 instead of 1,3,4 and 7 ?

broche GPIO broche CC
39 ( GND ) 1 ( GND )
36 ( wPi 27, BCM16 ) 3 ( DC )
38 ( wPi 28, BCM20 ) 4 ( DD )
35 ( wPi 24, BCM19 ) 7 ( reset )

from flash_cc2531.

topche avatar topche commented on May 11, 2024

On your photos, i have the impression you have connected 1,5,6 and 7 instead of 1,3,4 and 7 ?

broche GPIO broche CC
39 ( GND ) 1 ( GND )
36 ( wPi 27, BCM16 ) 3 ( DC )
38 ( wPi 28, BCM20 ) 4 ( DD )
35 ( wPi 24, BCM19 ) 7 ( reset )

You have correct impression :)

I lost my patience and did it with NodeMCU the flashing. Was success. All works now.

from flash_cc2531.

duceduc avatar duceduc commented on May 11, 2024

Finally got it working. I was about to throw in the towel.
My issue was the power. Followed the guide on zigbee2mqtt site suggesting an option to power the CC2531 board using the rpi zero gpio pin. After changing so many mult #s. It always show 000. Then, I plug the CC2531 board in an outlet for power and it finally output b524.

Success:
2021-05-19_9-42-51

from flash_cc2531.

gumslone avatar gumslone commented on May 11, 2024

I successfully received the chip id with this command:

./cc_chipid -m 100

with simple ./cc_chipid I always received fffff

from flash_cc2531.

stale avatar stale commented on May 11, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from flash_cc2531.

NeOdYmS avatar NeOdYmS commented on May 11, 2024

I had same issue. Workaround: remove cc_delay_calibrate() from cc_init() an set cc_delay_mult=80. make it. after cc_chipid you should read ID=b522. Tested with rpi3b

It worked for me
I edited CCDebugger.c

juste removed cc_delay_calibrate(); line

and did a $ make

Thanks a lot 🙏

from flash_cc2531.

Oddiwahn avatar Oddiwahn commented on May 11, 2024

Worked for me on an OrangePI zero.
This helped me: https://jmichault.github.io/flash_cc2531-dok/de/

What I did:

  1. get WiringPI for the OrangePI http://www.orangepi.org/Docs/WiringPi.html
  2. I connected RESET to PIN 3, DC to PIN 5 and DD to PIN 7
  3. I had to run ./cc_chipid which gave me "fffff"
  4. Then I ran ./cc_chipid -r 0 -c 1 -d 2 -m 1 which gave me "b524"
  5. repeating step 4 resulted in "ffff" again, I had to run step 3 frist, then step 4 worked
  6. Also I ran step 3 before erasing and flashing (also with arguments -r 0 -c 1 -d 2 -m 1)

Chris

from flash_cc2531.

ahlininv avatar ahlininv commented on May 11, 2024

Absolute and strongest thanx for @duceduc #9 (comment)

I've never heard that we have to plug the stick in usb
When you are not connected you have 0000 if timeout is small and linear growing up to ffff when you make timeout greater.
When you plug it in - you get ID right

from flash_cc2531.

slavb18 avatar slavb18 commented on May 11, 2024

My device ID = b523.

Worked using ./cc_write -m 500 CC2531ZNP-Prod.hex, may be it can help someone

from flash_cc2531.

Related Issues (20)

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.