Loopy, Now this is where I get a bit confused. Perhaps you can answer:
1) I guess your "router" only has a single ether net WAN port. And WIFI.
2) Normally WIFI is disabled on a fresh router. It was on my D-LINK.
3) Normally one cannot telnet (or ssh) into a router via the WAN port.
Is this all true for your router out of the box install? If so I fail to see how you get in via telnet or Luci to configure it !
All in all I'd be much happier getting the serial console working before trying to configure this thing.
HI,
#1 Yes, with one one WAN or LAN port, it make little sense to call these a 'router'. But they heavily exploit the Linux Router software.
#2 Yes, Wifi is disabled on a fresh firmware install in all OpenWrt.
#3 Hmmm, I can accept that one cannot normally SSH via a WAN port. But this port seems as if it can change identity to a LAN port for different uses. And it might be that SSH is blocked by a WAN's firewall, which I am not using. (Try to envision how SER2LAN is going to deal with removal of the serial console.)
#4 The serial console seems to have the ultimate final authority, and this might be built-in to the kernel binary -- not sure. But since it is exactly what we want to wire to the Propeller, that is a very big conflict.
First order of the day is to list out all your /etc/config files. At least the ones relevant to the network set up. Get your terminal program to log to a file and then do:
cat /etc/config/wireless
and so on.
Stop the logging. Post the resulting output here.
Yes... this is something I have have been wanting. Minicom can actually log a copy of all and everything to a text file, so it is not a big job to do. I will work on getting this to youall.
Actually, thinking about it. On one side you have an ethernet WAN port leading to the big bad internet. On the other side you have but a single WIFI antenna.
But, multitudes of WIFI clients can connect to that WIFI access point, same as you can have multiple wired LAN clients. It is not just a point to point connection.
That little box has to route and NAT and firewall and port forward etc for all of those WIFI clients.
It is indeed a router.
It's just that you can see the connections it's routing over!
Edit:
Actually which way around are those little boxes normally expected to be used? WIFI to internet via another router and ethernet to client machine or ethernet to internet and WIFI to client machines?
Actually which way around are those little boxes normally expected to be used? WIFI to internet via another router and ethernet to client machine or ethernet to internet and WIFI to client machines?
I presume the latter.
It seems that the end user can make these little boxes configure backwards, fowards, rightside up, or upside down. The WR702N came with a 189 page document of configuration choices. The WR703N doesn't have an English document, but the MR3020 has an equally big tome.
It is all programable and up to the end user to make it do just about anything desired. (Think of it as a wif Swiss Army knife)
So I guess 99% of users throw the manual in the bin, connect the ethernet port to their internet pipe outlet and then connect their laptops and other devices to whatever the WIFI ESSID is. Perhaps having changed the ESSID and key.
I guess OpenWRT on that box is the same by default. As it was on mine.
Which is the wrong way around for what we want to do.
Great, my WR703N just showed up from China yesterday. It came with a one page "manual" in English explaining how to set up the 5 modes: AP, Router, Repeater, Bridge and Client.
Now, I can be distracted by this too!!
They sure are tiny little things!
Yes, Loopy, they most certainly are routers as Heater explained - they can move IP packets from one NETWORK to another - that is routing at its simplest. (That's why they exploit the Linux Router Software )
Most of these WR703N and MR3020 device are 'travel routers' that allow you to have wifi in your hotel room when all they do is provide a LAN plug in. That seems to be the default configuration.
The WR703N and MR3020 also seem to allow a 3G/4G modem to plug into a USB host to make the internet directly avaiable to iPads, iPhones, Touchpads and such that are 3G or 4G devices.
+++++++++++++++++
So yes, 99% of the users are targeted to never read the documentations (which comes on a 3" CD).
=====================
I have run a capture file of a first session with my MR3020 to try to sort out how to reconfigure. I am sure I have misses something, but it is a start.
I am enclosing it here for anyone that is interested.
We have a typhoon starting up. This weather makes me feel lousy, so I am not going to do much more tonight. But I am determined to use this as a study model to master OpenWRT. It is fun and certainly has a lot to explore. One cannot just read the documents, you have to actually try things out.
Damn, the ambient temperature here has jumped up to nearly 30C. Not bad for being so close to the North Pole. My PC can't handle it. Keeps tripping out. I had to post this on a borrowed Windows laptop, yewww. But the laptop keeps tripping out with heat stroke as well....
Interesting, you wouldn't think 30C (86F) would be a challenge. I guess, close the windows and turn on the air conditioning isn't an option that close to the North Pole.
We're looking at hitting 88F (31C) today - not unusual for summer here - but then the house is closed up and AC is on.
Does your laptop need to a internal cleaning session (dust and cat hair?)
If 30 degrees C is too much, the computers probably need a cleaning inside -- dust and grime are insulation. I clean mine about once a year with a 2 inch house painter's brush. And room here stays 27 degrees via an a/c during the summer heat. Above 27 degrees, the shift in dew point makes the humidity in the room become swampy. At 27 degrees or less, the humidity goes below 30%, doesn't grow mold, doesn't rot your books and paperwork.
Outside is in the 33-35 degree range, and extremely humid [90% or more] and windy due to the typhoon. Banks, government offices, schools, and just about everything is closed tomorrow.
++++++++++++++++++++++
I guess the first order of business is to get the DogHouse wifi to require a password. And the second is to switch the LAN back to Static.
From there it might be that the WLAN0 should be DHCP, but I can't quite be sure.
WLAN0 bridges to LAN0. I wonder it that is just too little and I require a WAN0 as well. More reading about LANs WANs and firewalls to be done.
LuCi and Dropbear seem to be separate issues.
LuCi might be protected by a VPN
Dropbear is certainly an SSH daemon.
And then there is the configuration bugaboo itself.
1. one can edit files directly in Vi
2. one can use CGI
3. one can have LuCi use CGI
Yeah, 30C ambient should not be a problem. "Air conditioning" what? I could do that if I took the whole kit out to the car:)
I'm beginning to suspect there is more to this, it just stopped again, I opened it up and nothing seemed at all hot or even warm. Anyway I turned the fan control off in the BIOS, it now sounds like a jump jet on heat. Let's see how it goes.
On the other hand, the lap top feels like a hot plate, for sure it needs a good de-crudding.
Someone always seems to go surf fishing in a typhoon in Taiwan and gets washed away. I can't help but wonder why.
This one may hit Taipei solidly, but I think I am just in for a dreary day of staying indoors while the wind howls. My dwelling is very solid concrete.
This isn't the Philippines. There you wait for the roof to blow away and then tie yourself to a coconut palm until the storm passes by.
For those of you following my ramblings about my over heating PC I found that:
One can monitor CPU and other temperatures under Linux with the psensors program. New to me. It draws nice graphs of temperature measurements and CPU load.
The heat sink was full of dust but cleaning that out did not help.
There is no sign of any thermal paste between heat sink and CPU. I don't have any to hand here.
The "Smart" Fan Control feature in the BIOS turns out to be the "Dumb" Fan Control feature. I see no sign of it increasing the fan speed as the temperature rises. When playing a video at 100% load for an hour with "Smart" fan control off, the fan runs at full speed all the time, the thing did not fail. Doing the same with "Smart" fan on, a nice slow quite fan, the overheats and fails. "Smart" fan does nothing.
So, I cranked the thermal cut out threshold in the BIOS up to the max. Let's see how it cooks....
"surf fishing in a typhoon", sounds fun, perhaps a good away to commit suicide as any.
Around here it's drowning after falling out of fishing boats on lakes whilst drunk during the mid-summers day holiday. They always announce the toll on the news the following day. People place bets on the "score". It's totally temperature dependent, could be up to about a dozen. This year it was cold, windy and raining so only one brave sole perished that way.
Great, my WR703N just showed up from China yesterday. It came with a one page "manual" in English explaining how to set up the 5 modes: AP, Router, Repeater, Bridge and Client.
Now, I can be distracted by this too!!
They sure are tiny little things!
Yes, Loopy, they most certainly are routers as Heater explained - they can move IP packets from one NETWORK to another - that is routing at its simplest. (That's why they exploit the Linux Router Software )
Congratulations and welcome aboard
BTW I modified my 703 to put the serial on the microUSB. I think this is great once everything is setup. But it would have been simpler to make a 4 pin header and leave the box open. If you make the header GND RES TX RX it will be compatible with the propplug and propeller (need to swap tx/rx).
I cut my usb power cable and made external connections to split the serial out from the power.
Here is the log (Putty connected to the 703 Ethernet port via SSH and root@192.168.1.1
Using username "root".
root@192.168.1.1's password:
BusyBox v1.19.4 (2013-02-21 15:00:55 EST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
_______ ________ __
| |.
.
.
.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
BARRIER BREAKER (35706_2013-02-23, r35706)
* 1/2 oz Galliano Pour all ingredients into
* 4 oz cold Coffee an irish coffee mug filled
* 1 1/2 oz Dark Rum with crushed ice. Stir.
* 2 tsp. Creme de Cacao
root@OpenWrt:~# echo 29 > /sys/class/gpio/export
root@OpenWrt:~# ls /sys/class/gpio
export gpio29 gpio8 gpiochip0 unexport
root@OpenWrt:~# echo out /sys/class/gpio/gpio29/direction
out /sys/class/gpio/gpio29/direction
root@OpenWrt:~# echo out > /sys/class/gpio/gpio29/direction
root@OpenWrt:~# echo 0 > /sys/class/gpio/gpio29/value
root@OpenWrt:~# echo 1 > /sys/class/gpio/gpio29/value
root@OpenWrt:~# cd /sys/class/gpio/gpio29
root@OpenWrt:/sys/devices/virtual/gpio/gpio29# echo 0
0
root@OpenWrt:/sys/devices/virtual/gpio/gpio29# echo 0 > value
root@OpenWrt:/sys/devices/virtual/gpio/gpio29# echo 1 > value
root@OpenWrt:/sys/devices/virtual/gpio/gpio29# cat value
1
root@OpenWrt:/sys/devices/virtual/gpio/gpio29# echo 0 > value
root@OpenWrt:/sys/devices/virtual/gpio/gpio29# cat value
0
root@OpenWrt:/sys/devices/virtual/gpio/gpio29# ls
active_low direction subsystem uevent value
root@OpenWrt:/sys/devices/virtual/gpio/gpio29#
Outputting 0 = LED ON, 1 = LED OFF.
Now to see if I can change the active_low to active_high somehow.
Here is a pic of my mods for the LED. It shows thru the light pipe on the edge so you have to position the 703 correctly to see the red led beside the blue led.
The LED has the + connected to the + pad on the pcb, and the - is soldered to the 3K3 resistor with the other end of the 3K3 wired to the end of R17 (a 10K pull down resistor on the GPIO29).
BTW This post has been done via my router (Ethernet --> wifi --> main internet router / hotspot)
And my email works (I have a number of email addresses including a Hotmail a/c)
root@OpenWrt:/# mount -t debugfs none /sys/kernel/debug
mount: mounting none on /sys/kernel/debug failed: Device or resource busy
root@OpenWrt:/# cat /sys/kernel/debug/gpio
GPIOs 0-29, ath79:
gpio-8 (USB power ) out hi
gpio-11 (reset ) in lo
gpio-27 (tp-link:blue:system ) out lo
root@OpenWrt:/#
I had already tried exporting up to 31 and it was failing after 23. Now I can be sure there are no more higher than 31.
There is a bunch of GPIO numbers that I could export, no errors about them being in use, but they don't seem to be driving any LEDs except the blue LED on GPIO 11.
I noticed a lot of little test point pads on the back of the PCB and wonder if I would be so lucky as to find some GPIO on them.
Hi all,
The typhoon has blown over Taiwan and is now headed for China.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As far as GPIO go, I am being unambitious about the MR3020. Two GPIO have been identified as easy to exploit in an SPI project. I intend to use just one for a Reset.
====
I am curious about wiring a reset from the GPIO. Should one add a transistor here to protect the GPIO pin? And are there other nuances to consider?
====
My two GPIO seem to have pull-down resistors that have to be removed, so I suspect that looking for GPIO with a multimeter would just show certain pins pulled to ground. It would be very handy if these resistors were actually 0 ohms.
The slide switch on my MR3020 seems to have been ignored by OpenWrt in MR3020.. so there are another two GPIO connected to that for people that might desire more. Or its utility can be redeployed creatively.
++++++++++++++++++
The USB port has now gotten my attention. Documents claim only USB 2.0 support as a bug in the device ignores USB 1.0. I wonder if this will play nice with an FTDI USB to RS232 chip. If so, that would offer an alternative Second RS232 port, free of concerns about conflicts with the Serial Console. It just might be the Propeller serial port of choice for a Prop Plug and a simpler track to downloading Propeller binaries.
For those of you following my ramblings about my over heating PC I found that:
One can monitor CPU and other temperatures under Linux with the psensors program. New to me. It draws nice graphs of temperature measurements and CPU load.
The heat sink was full of dust but cleaning that out did not help.
There is no sign of any thermal paste between heat sink and CPU. I don't have any to hand here.
The "Smart" Fan Control feature in the BIOS turns out to be the "Dumb" Fan Control feature. I see no sign of it increasing the fan speed as the temperature rises. When playing a video at 100% load for an hour with "Smart" fan control off, the fan runs at full speed all the time, the thing did not fail. Doing the same with "Smart" fan on, a nice slow quite fan, the overheats and fails. "Smart" fan does nothing.
So, I cranked the thermal cut out threshold in the BIOS up to the max. Let's see how it cooks....
Get some thermal grease. Smart Fan features seem to often be mentioned, but not available. I am not sure if BIOS includes these when the motherboard does not or vice-versa.
Clean the fan blades... you will vastly improve the air flow.
You could have also baked capacitors that are not properly filtering ripple. After all, once you identify a temperature related event, it brings into question everything that suffers from heat deterioration over time. The capacitors may or may not be bulged. And testing might require their removal, which seems to lead to just replacing anyway... all of them.
The main point, if it is capacitors - you can't clearly diagnose a failure point. You just have to remove all the electrolytics and provide new ones. You might have to replace the computer's power supply with a fresh one as well. And even then, you may not succeed... it could be 'something in the mother board' that has failed.
I had already tried exporting up to 31 and it was failing after 23. Now I can be sure there are no more higher than 31.
There is a bunch of GPIO numbers that I could export, no errors about them being in use, but they don't seem to be driving any LEDs except the blue LED on GPIO 11.
I noticed a lot of little test point pads on the back of the PCB and wonder if I would be so lucky as to find some GPIO on them.
Also the BASE can be other than 0 which offsets the GPIOs. Yours s/be 0.
Probably some test points will be JTAG and Serial (although IIRC you had a serial hdr). Maybe some could be GPIOs as well.
Hi all,
The typhoon has blown over Taiwan and is now headed for China.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As far as GPIO go, I am being unambitious about the MR3020. Two GPIO have been identified as easy to exploit in an SPI project. I intend to use just one for a Reset.
====
I am curious about wiring a reset from the GPIO. Should one add a transistor here to protect the GPIO pin? And are there other nuances to consider?
Possibly a good idea. If you use a GPIO that already has a 10K pulldown then you will not require this. Duplicating the transistor reset cct of the propplug might be best.
====
My two GPIO seem to have pull-down resistors that have to be removed, so I suspect that looking for GPIO with a multimeter would just show certain pins pulled to ground. It would be very handy if these resistors were actually 0 ohms.
Why? If they are 0 ohm you cannot make the pin an output - possible short!
With 10K, you can possibly leave them in circuit, depending on what you want the pin to do, including add in a switch to +3v3.
The slide switch on my MR3020 seems to have been ignored by OpenWrt in MR3020.. so there are another two GPIO connected to that for people that might desire more. Or its utility can be redeployed creatively.
++++++++++++++++++
The USB port has now gotten my attention. Documents claim only USB 2.0 support as a bug in the device ignores USB 1.0. I wonder if this will play nice with an FTDI USB to RS232 chip. If so, that would offer an alternative Second RS232 port, free of concerns about conflicts with the Serial Console. It just might be the Propeller serial port of choice for a Prop Plug and a simpler track to downloading Propeller binaries.
Its possibly a hw bug
This would mean that the FTDI FT232RL will not work.
To get over this, you can connect a USB powered hub.
(Heater doesn't have an USB ports to explore.)
That's all for now.
We have GPIOs 13, 14, 15 & 16 that were defined for the extra Ethernet ports that are not fitted to our boxes. 17 is for WAN. All have pulldowns except 13 which has a pullup. Be careful as some of these need to remain at these levels for power up. After the boot process, it is fine to change them.
Warning: GPIOs 2, 3, 4, 5 are used for SPI Flash. 6 is connected to the LDO. 8 controls the USB Power. 9 & 10 are serial in & out. 11 is the reset switch. 27 is the Blue LED.
I cannot find details on GPIOs 19, 21-25.
Possibly a good idea. If you use a GPIO that already has a 10K pulldown then you will not require this. Duplicating the transistor reset cct of the propplug might be best.
Why? If they are 0 ohm you cannot make the pin an output - possible short!
With 10K, you can possibly leave them in circuit, depending on what you want the pin to do, including add in a switch to +3v3.
Its possibly a hw bug
This would mean that the FTDI FT232RL will not work.
To get over this, you can connect a USB powered hub.
We have GPIOs 13, 14, 15 & 16 that were defined for the extra Ethernet ports that are not fitted to our boxes. 17 is for WAN. All have pulldowns except 13 which has a pullup. Be careful as some of these need to remain at these levels for power up. After the boot process, it is fine to change them.
Warning: GPIOs 2, 3, 4, 5 are used for SPI Flash. 6 is connected to the LDO. 8 controls the USB Power. 9 & 10 are serial in & out. 11 is the reset switch. 27 is the Blue LED.
I cannot find details on GPIOs 19, 21-25.
The proceedure in OPENwrt for the MR3020 indicates the SMD resistors must be removed to activate these two particular GPIO. I need to investigate with a multimeter to see what resistance the actual SMD resistors might be.... could be zero, could be something else.
USB to 'any Hub' or to a 'powered hub'? I will try the non-powered one I have, but it seems unlikely to improve the situation.
~~~~~~~~~~~
Defining GPIO availability is board specific. The MR3020 seems to have an easy 4 if you remove the slide switch. How many does anybody really require? SPI and I2C can do an i/o expansion for you.
LEDs are also board specific. I have 4 green ones attached to GPIO and a 5th attached to Vdd to indicate power. My personal desires are to remove the power indicator, or to at least paint over it to dim the glare when in a 24/7 operation. My WR702N has a power indicator that is bright enough to be a night light for a whole hotel room.
=============
Backlog of Jargon.... for people like myself that are NOT completely savvy.
I have a slide switch labeled for 3 modes on the MR3020. The WR703N does NOT.
And I suspect strongly that OpenWRT eliminated support for this as it just is a complicated nuisance. Some may desire to know what it is supposed to do. Some may actually desire to revive all its functionality (which I suspect is a view to recompiling the Kernel).
Three positions...
#1
3G/4G ==> supposed to enable 3g/4g services if a 3g/4g USB modem is plugged in. I am unclear on OpenWrt support for the USB 3g/4g Modem. May have to add an opkg package to acquire services.
#2
WISP ==> Wireless Internet Service Propvider - this may provide the firewall and PPPoE to an ADSL router if active.
#3
AP ==> Wireless Access Point - this rather mindlessly attaches the device to any LAN and makes it open to wireless uses either Public or Private, dependeing on your wifi security setup.
And then there is the SSID, BSSID, and ESSID tangle. (OpenWRT says SSID, Heater says ESSID..same thing?)
It seems that BSSID is the same as your MAC address.
And SSID and ESSID may be essentially the same thing.
It seems to be a simple Open Collector NPN (2n3904) with the base driven through a 10nf capacitor and a 33k pulldown. I have all the parts, so I am good to build.
Definitely worthy of being the first thing to try.
Any general purpose NPN can be used. P2N2222A is also good but be careful of the pinout which is different to the 2N2222A. A 10K or greater pulldown is fine. The cap causes a reset pulse on the on to off transition of the DTR which translates to the 0 to 1 transition on the GPIO. Alternately you could just use the GPIO to generate the pulse and omit the cap which means that a 1 will cause the reset by turning the transistor on.
Alternately you could use a 10K pullup on the prop reset pin and a 1N918 or 1N4148 diode from reset (anode) to GPIO (cathode). When the GPIO = 0V the diode would short the reset down to ground, and when GPIO = 3v3 the diode would be o/c and reset would rise and release the prop out of reset. This is the simplest method.
Regarding the Reset, my main concerns are two,
a. Protecting the WR703N or MR3020 i/o from a direct damage hazard due to hot pluging Propellers.
b. Getting the Propeller Reset to work reliably. This has been the topic of huge past debate. It certainly seems that a direct connect will work,but what actually works reliably and ruggedly is even better.
I seem to had provided a mixed list of NPN and PNP transistor, so I revised #237 to just suggest the 2n3604, an NPN -- like the 2N2222.
I suspect the PropPlug circuit was the result of wanting reliablity and ruggedness, so I am good with it.
+++++++++++++++++++
I am getting a better understanding of the configuration files in the /etc/config directory... in particular the wireless and network files. That should be resolved shortly.
But I still have a gut feeling that the Serial Console will always interfer with a secondary use of the /dev/ttyATH0 unless there is a good way to toggle between the two purposes. I would hate to remove the Serial Console and find that I could never again reach a Failsafe via RS232 if I need to do so. AND, that is why I mentioned using a USB to RS232 for Propeller programing.
Would a second serial port via USB be the simplest solution?
Then another serial port /dev/ttyUSB0 is likely to appear and be completely autonomous.
It would additionally not require a GPIO to dirve a Reset as the PropPlug ofr USB2SER do provide a built-in Reset line.
It even makes sense in terms of making the recompile of the existing Propeller binary loader likely to not require any modification at all.
Hi again,
I checked R17 and R15 on the MR3020 and these have 10Kohm resistors attached, apparently pulling GPIO to ground. So it is possible to exploit these points without removal of the resistors in some cases.
I am re-reading the 'Disable UART console' topic at OpenWRT with an eye towards what happens if I need to get a Failsafe mode or other means to reload firmware. So far it seems easy to shut down, unclear about how to access control withou LuCi or SSH thereafter.
Never make a teeny weenie obviously harmless changes to the main router for the household in the middle of the night. That will be when Murphy steps in and severs any possibility of connection from anything to anything. When the household wakes up and they find they can't immediately check their email, fishbook, twatter, whatever they become a seething lynch mob! It's hard to concentrate on finding the configuration error with a pack of hounds baying for you blood all around.
It's all better now. Everyone is happy. I have a WIFI dongle in my PC connecting to the main router. That get's rid of a clunky old cable, I have the second router free to hack with and it frees up the ethernet port on my PC so I can connect to the second router.
Comments
HI,
#1 Yes, with one one WAN or LAN port, it make little sense to call these a 'router'. But they heavily exploit the Linux Router software.
#2 Yes, Wifi is disabled on a fresh firmware install in all OpenWrt.
#3 Hmmm, I can accept that one cannot normally SSH via a WAN port. But this port seems as if it can change identity to a LAN port for different uses. And it might be that SSH is blocked by a WAN's firewall, which I am not using. (Try to envision how SER2LAN is going to deal with removal of the serial console.)
#4 The serial console seems to have the ultimate final authority, and this might be built-in to the kernel binary -- not sure. But since it is exactly what we want to wire to the Propeller, that is a very big conflict.
Yes... this is something I have have been wanting. Minicom can actually log a copy of all and everything to a text file, so it is not a big job to do. I will work on getting this to youall.
But, multitudes of WIFI clients can connect to that WIFI access point, same as you can have multiple wired LAN clients. It is not just a point to point connection.
That little box has to route and NAT and firewall and port forward etc for all of those WIFI clients.
It is indeed a router.
It's just that you can see the connections it's routing over!
Edit:
Actually which way around are those little boxes normally expected to be used? WIFI to internet via another router and ethernet to client machine or ethernet to internet and WIFI to client machines?
I presume the latter.
It seems that the end user can make these little boxes configure backwards, fowards, rightside up, or upside down. The WR702N came with a 189 page document of configuration choices. The WR703N doesn't have an English document, but the MR3020 has an equally big tome.
It is all programable and up to the end user to make it do just about anything desired. (Think of it as a wif Swiss Army knife)
I guess OpenWRT on that box is the same by default. As it was on mine.
Which is the wrong way around for what we want to do.
Now, I can be distracted by this too!!
They sure are tiny little things!
Yes, Loopy, they most certainly are routers as Heater explained - they can move IP packets from one NETWORK to another - that is routing at its simplest. (That's why they exploit the Linux Router Software )
The WR703N and MR3020 also seem to allow a 3G/4G modem to plug into a USB host to make the internet directly avaiable to iPads, iPhones, Touchpads and such that are 3G or 4G devices.
+++++++++++++++++
So yes, 99% of the users are targeted to never read the documentations (which comes on a 3" CD).
=====================
I have run a capture file of a first session with my MR3020 to try to sort out how to reconfigure. I am sure I have misses something, but it is a start.
I am enclosing it here for anyone that is interested.
We have a typhoon starting up. This weather makes me feel lousy, so I am not going to do much more tonight. But I am determined to use this as a study model to master OpenWRT. It is fun and certainly has a lot to explore. One cannot just read the documents, you have to actually try things out.
We're looking at hitting 88F (31C) today - not unusual for summer here - but then the house is closed up and AC is on.
Does your laptop need to a internal cleaning session (dust and cat hair?)
Outside is in the 33-35 degree range, and extremely humid [90% or more] and windy due to the typhoon. Banks, government offices, schools, and just about everything is closed tomorrow.
++++++++++++++++++++++
I guess the first order of business is to get the DogHouse wifi to require a password. And the second is to switch the LAN back to Static.
From there it might be that the WLAN0 should be DHCP, but I can't quite be sure.
WLAN0 bridges to LAN0. I wonder it that is just too little and I require a WAN0 as well. More reading about LANs WANs and firewalls to be done.
LuCi and Dropbear seem to be separate issues.
LuCi might be protected by a VPN
Dropbear is certainly an SSH daemon.
And then there is the configuration bugaboo itself.
1. one can edit files directly in Vi
2. one can use CGI
3. one can have LuCi use CGI
The questions keep piling up.
Looks like another substantial Typhoon. Baten down the hatches and stay safe.
Yeah, 30C ambient should not be a problem. "Air conditioning" what? I could do that if I took the whole kit out to the car:)
I'm beginning to suspect there is more to this, it just stopped again, I opened it up and nothing seemed at all hot or even warm. Anyway I turned the fan control off in the BIOS, it now sounds like a jump jet on heat. Let's see how it goes.
On the other hand, the lap top feels like a hot plate, for sure it needs a good de-crudding.
This one may hit Taipei solidly, but I think I am just in for a dreary day of staying indoors while the wind howls. My dwelling is very solid concrete.
This isn't the Philippines. There you wait for the roof to blow away and then tie yourself to a coconut palm until the storm passes by.
One can monitor CPU and other temperatures under Linux with the psensors program. New to me. It draws nice graphs of temperature measurements and CPU load.
The heat sink was full of dust but cleaning that out did not help.
There is no sign of any thermal paste between heat sink and CPU. I don't have any to hand here.
The "Smart" Fan Control feature in the BIOS turns out to be the "Dumb" Fan Control feature. I see no sign of it increasing the fan speed as the temperature rises. When playing a video at 100% load for an hour with "Smart" fan control off, the fan runs at full speed all the time, the thing did not fail. Doing the same with "Smart" fan on, a nice slow quite fan, the overheats and fails. "Smart" fan does nothing.
So, I cranked the thermal cut out threshold in the BIOS up to the max. Let's see how it cooks....
"surf fishing in a typhoon", sounds fun, perhaps a good away to commit suicide as any.
Around here it's drowning after falling out of fishing boats on lakes whilst drunk during the mid-summers day holiday. They always announce the toll on the news the following day. People place bets on the "score". It's totally temperature dependent, could be up to about a dozen. This year it was cold, windy and raining so only one brave sole perished that way.
Sad but true.
BTW I modified my 703 to put the serial on the microUSB. I think this is great once everything is setup. But it would have been simpler to make a 4 pin header and leave the box open. If you make the header GND RES TX RX it will be compatible with the propplug and propeller (need to swap tx/rx).
I cut my usb power cable and made external connections to split the serial out from the power.
I can turn my RED LED on and off !!!!!
Here is the log (Putty connected to the 703 Ethernet port via SSH and root@192.168.1.1
Outputting 0 = LED ON, 1 = LED OFF.
Now to see if I can change the active_low to active_high somehow.
Here is a pic of my mods for the LED. It shows thru the light pipe on the edge so you have to position the 703 correctly to see the red led beside the blue led.
The LED has the + connected to the + pad on the pcb, and the - is soldered to the 3K3 resistor with the other end of the 3K3 wired to the end of R17 (a 10K pull down resistor on the GPIO29).
Seems this might give you the number of GPIOs that you have ???
BTW This post has been done via my router (Ethernet --> wifi --> main internet router / hotspot)
And my email works (I have a number of email addresses including a Hotmail a/c)
Ah yes, thanks, I had already tried exporting up to 31 and it was failing after 23. Now I can be sure there are no more higher than 31.
There is a bunch of GPIO numbers that I could export, no errors about them being in use, but they don't seem to be driving any LEDs except the blue LED on GPIO 11.
I noticed a lot of little test point pads on the back of the PCB and wonder if I would be so lucky as to find some GPIO on them.
The typhoon has blown over Taiwan and is now headed for China.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As far as GPIO go, I am being unambitious about the MR3020. Two GPIO have been identified as easy to exploit in an SPI project. I intend to use just one for a Reset.
====
I am curious about wiring a reset from the GPIO. Should one add a transistor here to protect the GPIO pin? And are there other nuances to consider?
====
My two GPIO seem to have pull-down resistors that have to be removed, so I suspect that looking for GPIO with a multimeter would just show certain pins pulled to ground. It would be very handy if these resistors were actually 0 ohms.
The slide switch on my MR3020 seems to have been ignored by OpenWrt in MR3020.. so there are another two GPIO connected to that for people that might desire more. Or its utility can be redeployed creatively.
++++++++++++++++++
The USB port has now gotten my attention. Documents claim only USB 2.0 support as a bug in the device ignores USB 1.0. I wonder if this will play nice with an FTDI USB to RS232 chip. If so, that would offer an alternative Second RS232 port, free of concerns about conflicts with the Serial Console. It just might be the Propeller serial port of choice for a Prop Plug and a simpler track to downloading Propeller binaries.
(Heater doesn't have an USB ports to explore.)
That's all for now.
Get some thermal grease. Smart Fan features seem to often be mentioned, but not available. I am not sure if BIOS includes these when the motherboard does not or vice-versa.
Clean the fan blades... you will vastly improve the air flow.
You could have also baked capacitors that are not properly filtering ripple. After all, once you identify a temperature related event, it brings into question everything that suffers from heat deterioration over time. The capacitors may or may not be bulged. And testing might require their removal, which seems to lead to just replacing anyway... all of them.
The main point, if it is capacitors - you can't clearly diagnose a failure point. You just have to remove all the electrolytics and provide new ones. You might have to replace the computer's power supply with a fresh one as well. And even then, you may not succeed... it could be 'something in the mother board' that has failed.
Reading GPIO inputs and also swapping active_low/active_high.
Probably some test points will be JTAG and Serial (although IIRC you had a serial hdr). Maybe some could be GPIOs as well.
With 10K, you can possibly leave them in circuit, depending on what you want the pin to do, including add in a switch to +3v3. Its possibly a hw bug
This would mean that the FTDI FT232RL will not work.
To get over this, you can connect a USB powered hub. We have GPIOs 13, 14, 15 & 16 that were defined for the extra Ethernet ports that are not fitted to our boxes. 17 is for WAN. All have pulldowns except 13 which has a pullup. Be careful as some of these need to remain at these levels for power up. After the boot process, it is fine to change them.
Warning: GPIOs 2, 3, 4, 5 are used for SPI Flash. 6 is connected to the LDO. 8 controls the USB Power. 9 & 10 are serial in & out. 11 is the reset switch. 27 is the Blue LED.
I cannot find details on GPIOs 19, 21-25.
The proceedure in OPENwrt for the MR3020 indicates the SMD resistors must be removed to activate these two particular GPIO. I need to investigate with a multimeter to see what resistance the actual SMD resistors might be.... could be zero, could be something else.
USB to 'any Hub' or to a 'powered hub'? I will try the non-powered one I have, but it seems unlikely to improve the situation.
~~~~~~~~~~~
Defining GPIO availability is board specific. The MR3020 seems to have an easy 4 if you remove the slide switch. How many does anybody really require? SPI and I2C can do an i/o expansion for you.
LEDs are also board specific. I have 4 green ones attached to GPIO and a 5th attached to Vdd to indicate power. My personal desires are to remove the power indicator, or to at least paint over it to dim the glare when in a 24/7 operation. My WR702N has a power indicator that is bright enough to be a night light for a whole hotel room.
=============
Backlog of Jargon.... for people like myself that are NOT completely savvy.
I have a slide switch labeled for 3 modes on the MR3020. The WR703N does NOT.
And I suspect strongly that OpenWRT eliminated support for this as it just is a complicated nuisance. Some may desire to know what it is supposed to do. Some may actually desire to revive all its functionality (which I suspect is a view to recompiling the Kernel).
Three positions...
#1
3G/4G ==> supposed to enable 3g/4g services if a 3g/4g USB modem is plugged in. I am unclear on OpenWrt support for the USB 3g/4g Modem. May have to add an opkg package to acquire services.
#2
WISP ==> Wireless Internet Service Propvider - this may provide the firewall and PPPoE to an ADSL router if active.
#3
AP ==> Wireless Access Point - this rather mindlessly attaches the device to any LAN and makes it open to wireless uses either Public or Private, dependeing on your wifi security setup.
And then there is the SSID, BSSID, and ESSID tangle. (OpenWRT says SSID, Heater says ESSID..same thing?)
It seems that BSSID is the same as your MAC address.
And SSID and ESSID may be essentially the same thing.
http://www.juniper.net/techpubs/en_US/junos-space-apps12.3/network-director/topics/concept/wireless-ssid-bssid-essid.html#jd0e72
Yes, I have been hoping someone else will provide a good suggested schematic for the GPIO to Reset. I can copy the PropPlug schematic if I must.
http://www.parallax.com/sites/default/files/downloads/32201-Prop-Plug-Documentation-v1.3.pdf ==> See Page 5.
It seems to be a simple Open Collector NPN (2n3904) with the base driven through a 10nf capacitor and a 33k pulldown. I have all the parts, so I am good to build.
Definitely worthy of being the first thing to try.
Alternately you could use a 10K pullup on the prop reset pin and a 1N918 or 1N4148 diode from reset (anode) to GPIO (cathode). When the GPIO = 0V the diode would short the reset down to ground, and when GPIO = 3v3 the diode would be o/c and reset would rise and release the prop out of reset. This is the simplest method.
a. Protecting the WR703N or MR3020 i/o from a direct damage hazard due to hot pluging Propellers.
b. Getting the Propeller Reset to work reliably. This has been the topic of huge past debate. It certainly seems that a direct connect will work,but what actually works reliably and ruggedly is even better.
I seem to had provided a mixed list of NPN and PNP transistor, so I revised #237 to just suggest the 2n3604, an NPN -- like the 2N2222.
I suspect the PropPlug circuit was the result of wanting reliablity and ruggedness, so I am good with it.
+++++++++++++++++++
I am getting a better understanding of the configuration files in the /etc/config directory... in particular the wireless and network files. That should be resolved shortly.
But I still have a gut feeling that the Serial Console will always interfer with a secondary use of the /dev/ttyATH0 unless there is a good way to toggle between the two purposes. I would hate to remove the Serial Console and find that I could never again reach a Failsafe via RS232 if I need to do so. AND, that is why I mentioned using a USB to RS232 for Propeller programing.
Would a second serial port via USB be the simplest solution?
Then another serial port /dev/ttyUSB0 is likely to appear and be completely autonomous.
It would additionally not require a GPIO to dirve a Reset as the PropPlug ofr USB2SER do provide a built-in Reset line.
It even makes sense in terms of making the recompile of the existing Propeller binary loader likely to not require any modification at all.
I checked R17 and R15 on the MR3020 and these have 10Kohm resistors attached, apparently pulling GPIO to ground. So it is possible to exploit these points without removal of the resistors in some cases.
I am re-reading the 'Disable UART console' topic at OpenWRT with an eye towards what happens if I need to get a Failsafe mode or other means to reload firmware. So far it seems easy to shut down, unclear about how to access control withou LuCi or SSH thereafter.
http://wiki.openwrt.org/doc/recipes/terminate.console.on.serial
Never make a teeny weenie obviously harmless changes to the main router for the household in the middle of the night. That will be when Murphy steps in and severs any possibility of connection from anything to anything. When the household wakes up and they find they can't immediately check their email, fishbook, twatter, whatever they become a seething lynch mob! It's hard to concentrate on finding the configuration error with a pack of hounds baying for you blood all around.
It's all better now. Everyone is happy. I have a WIFI dongle in my PC connecting to the main router. That get's rid of a clunky old cable, I have the second router free to hack with and it frees up the ethernet port on my PC so I can connect to the second router.
I love Luci.
Does that ring any bells?