Closed winterland1989 closed 10 years ago
You might want to have a look at Dragino (http://www.dragino.com/products/mother-board.html). They are based in Shenzhen and have produced a general IoT board based on the AR9331.
Yeah, i have read about this kind of platform, but not any of them suit the purpose, for exmaple, Dragino is actually a router running openwrt, it's too big, Arduino Yun is closed to what i want but the functionality is too limited and price is too high, what i want achieved is a easily customized platform with low price.
For example, you can write python scripts and webpages and save them to the flash chip through web interface or software, to achieve this goal. maybe a deep modification to openwrt flash layout is needed(or maybe not?).
There are lots of details i want to discuss with you guys, include hardware and software structrue, and i really need some help, any suggestion are welcomed.
Hi winterland1989,
Dragino 2 (with M32 module) and Arduino Yun are, from hardware point of view, the same platforms (Atheros AR9331 + ATmega). The difference are the final shape of the platform and market target (Dragino 2 is a "final product", with enclosure, power supply... Yun is, like other Arduino boards, just an another block for DIY project).
Arduino Yun is closed to what i want but the functionality is too limited and price is too high, what i want achieved is a easily customized platform with low price.
Why do you think that Yun has too limited functionality? IMHO, taking into account availability of the different Arduino Shields, it has almost unlimited possibilities. The price... you don't pay only for a hardware, but also for great software support and further community evolution/growth.
BTW. Have a look also at Carambola 2 product (http://8devices.com/carambola-2). Not so long ago, manufacturer has released information about new board, which will be... 100% compatible with Arduino Yun software: http://8devices.com/community/viewtopic.php?f=3&t=685.
Regards, Piotr
Hi pepe2k: Thanks for you reply, First let me explain the issues i have come across, during last project, my team tried to build a wifi-enable plant factory, we want to customize the setting webpage instead Arduino Yun's setting page, and we rebuild the openwrt rootfs to get the job done. I am looking for an easier way doing this, but none of existing product solve the problem. IMHO most of the existing product simply recompile openwrt for their hardware, Arduino Yun is an exception that it add bridge package to communicate with AVR controller, but it's still not come close to what i need. The webpage customization is just one example, let me show you what's the platform i'm trying building:
1. Modify system content
It's possible to upload webpages and scripts to openwrt board and write them to flash, but the tools doing this is suck, and the process is complicated. Maybe we can split the flash layout and leave a fixed space for customized content(webpage, pictures, scripts...etc) and develop a tool to manage them.
2. Python environment
It's obvious that you get a python environment on Arduino Yun, but you do your programming work in C++ with an AVR micro controller, in my opinion this is not the right way to do some job like web server or fetching some steam, since we develop a tool to manage system content. We can easily upload python scripts to do this job.
3. Micro Controller as accessory
Linux is not suitable to do real-time control, but real-time is not alway needed, sometime use python to toggle GPIO and steam a webcam is enough, use micro controller as a accessory to do some real-time control and interfacing work, communicate with linux through serial port.
So basically i'm try to fork openwrt into something special for geeks.
Hi winterland1989,
The problem is always about choosing the right tools for the job, but I don't think that forking whole OpenWrt project is the right way to do what you want. Take Carambola 2 project as an example. They, the 8devices company/team, made a hardware, but decided also to run their own repository with dedicated version of OpenWrt for Carambola 2 and... IMHO, it wasn't a good idea. Why not maintain support in official OpenWrt repository, share ideas and code with community, so that the end user will always have access to up to date firmware and packages versions?
Try to ask yourself just one question: will I be able to maintain support in my fork for next X-Y years (during your product lifetime)? If not, you should build your product basing on official OpenWrt, using additional tools, scripts, packages, etc.
Of course, it's just my opinion.
Regards, Piotr
but you do your programming work in C++ with an AVR micro controller, in my opinion this is not the right way to do some job like web server or fetching some stream
Surely that's not right way to do it. One of the latest hot projects is MicroPython, which goes other direction - allows to use Python on a microcontroller (AVR is too small/ancient for that of course, but an average contemporary Cortex-M will do). MicroPython is useful also for modern cost-effective Linux system - they usually have 16MB RAM/4MB flash, so standard Python simply won't fit in flash together with kernel.
Hi,pepe2k I agree with the idea that one should carefully consider before starting something new, I don't know exactly what openwrt project is heading, Maybe its target is high performance routers? somehow i want to know if it is better to create a fork special for IoT applications? That's one reason why i want start this discussion.
Wow, wow, I was AFK for one day and here is the result;)
Thanks everybody for participating, very interesting thread!
IMHO, both the Dragino and the Arduino Yun are nice for prototyping, but are both too expensive and too big for a larger application, like setting up a WiFi-enabled plant as above.
Even the nice Carambola 2 module at $31.50 is still too expensive.
The TL-WR703N at $23 can be used, but it is far from convenient as it requires some modifications to be useful.
The way to go is to go cheaper: it is now possible to find < $10 modules based on AR9331 or RT5350: I got a set of 5x "M1 Mini3G Wifi Router" for $8.45 each on AliBaba, in a nice package with microUSB cable: they are 62 x 24 x 14.5 mm (about 2 stacked sugar cubes), and some bare boards with either CPU at the same price. The problem with this kind of suppliers is that it is very difficult to rely on them in the long run, as they may evaporate tomorrow.
Building your own board/router is a hard path to follow: the main problem is that these chips are not available as retail parts (except at some brokers in China, who knows where these come from...), you have to sign a license with either Ralink or Atheros (or their new owners...) with some big cash money to get the ref designs, the parts and the test tools. If it is possible to go without the ref designs (see this page for hardware, and OpenWrt for software..), you will have problems getting reliable parts, and no way to test/calibrate your products on the production lines.
The only reasonable way to go if you want to produce more than a few hundreds devices is to contact a manufacturer that already has the license and have them design a board to your specs. I know some of them, but be prepared to pay >$5k for 10 samples, then $8 to $20 per board, depending on your requirements.
Hi,Squonk42
So excited seeing your reply and hit the close button :) $10 dev board with small package, that is what i am talking about, i knew some supply that produce some so called 'core board' with decent quality and stamp like footprint, i gonna base my hardware design on that. What's your opinion about creating a easier toolkit to modify openwrt root fs? I personally think compare to hardware designing, software optimization is more important.
Be careful about the module that you pick: at least, test 2 of them and check that they dont't have the same calibration data partition, meaning they are NOT calibrated individually on the production line...
Also, if you want to export your device worldwide, it MUST be CE/FCC/RoHS compliant.
The only 2 boards that meet these requirements and that I would recommend are the AsiaRF AWM002 or AWM003, and the HiLink HLK-RM04.
IMHO, an interesting device should have a built-in 5V input power supply at least from a DC Jack, possiblly taking power from a LiOn battery with integrated charger, passive 18V PoE (active PoE is too expensive), 3x USB host ports and a microsD slot given by an AU6350 USB hub + SD Card combo chip, at least 1x Ethernet (2x is better for WAN/LAN), all possible GPIOs exposed on a header (best is 2x20 0.1" pitch, one row is GND), all that for <$30...
Given the above, having a microSD card is much better than trying to modify the partitions in the built-in Flash chip, doing a pivot root gives you all the freedom you can expect. The Flash chip content is then just a bootstrap for your full system.
Forking OpenWRT is definitely not a good idea: it is much better to contribute to it by providing patches, and create your own feed for your custom packages.
Thanks for your advices, Squonk42. actually i have tested quite a few of the modules on market, go visit a few of manufacturers, and most of them product modules that are CE/FCC/RoHS compliant. for example this one is also based on RT5350 SoC: http://detail.1688.com/offer/35576717259.html I also visit their calbiration process, so the calibration data partitions of RT5350 modules (0x40000) are different.
I wish you dont mind that i'm doing this out-of-project-scope discussion, the hardware design in my head somehow is more modularized:
I haven't decided how to connect these modules, maybe make theme stackable like arduino sheilds is a solution? IMHO, separating the different component can help reduce cost if you just wanna build an remote control light or plant factory.
Since there is no microSD guarantee, i just want to take the advantage of OpenWRT's writable file system, if it possible to build a desktop toolkit that manage OpenWRT's file system (maybe not all of the file system), manage packages, upload scripts or stuff like that ? Maybe it can be build based on USB-TTL interface that connect hardware with desktop, or base on the embeded web server?
Hi all,
I can't imagine how such a powerful SoCs like for example AR9331, RT5350, MT7620 or any other SoC with clock around 300-500 MHz can be treated as a IoT device... Even if it costs ~30 USD, it will be horrible waste of money and energy. Seriously, if you want to build IoT platform, your "network node" device shouldn't draw more than < 1 mA in sleep mode. It's impossible, to achieve that with so powerful SoCs like AR9331. OK, you can add small uC and use AR9331 on demand (control power for AR9331 from uC), but... it still needs almost ~20-30 seconds to boot up!
I like so called "hub" conception - e.g. AR9331 device, combined with sub 1 GHz radio, working as a network hub (or Internet gate) for energy-efficient, battery-powered network nodes with sub 1 GHz radio.
Regards, Piotr
Hi pep2k,
There indeed are lots of engineers try to build sub-1G network stack, and i were once one of them, but the network is more complicated than you might thought i'm afraid, In fact the industry standards such as WiFi and ZigBee are not just fancy protocols, they solve the problems such as interference, packet lose, reliable addressing...etc. IMHO, WiFi is becoming the winner in this game while BLE4.0 going to win in low energy cases.
Just like you mentioned, i am also very concerned with the power consumption problems, there are companys sell WiFi stack running on Cortex-M cores and claim that the power consumption is very low, while i have the chance to test some of the modules, the result is not convincing, because the MIPS24K core use more advanced fabrication, and they both need a radio which consume power more. In fact AR9331 consume less power than a Cortex-M4 chip and is cheaper than some models, that make me believe that new chips indeed are more powerful, more energy saving and cheaper.
So i believe one right thing to do is enable power management on MIPS cores, then we can achieve things like suspend to RAM, even suspend to flash, and resume the system when you need to do something. While i'm not a professional engineer who write hardware drivers, i'm looking forward someone can finally achieve this.
The question is always not simply how much MIPs does MAC stack and IP stack need, but also how easy you can build your own system, take AVR vs Cortex-M as an example, the complicated toolchain make people avoid ARM in some cases. What i try to say is, powerful SoC like AR9331 can provide linux environment and advance programming tools support like python and lua, if we can build a toolkit to take the advantage of them, then why not use them as IoT solution?
IoT is like real-time or embedded: the definition depends on your requirements;)
Proprietary RF ISM is the way to get the lowest power consumption, with the main drawback being the lack of interoperability.
BLE4.0 is the closest thing to standard low-power RF protocol, with the drawback of limited range.
WiFi has a higher power consumption, but also better range and bandwidth.
But I agree a BLE4.0/WiFi bridge could be a nice thing to have...
Hi all,
@winterland1989, I simply don't agree with you here. Using powerful SoCs and Wi-Fi on 2,4 GHz baseband for IoT solutions is, in my opinion, wasting money, power and just making another, unnecessary noise on, already very noisy, 2,4 GHz band.
Seriously, you don't need MIPS@400 MHz or even Cortex-M4@120 MHz, to build wireless device for IoT market... at least if you don't want to make an IP webcam with 720p@30FPS streaming, because then yes - you will need more computing power for that :)
WiFi has a higher power consumption, but also better range and bandwidth.
Again, the problem is still the same - choosing the right tools for the job. If you have big field, equipped with 100 network nodes, which measure temperature, irrigation level and couple of other values, and send 20 bytes every 5 minutes... will you use AR9331 and 2,4 GHz Wi-Fi for that? I don't think so.
@winterland1989, take a look also at Contiki OS (http://www.contiki-os.org).
Regards, Piotr
Hi all, @pepe2k , i understand your point about there are cases MIPS SoC is just a overkill, honestly i have that idea just like you during past few years, but i really haven't found a better solution regarding home automation or similar cases.
I have made a gateway-style solution before, it has a ethernet-RF gateway and several RF nodes, the next question is how to standardized this and make a more general purpose platform. which i failed because rebuilding a robust networking stack is so hard.
Yes projects like Contiki continue going this way, there are freakz stack, zigbee stack...etc, i just didn't go this way.
And now it comes to a point that an WiFi SoC module is going to be cheaper than a RF module(maybe the market driven?), and as i mentioned before, i believe there will be more advanced power management, so my personal choice is go the linux way.
I'm not try to convicing you which is the best way to do I-o-T project, it depend on what you need, and really thank you for shareing your points with me.
Hi all,
I'm not try to convicing you which is the best way to do I-o-T project
Neither do I, it's just about sharing thoughts.
it depend on what you need
Yes, I agree. Simply, I don't like universal solutions which try to solve every kind of problems. I know that price for AR9331/RT5350/etc. are low, due to massive usage - these SoCs are widely used in routers and other devices, so the final prices are very low. But, the end user will spend money saved when buying... for energy bills :)
and really thank you for shareing your points with me.
You're welcome.
Regards, Piotr
Before i close this discussion, i gotta say that i really would like to got contact to Squonk42, email me anytime you wish, and thanks to everyone here.
hi guyz, I know this thread is 2 years old. but I have a problem. you mentioned in your comment about difficulties designing own board. I have solved most of them but facing a big one. How to calibrate the RT5350 wireless on OpenWRT I have a board with sample binary on flash. of which factory partition need to configure using WiFi calibration tool. I have taken permission to use callibration tool. Now stuck on driver need to support that tool. I got the info that they use diffetant private ioctl with help of iwpriv command. I have also reffered your mt7620 wireless driver code. it is good work but it does not help me in my problem. So now I need help regarding how to modify your 7620 driver to support RT5350 I dont expect spoon feeding help but just the point me at the rght dirrection. I am thinking of creating a branch to your code. Thanks in advance
Hey, Since i find nowhere to contact you, so i'll try this one like the others, really sorry if this bother you. Long story short, i am designing a general purpose internet-of-things dev board, i need your help, and i would like to ask you to join our team if you like. I find your great projects on RT5350 and AR9331 here. And i realized your help is vital. Since i live in china and have access to the local manufacturer, I think maybe we can do this project together. Looking forward to know how do you think about this idea, tell me anything please, here is my email: winterland1989@gmail.com