Skip to content
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

Extend range of zigbee network using CC2531/CC2530 routers #52

Closed
james-fry opened this issue May 18, 2018 · 273 comments

Comments

Projects
None yet
@james-fry
Copy link

commented May 18, 2018

The CC2531 does not seem to have as good range as my Xiaomi hub.
Using same type of Xiaomi sensor (new generation reed switch sensor - MCCGQ11LM) I found that the CC2531 is failing to receive updates, where the Xiaomi does. Hub and CC sniffer are in same room ~1.5M apart. The reed sensors are in a room in floor below next to each other.
(Neither network has active/powered devices to act as repeater)

Is there any way to improve range?

  1. I have the dongle on a USB extension to move it away from the metal of my VM server, but I think I can use a longer extension to get further away from the metal...

  2. I can add powered device (e.g.) bulb as a repeater. Problem with this is that bulbs do get hard switched off sometimes. I dont have any zigbee sockets.

  3. There are CC2531 devices with a RF front end and external antenna with supposedly higher range.
    e.g. this one
    But these cost more + less easy to program (need to solder header) + not sure if firmware is compatible with the RFX2401C PA chip

Anything else?

@kirovilya

This comment has been minimized.

Copy link

commented May 19, 2018

Hello. I have been tested 4 types of cc253x devices as coordinator:
sticks_4
From left to right: cc2531, cc2530 with external antenna, cc2530+cc2591, cc2530+RFX2401

Three last (right) devices not different for xiaomi sensors. Because it is not listen xiaomi sensor in long range (sensor can not send long range signal).

In direct line of sight I get work sensor on ranges: 30m with cc2531 and about 50-60m with cc2530 + external antenna and also with cc2530 + range amplifieres.

https://www.youtube.com/watch?v=v6iMcxRl_Xc

@ptvoinfo

This comment has been minimized.

Copy link
Contributor

commented May 19, 2018

You may add a custom router with the external antenna (based on 2nd board from the left)
http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/
I'm using 2 routers and 1 coordinator in my rather large home (about 500 m2).

@kirovilya

This comment has been minimized.

Copy link

commented May 19, 2018

@ptvoinfo It is good news! Thank you. Can you make and share cc2531 firmware for router?

@ptvoinfo

This comment has been minimized.

Copy link
Contributor

commented May 19, 2018

@kirovilya
I can try. But why CC2531 is better than CC2530? CC2530 is cheaper and has the external antenna.

@kirovilya

This comment has been minimized.

Copy link

commented May 19, 2018

@ptvoinfo yes, but cc2531 is simplier for other users :) "plug and use"

@Koenkk Koenkk added the help wanted label May 19, 2018

@ptvoinfo

This comment has been minimized.

Copy link
Contributor

commented May 19, 2018

@kirovilya this is not simple as you think :)

  1. you need to flash a new firmware.
  2. you need to place it somewhere with a 5V power source and usually this is a hidden place. So IMHO, CC2530 is better.
    Therefore I use CC2531 as a sniffer only.
@james-fry

This comment has been minimized.

Copy link
Author

commented May 19, 2018

Plug a cc2531 with router firmware into 5v USB PSU like one of these?
https://www.amazon.co.uk/dp/B01N25761P/ref=cm_sw_r_cp_api_i_KxdaBbMNEQA2E

@dgomes

This comment has been minimized.

Copy link
Contributor

commented May 19, 2018

I would also like to get my hands on a cc2531 router firmware :)

Too easy to stick it directly to a usb mains charger behind some furniture

@james-fry

This comment has been minimized.

Copy link
Author

commented May 19, 2018

Hi @ptvoinfo
I read your blog post linked above - thx for sharing.
I notice that for the router firmware you mention that you "Pre-configured manufacturer code for Xiaomi devices."
Does this mean that the router f/w needs to be customised for the devices that will be in the network? Can it be made generic?

@ptvoinfo

This comment has been minimized.

Copy link
Contributor

commented May 20, 2018

Hi @james-fry
A generic router must be configured first using Z-Tool (set network ID, default channel, security key). From my point of view this is not an easy process.

@james-fry

This comment has been minimized.

