Posts Tagged ‘Wireless Card’

RaspberryPi Zero loses connectivity

Friday, July 9th, 2021

I have had a problem with RPI Zero. The system was working fine, and then it did not. I am using Raspbery Linux (Debian-based) with kernel 5.10.17+. Once a while (usually with network load) the system loses connectivity. Everything seems to be fine, if you have a serial/USB console there, but the wireless network fails. This problem was also mentioned here.

My workaround was to create a script with a cron scheduling. I have identified that the fault lies with the wlan driver, and it needs to get reloaded. So cron calls this script every minute, like this:

*/1 * * * * /usr/local/sbin/

And the script (/usr/local/sbin/ has this in it:

# DST is the network gateway
if ! ping -c 5 -t 5 $DST > /dev/null
  /usr/bin/logger "Restarting wlan0 network driver"
  /usr/sbin/rmmod brcmfmac && /usr/sbin/modprobe brcmfmac roamoff=1

Set this script to be executable, and your RPI Zero should work just fine. This is not a solution, but a workaround, of course, but it works well.

I’ve been away for a week due to work abroad

Sunday, April 2nd, 2006

And had the chance to be in one of the largest server farms I’ve ever been to. Could not take pictures, though.

We were connected to a proxied and limited network, inside the organization, with a limited set of allowed web sites. It was terrible. Then I’ve figured that if I purchase wireless network connection (which was available), I can use my laptop as a router, running NAT on this connection, while still being physically connected to the internal network. Security hole? Sure is, but not mine 🙂

So I’ve connected that way using PCMCIA wireless card (for some reason my internal Orinoco_PCI card refused to talk to that wireless network. I should try to find time to diagnose this issue). So I’ve had a configuration as follows:

1) wlan0 (PCMCIA wifi via ndiswrapper) – Internet

2) eth2 (First wired network card) connected to the internal LAN, and used as GW for one of my team

3) eth1 (Orinoco_PCI wifi card) in ad-hoc mode, acting as GW for another one of my team, who sat just far enough so I could not throw him a cable.

It worked, and worked fine.

Regarding other issues, I’ve noticed that my laptop was at its top, but felt it was hardly enough. For example – I used SkyPE. When in a voice call, my CPU went up to a stable 80-85% utilization. It is high. It means that if I do anything else, I get choppy sound (which I did get). It was good we’ve had such a long unused time at the customer’s place. Lots of waiting you can pass while in a voice call, and for free.

Well, it was educative. I’ve learned some additional things of how things work on a very large-scale environments, with the cons and pros of it. Was fun.

Orinoco_pci finally working correctly!

Thursday, March 9th, 2006

After upgrading my laptop to kernel, hibernation worked flawlessly. Running my previous version of kernel –, I have had some hibernation instabilities. I’ve had some memory corruptions here and there, which would have required I reboot the machine. So far, and it’s been a while, I’m glad to say I had no reason to "reboot" my laptop, but only to hibernate and awake it. Works like a charm.

In my post here, I have complained of performance issues with Orinoco_pci module. Although I’ve had somewhat below the average speed in my LAN (I’ve got about 800KB/s, give or take, on my 802.11b network), using this line to reach an external server / address or even a web site was disastrous. Degraded performance, up to no connection at all. Ping was correct at all times, just as a simple wget to a rather close server (on my ISP’s server room) got timed-out, and drained to less than 2KB/s… Terrible.

In this kernel version, as I’m happy to say, I have tested the built-in orinoco, and finally it’s working just as it should. I get to use my full internet bandwidth, and I’m happy with it. Normal response times, and all. Now all I’ve got left is to make sure the internal LEDs work. On another day 🙂

Orinoco Solution (so far)

Tuesday, July 19th, 2005

Well, my Orinoco 802.11b mini-pci card had this weird thing – sometimes it failed to start up after suspend. Why? I don’t know. I wasn’t able to understand the cause of it, and not being a coder, I had some hard time tracking kernel driver problems.

The error message was the following one:

orinoco_lock() called with hw_unavailable (dev=c1256800)

eth1: Error -110 setting multicast list.

