Author Topic: OpenWrt  (Read 7805 times)

HYPTUSSR

  • Newbie
  • *
  • Posts: 1
OpenWrt
« on: November 16, 2013, 09:01:53 am »
I am looking for some pointers on how to get started with installing OpenWrt on the WiFi module. USR-WIFI232-G is not on the support devices list on OpenWrt.org. I have yet to find on usr.cn what platform/chipset the WiFi module uses, compared to https://dev.openwrt.org/wiki/platforms . Appreciate the help in advance.

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: OpenWrt
« Reply #1 on: November 16, 2013, 12:32:53 pm »
As I am still waiting for my DigiX, I can't help right now. However I am currently playing around with some other WiFi-Routers, especially those with the RALink RT5350 SoC.

Unfortunately the user manual (http://en.usr.cn/download/USR-WIFI232-X-V4.3_en.pdf) doesnt tell anything about the used cpu/ram/flash ... of that device

What I would do with the  USR-WIFI232-G firsthand, is:
  • check all pins on the board, if there is a second UART, which might be the serial console
  • connect an USB-toTTL-UART cable and watch the boot-screen
  • if no other UART can be detected, watch the UART from the header-pins, however take care, as the manual states: TXD pin is also hardware configuration pin internal module. So this pin MUST pull-down during module power up. USR-WIFI232-X modules provide internal pull-down resister, user can’t add pullup/pull-down resistor on user board, which may cause module can’t work
It may happen, that for example the start-messages are really reduced, like with the HLK-RM04 (https://forum.openwrt.org/viewtopic.php?id=42142)
I expect that to happen, when there is no second UART, as console-messages should not disturb modem-like serial communication.

However I expect, that there are similar AT command backdoors available, as user jkent found out in the already linked openwrt-thread.

If that does not help, I would search the flash-chip, in most cases an SPI-flash and just readout the flash-content. I have that done already with some HAME-clones, and used for that an FTDI-Cable, I described here: http://digistump.com/board/index.php/topic,1127.0.html

As I should have the digiX hopefully soon in my hands (good luck to Erik!) I will dig into that theme as well.

I see here as well one legal problem, Erik may run into:  Many of those chinese devices are running lots of GPL software, starting from U-boot, linux kernel, iptables, busybox, ...
Many developers of this software are unhappy with the way, how the gpl license is violated, and they are trying in several cases to stop distribution of products, where the source code is not available! (gpl-violations.org)

However as I have not seen this device, all is speculation ....

regards

  .g



digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: OpenWrt
« Reply #2 on: November 17, 2013, 12:15:52 am »
Take a look at this document:
http://digistump.com/wiki/_media/digix/tutorials/usr-wifi232-g_en.pdf

There is JTAG, SPI, and USB but only one UART

I imagine one of those interfaces might get you some info

Additionally, try talking to USR - they are pretty good folks, we chose them because they are very much on the level and eager to be part of the maker movement - hey they even delivered to us ahead of schedule and for less than the original quote!

I imagine if USR was using GPL code and someone using their parts was threatened as a result they would probably release it - as I said, they are very much on the level from what I've seen - lots of sketchy modules out there, but this doesn't seem to be one. That said it would be pretty counter intuitive to go after a small open source hardware maker (who wouldn't knowingly buy a GPL violating product) for GPL violations in a third party module - I'd hope they have bigger fish to fry.

OpenWRT would be awesome on this - it wouldn't surprise me if USR has that in the pipeline already either, many Chinese companies seem to be moving toward it. I have an uncased one some where but I"m not able to grab it right now - the top metal shield easily dettaches and can be reglued if anyone wants to take a look for themselves.


gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: OpenWrt
« Reply #3 on: November 17, 2013, 11:57:40 am »
I am really eager to get my hands on it. I think, that an wifi device, running openwrt would be the best combination.
I have seen, that on the documented pins is only one UART. However most RT5350 based devices have a second UART, sometimes hidden, as that is part of the Soc.  The question there is only, if those pins are routed somewhere to the PCB, as the device itself is an BGA.

As I have not found any information about the core system, doing its job inside the USR-WIFI232-G I have no clue, what you can expect from it.

When you look to the document, I have linked, there is on page 16 an evaluation board, which looks like, to have two UARTs on board.   That feeds somehow the impression, that there could be a hidden second UART.  But thats only a blind guess, so lets hope the best for the digiX to ship soon ;-).

Regards

 .g


digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: OpenWrt
« Reply #4 on: November 17, 2013, 02:05:00 pm »
The document you linked to doesn't apply to this module - only their older modules - the module on the dev board on page 16 is a very different module (I have that one too).

This was a ground up redesign AFAIK - and it looks like it inside - I just got the one that had a loose shield and pulled it off - inside I found:

MCU: Atmel ATSAM4S8B QFN: http://www.atmel.com/devices/SAM4S8B.aspx
Radio SoC: Mediatek MT5931SA BGA: http://www.mediatek.com/_en/01_products/04_pro.php?sn=1052
Flash: EMST F25L08QA SOIC: http://www.esmt.com.tw/DB/manager/upload/F25L08QA(2S).pdf

Other than that there was a small vreg, two crystals, and some discretes - that's it!

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: OpenWrt
« Reply #5 on: November 18, 2013, 12:10:56 am »
Thanks a lot for that information,  that will help in further investigation!

.g

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: OpenWrt
« Reply #6 on: November 18, 2013, 12:44:58 am »
Ok,  some short digs into that information show, that it will be somewhere in between hard work and almost impossible to install openwrt on that device.
With 512k built in Flash and 1MB external Flash there is no chance. In newer versions its hard to squeeze openwrt into 4MB flash.
128kB SRAM are also a show-stopper!

Given that, I expect, that this is really an different stack than most of the other chinese routers UART-to-Wifi bridges.

For the Atmel devices there are some closed source TCP/IP stacks avaliable, which have a very small footprint. 
So I assume, that this device runs very specific protocol-to-protocol-converters rather than a full-blown operating system.

The best hackable device I found up to is the ALLNET5003 (http://www.allnet.de/entwicklungsplatformen.html?&L=12&tx_mmallnetproductplugin_pi1[showUid]=832789), which is sold to hardware manufactures for machine-2-machine communication.  They don't do anything up to now, to be visible in the makers-market.
The device has:  Wifi, 1 eth, serial console, own UART for communication, USB, I2C, SPI, 7 GPIO-ports, 32M Flash, 32M SRAM, openwrt is already ported.

The drawbacks are, that the formfactor is not quiet usable with breadboards and arduinos, as it has 1.27mm spacing on two times 20pins.

However avrdude is already existing for openwrt and I am trying right now to get the digispark-bootloader-wrapper compiled to openwrt.  I have enhanced it in a way, that I can control digispark power with one of that GPIOs and an darlington transistor. So I should be able to restart the digispark right in time for uploading a sketch.

With the information about the USR-WIFI232-G  I think, I will continue my work with the RT5350 compatible devices for the digispark.


regards

  .g