Copy link
Author

commented May 20, 2018

Understood. With my limited understanding of zigbee, I had assumed that we'd need to pair the router with the coordinator in the same was as an end device - e.g. perhaps using one of the two ptm switches on the cc2531 sniffer to initiate pairing?. This would then set the ID/channel/key in same way as a device like the xiaomi smart sockets (which are both end device and router).
BTW I totally get that writing f/w for this is a big job, but maybe there is capability in this forum to get it working?

@james-fry

This comment has been minimized.

Copy link
Author

commented May 21, 2018

Hi @kirovilya - I noticed that your testing includes two boards with RF frontends (cc2530+cc2591, cc2530+RFX2401).
Are you aware of whether the "48 device" coordinator firmware for this project is compatible with those frontends? As I understand it the CC253x SoC has to program/control the frontend chip via GPIOs, so the f/w needs to include support. Both 2591 and RFX2401 have different requirements.
@oskarn97 - If Im correct you were the source for the f/w. Would you be able to confirm this?

Maybe we can start a list of compatible boards over and above the recommended CC2531 sniffer USB dongle?

@kirovilya

This comment has been minimized.

Copy link

commented May 21, 2018

@james-fry for cc2530 (without range amplifieres) you need firmware https://github.com/kirovilya/files/blob/master/CC2530ZNP-Pro-Secure_LinkKeyJoin.hex (but this firmware without maximum 48 devices) and for cc2530 with RF you need https://github.com/kirovilya/files/blob/master/CC2530ZNP-Test_for_CC2591.hex
(thank @oskarn97 for this firmware)

@oskarn97

This comment has been minimized.

Copy link

commented May 21, 2018

I've just increased the device limit and enabled secure link join. Apart from that I did not modify the default TI Z Stack Home.

@james-fry

This comment has been minimized.

Copy link
Author

commented May 21, 2018

Thanks for the swift replies, @kirovilya @oskarn97

So as a summary we have support for: (UPDATED)

Not supported

  • CC2531 with any RF front end (CC2591 or RFX2401)

Is this correct?

@kirovilya

This comment has been minimized.

Copy link

commented May 21, 2018

@james-fry not correct.
https://github.com/kirovilya/files/blob/master/CC2530ZNP-Test_for_CC2591.hex compatible with CC2591 and RFX2401.
I not found CC2531 with any RF. sorry, found in first post

@james-fry

This comment has been minimized.

Copy link
Author

commented May 21, 2018

@kirovilya Thanks. Updated the summary with this confirmation.
This guy is selling CC2531 + RFX2401
https://www.ebay.co.uk/itm/CC2531-RFX2401C-PA-LNA-RF-Front-End-2-4GHz-IEEE-802-15-4-ZigBee-USB-dongle/141931496878
There are a couple of versions - one also with ext antenna.

@dgomes

This comment has been minimized.

Copy link
Contributor

commented May 21, 2018

We need to make this information sticky in the Wiki :)

@kirovilya

This comment has been minimized.

Copy link

commented May 21, 2018

@dgomes I also maintain wiki in Russian. it will be possible to give a link to it as a localized resource :)

@james-fry

This comment has been minimized.

Copy link
Author

commented May 21, 2018

I'm happy to update wiki and make a PR later today.

@ptvoinfo

This comment has been minimized.

Copy link
Contributor

commented May 21, 2018

@kirovilya

CC2530 with this firmware: https://github.com/kirovilya/files/blob/master/CC2530ZNP-Pro-Secure_LinkKeyJoin.hex

What communication settings does this firmware use? What pins must be connected? I've tried 115200,8N1 pins (P02, P03, GND, 3.3V) and it does not work for me. My own firmware works.

@kirovilya

This comment has been minimized.

Copy link

commented May 21, 2018

@ptvoinfo P20 to GND

@ptvoinfo

This comment has been minimized.

Copy link
Contributor

commented May 21, 2018

@kirovilya P20 to GND: tried too.

@kirovilya

This comment has been minimized.

Copy link

commented May 21, 2018

@ptvoinfo Hmm. My connections to UART cable:
RX - P03
TX - P02
3.3v - VCC
GND - GND

