Close

Hardware and software issues

A project log for MeshPoint - wifi router for humanitarian crisis

Autonomous, smart, wifi mesh router which is easy to use by humanitarian NGO first responders during humanitarian or natural disasters.

Robert MarkoRobert Marko 10/20/2017 at 22:300 Comments

Since we are a small team and our resources are limited we currently do not design and manufacture WiFi router boards used in MeshPoint. We hope to design and manufacture our own boards in future. That way we will not depend on vendors who usually release a new revision of their products every year or sometimes even more often. Although devices still have the same product name and look the same hardware and software they use is often completely different.

We are currently using TP-Link CPE210 v1 boards in current MeshPoint version. Unfortunately TP-Link discounted v1 of CPE210 couple of months ago and currently, v1 is not available at all and only v2 can be purchased. That poses a big issue to us since v2 of CPE210 brings completely new hardware and unfortunately second RJ45 port was removed.
Since hardware has completely changed there was no existing support for LEDE we use as the operating system for MeshPoint. So the only solution was to work on supporting CPE210 v2 by us and the community.
After a couple of weeks of intensive work done by us and the LEDE community finally, we have a working version of LEDE for CPE210 v2.
Most of the time spent in development was due to unusual hardware design in which TP-Link did not use registers that usually tell bootloader what frequency to run CPU, RAM and reference clock. So values passed from bootloader were not correct and since LEDE uses those values to set correct clocks completely wrong values were set and the device will refuse to boot. That was eventually bypassed by having LEDE calculate clocks in the same way as stock firmware.

After that was solved serial also started working and from there development process was the same as for any other Atheros powered device.

We are still testing and fixing bugs as we find them but we expect that official support will also land in LEDE soon.

We also may have a temporary solution in form of CPE220 v2 which uses the same hardware as CPE210 v1, so we will investigate that solution also.

CPE210 v2 PCB:

Bootlog from a working LEDE image on CPE210 v2 can be seen here:

GitHubGist

Source code for CPE210 v2 can be seen here:

GitHub

And for those not interested in whole source a small snippet of code that powers  RJ45 port of CPE210

    ath79_register_mdio(0, 0x0);
    ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
    ath79_eth0_data.duplex = DUPLEX_FULL;
    ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
    ath79_eth0_data.speed = SPEED_100;
    ath79_eth0_data.phy_mask = BIT(4);
    ath79_register_eth(0);
    ath79_register_wmac(ee, mac);

Discussions