I figured out the problem. After charging the battery, my PowerBook self-assigned an IP address beginning with 169, which doesn't accept an internet connection. All the usual resets didn't work, including resetting the modem. However, I found that disabling the firewall temporarily, going into Network Preferences, turning DHCP off, clicking Apply, selecting Using DHCP and clicking Apply again allowed my modem to assign a working IP address to my PowerBook. I enabled the firewall afterwards.