and on board wire P20 to GND. Port speed 115200, but rtscts is false

What error did you receive?

@ptvoinfo

This comment has been minimized.

Copy link
Contributor

commented May 21, 2018

@kirovilya
I'm using UART TTL to USB converter. Wiring is the same (tried swap RX and TX, with/without P20). zigbee2mqtt cannot initialize CC2530. Data timeout.

@james-fry

This comment has been minimized.

Copy link
Author

commented May 21, 2018

@Koenkk - I didn't realise that wiki is not part of repo (GH noob here), so I cant edit your wiki in my fork and submit PR :(
Are you able to give me permission to update the wiki? Alternative I can message you with the wiki markup?

@kirovilya

This comment has been minimized.

Copy link

commented May 21, 2018

@ptvoinfo Very strange... Try to reboot :)
I flashed and used cc2530 many times...

@kirovilya

This comment has been minimized.

Copy link

commented May 21, 2018

@ptvoinfo may be you have CC2530 + CC2591 board ?

@kirovilya

This comment has been minimized.

Copy link

commented May 21, 2018

@ptvoinfo in case cc2530+RF i need connect P06 and P04 to GND too (do not ask me "why" :) ). may be it help in your case.

@creativtransfer

This comment has been minimized.

Copy link

commented Mar 17, 2019

You mean the SMA-socket?
I soldered it, as shown in https://hackaday.io/project/163505-cc2531-usb-adapter-antenna-mod

@tradenet

This comment has been minimized.

Copy link

commented Mar 17, 2019

@tradenet

This comment has been minimized.

Copy link

commented Mar 18, 2019

@creativtransfer

This comment has been minimized.

Copy link

commented Mar 18, 2019

I wouldn't do the wire mod. You may get loss through impedance mismatches.

@yozik04

This comment has been minimized.

Copy link

commented Mar 18, 2019

@pixeldoc2000 I will test the GBAN without the mod wires and report back.

Did you had a chance to test? Any conclusion?

@Pascal51882

This comment has been minimized.

Copy link

commented Mar 19, 2019

@creativtransfer

This comment has been minimized.

Copy link

commented Mar 19, 2019

Please forget the above linked modification! It is crap. Most likely, it'll make your signal even worse.
This wires lead to impedance mismatches and reflections. The distance between your signal line and ground/shield are vital. See e.g. https://en.wikipedia.org/wiki/Mismatch_loss

@creativtransfer

This comment has been minimized.

Copy link

commented Mar 19, 2019

Actually, I wonder why someone would want to do it this way, since the SMA-socket can be soldered directly to the stripline...

@Pascal51882

This comment has been minimized.

Copy link

commented Mar 19, 2019

How would that look?

@h4nc

This comment has been minimized.

Copy link

commented Mar 19, 2019

I agree with @creativtransfer this cable mode doesn't make sense, you already have the traces there.

The thing is that there is someone who sells these sticks (with that shitty mod) on ebay and he sold about 300 peaces (at least this is what ebay shows us).

Above I asked @Koenkk if he is ok that I sell the Stick with this mod.

So if someone isn't into soldering, I'm glad to help you with my mod stick. You can find my classified ad and pictures here:
https://www.ebay-kleinanzeigen.de/s-anzeige/zigbee-zigbee2mqtt-cc2531-mit-antenne-firmware-u-gehaeuse-aqara/1051870917-168-6273

You can PM me if you are interested in the home assistant community (same username as here). By the way if you wonder where I got the cases from. It's my own design.

You can also contact via email here: h4nc.zigbee(a)gmail.com

IMG_8733-2

@james-fry

This comment has been minimized.

Copy link
Author

commented Mar 19, 2019

Very nice effort @h4nc
Love that case in the grey and black filaments.
If I didnt go with a GBAN 2530 + RFX device I would do this mod. (in fact I will for the 2531 I am using as a router ;))
Did anyone make a comparison of this vs the 2530 + RFX devices?

@creativtransfer

This comment has been minimized.

Copy link

commented Mar 19, 2019

@Pascal51882

This comment has been minimized.

Copy link

commented Mar 19, 2019