Google is my friend. It can be yours as well.

I searched for Orinoco_pci modules, and was able to come up with this:

Ok, so I can understand my driver version is 0.13e, which comes with the Kernel, but this version didn’t seem to do the work quite right, so I had to test a newer version, way newer. I downloaded the external module pack from here (direct link to the tar.gz I’ve downloaded) and tried to compile it. I failed. Badly. I was not able to understand the cause of the failure. More experianced coder would have solved it by now, but I was not able to. I got this, in general:

orinoco_pci.c:330: error: too many arguments to function `pci_save_state’

orinoco_pci.c:347: error: too many arguments to function `pci_restore_state’

I persumed it was right – the function got one argument too many, so I tried to find another example of this function by running grep "pci_save_state" and "pci_restore_state" /usr/src/linux

I got few files, all using only one argument, So I had to change the file orinoco_pci.c in two places:

pci_save_state(pdev, card->pci_state); on line 330

pci_restore_state(pdev, card->pci_state); on line 347

Based on the examples seen in the kernel tree itself, I’ve changed these two lines to the following:



I was surprised it managed to compile correctly (tons of warnings, but no errors). I was able to manually load the module for testing, and after careful backup of the original modules, I replaced them with the newer ones.

Tested since yesterday, and so far It seems like my other wireless card, the PCMCIA card, has become a waste of money. I guess I can still use it to scan for networks…

Since there was no place in hell I was able to find this piece of information (me not being a coder), I am putting this online, for all who ever need it to watch and see.



Laptop Fujitsu P2120 Summary

Tuesday, July 19th, 2005

Well, I have a laptop for the last 2 years or so, which can be noted for its very light-weight and enhanced setup (it comes with full equipment – DVD-CDR combo, 802.11b, 1xPCMCIA, 2xUSB2.0, 1xFireWire, S-Video, VGA Out, Lan, Modem, etc), for only 3.2 lbs, or ~1.5Kg. However it has its disadvantages – the weak CPU (Transmeta 933MHz, which acts worse than P3 500MHz), the (very) slow HDD (40GB, but slow), and the very small VGA LCD – 10.2". Moreover, its Linux competability is not sky high, so I had to work hard to make things work correctly.

So far I have a working setup where the following list works:

1) ACPI Events*


3) Software Suspend 2 (Aka, Hibernation, or ACPI State 4)*

4) USB, and USB devices


6) Floppy (as a USB Storage device)

7) VGA, and X finally stopped crashing by itself.

8) LAN – RTL8139 based, using ifplugd for detection of links, and using DHCP to obtain IP address then

9) Wireless Card, Orinoco_pci module*

The devices marked with (*) are those which I have problem with. Outside of this list, I have my FireWire untested, and I cannot activate my Modem (LT, if I’m not mistaken).

Current problems:

ACPId fails to show in the logs (/var/log/acpid) the transfer phase from AC to battery mode, and vice versa. When on AC, It says nothing. When on Bat, it prints once around every 10 minutes or so a notice about using battery mode, or that the battery is being discharged. However, on /proc/acpi/battery/CMB*/state I can see when the battery is being charged and discharged. Weird.

Software Suspend 2 has just been patched on a kernel (I was not able to boot the at the moment, but I will devote time for it in the near future), and is being tested as we speak. So far, it has worked remarkably well, joined with the Fbsplash, it shows a nice animation during boot time. One thing, though, which is related to Orinoco_pci module – If the Orinoco driver has no wireless network accessible, it will hang during the power-restore session, fill my logs with the comment "hermes @ MEM 0xcfc74000: Error -16 issuing command." and will not be able to function, on most cases until I hibernate/resume the computer. Even then, not always will it work. It drove me nuts, as it both abused my CPU and thus battery during battery usage, and it required I find some alternate solution. Finally I have a method of adding PCMCIA wireless card, using NDISwrapper to activate it, and removing the orinoco related modules.

Linux – Debian which was based on Knoppix, and was vastly tweaked since. Unstable, and up-to-date. My own custom kernel, and up until now, using vanilla kernel with the swsusp2 patch. Nothing fancy.