Just have a look at the pictures from h4nc, e.g. https://i.ebayimg.com/00/s/NzY4WDEwMjQ=/z/BjUAAOSwjedcX~6B/$_57.JPG
And see how it is done at https://hackaday.io/project/163505-cc2531-usb-adapter-antenna-mod

That looks way better and easier. Can I just solder over the integrated antenna or is there something else I need to do?

@creativtransfer

This comment has been minimized.

Copy link

commented Mar 19, 2019

Apparently, you can read here, so why do you not read there as well:
https://hackaday.io/project/163505-cc2531-usb-adapter-antenna-mod
Hell, it is apparent just by looking at the images.

@tradenet

This comment has been minimized.

Copy link

commented Mar 19, 2019

I posted this device here:
#1283
I wonder if it's worth a try?

@tradenet

This comment has been minimized.

Copy link

commented Mar 19, 2019

Link in your Link is dead

I just corrected it. Here it is again.
#1283

@tradenet

This comment has been minimized.

Copy link

commented Mar 19, 2019

Odd.
Then go to the Issues tab up top and look for the topic:
Zigbee CC2531 4dBm Wireless Transceiver E18-2G4U04B ?

@bobokun

This comment has been minimized.

Copy link

commented Mar 21, 2019

Do I need a specific type of solder wire thickness? Or can I use the same solder as what I use for LEDs etc..

@tpavesi

This comment has been minimized.

Copy link

commented Apr 12, 2019

@ptvoinfo , CC2530 is 3.3V not 5V.

@ptvoinfo

This comment has been minimized.

Copy link
Contributor

commented Apr 13, 2019

@tpavesi Yes, the CC2530/CC2531 chip uses the 3.3V voltage, but 50% of boards have a builtin DC shifter and accept 5V.

@akintomide007

This comment has been minimized.

Copy link

commented Apr 13, 2019

@tpavesi

This comment has been minimized.

Copy link

commented Apr 13, 2019

@akintomide007 Do you mean as a Coordinator? or a Hub? If you want a 2530 as a coordinator, you will need to connect it to an ESP32 or connect to Raspberry Pi UART.

@bobokun

This comment has been minimized.

Copy link

commented Apr 17, 2019

I want to make sure I am doing this correctly. Do I cut the places I circled in red and solder the place I circle in blue? Thank you. https://i.imgur.com/8vavkRZ.png

@creativtransfer

This comment has been minimized.

Copy link

commented Apr 17, 2019

Basically yes. Just make sure that you cut the whole length between the traces. Don't leave any stubs.

@Pascal51882

This comment has been minimized.

Copy link

commented Apr 17, 2019

For what is the cut/solder on the left? Ground?

Edit:
It should be ground.
I tested it with my Zibee Stick and now my Link quality changed from 95 to 125 at the same position.

@bobokun

This comment has been minimized.

Copy link

commented Apr 17, 2019

How much increase did your link quality go up after the mod? Mine went from a link quality of 5 to 34 now. Am I supposed to be seeing a bigger increase?

@jerrychong25

This comment has been minimized.

Copy link

commented May 13, 2019

Hello. I have been tested 4 types of cc253x devices as coordinator:
sticks_4
From left to right: cc2531, cc2530 with external antenna, cc2530+cc2591, cc2530+RFX2401

Three last (right) devices not different for xiaomi sensors. Because it is not listen xiaomi sensor in long range (sensor can not send long range signal).

In direct line of sight I get work sensor on ranges: 30m with cc2531 and about 50-60m with cc2530 + external antenna and also with cc2530 + range amplifieres.

https://www.youtube.com/watch?v=v6iMcxRl_Xc

Thanks for nice info.

Never thought of CC2531 without external antenna could work as far as 30 metres.

@pixeldoc2000

This comment has been minimized.

Copy link
Contributor

commented May 19, 2019

@pixeldoc2000 I will test the GBAN without the mod wires and report back.

Did you had a chance to test? Any conclusion?

@yozik04
Yes, GBAN stick is running fine without mod wires and zigbee2mqtt 1.3.1 .

@yozik04

This comment has been minimized.

Copy link

commented May 19, 2019

Already checked myself. Works perfectly, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.