[Commotion-dev] Working Openwrt build for Buffalo

Josh King joshuaheretic at gmail.com
Mon Aug 1 18:21:43 UTC 2011


Hey Ben,

This is essentially what Commotion does, in the /lib/network/mesh.sh
file in the setup_interface_plugif() function. I'll put some hooks into
that function so that you can specify the timeout in the config for the
interface.

On 07/18/2011 12:15 PM, Ben West wrote:
> It looks like you can achieve the same results, tho without having to run
> udhcpc manually, by editng this set up file:
> 
> /lib/config/config.sh:
> 
> setup_interface() {
> 
> ...
> 
>                         $DEBUG eval udhcpc -t 0 -i "$iface" \
> 
>                                 ${ipaddr:+-r $ipaddr} \
> 
>                                 ${hostname:+-H $hostname} \
> 
>                                 ${clientid:+-c $clientid} \
> 
>                                 ${vendorid:+-V $vendorid} \
> 
>                                 -b -p "$pidfile" $broadcast \
> 
>                                 ${dhcpopts:- -O rootpath -R &}
> 
> Here you see OpenWRT giving hard-coded options to udhcpc for a 3second
> timeout and 0 retry packets.  I'm curious why these are hard-coded.
> 
> root at openwrt:# udhcpc -h
> udhcpc: option requires an argument -- h
> BusyBox v1.15.3 (2010-04-06 05:58:52 CEST) multi-call binary
> 
> Usage: udhcpc [-Cfbnqtvo] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]
> [-p pidfile] [-r IP] [-s script] [-O dhcp-option]...
> 
> -V,--vendorclass=CLASSID Vendor class identifier
> -i,--interface=INTERFACE Interface to use (default eth0)
> -H,-h,--hostname=HOSTNAME Client hostname
> -c,--clientid=CLIENTID Client identifier
> -C,--clientid-none Suppress default client identifier
> -p,--pidfile=file Create pidfile
> -r,--request=IP IP address to request
> -s,--script=file Run file at DHCP events (default
> /usr/share/udhcpc/default.script)
> -t,--retries=N Send up to N request packets
> -T,--timeout=N Try to get a lease for N seconds (default 3)
> -A,--tryagain=N Wait N seconds (default 20) after failure
> -O,--request-option=OPT Request DHCP option OPT (cumulative)
> -o,--no-default-options Do not request any options (unless -O is also given)
> -f,--foreground Run in foreground
> -b,--background Background if lease is not immediately obtained
> -S,--syslog Log to syslog too
> -n,--now Exit with failure if lease is not immediately obtained
> -q,--quit Quit after obtaining lease
> -R,--release Release IP on quit
> 
> 
> On Wed, Jul 6, 2011 at 7:38 AM, Josh King <joshuaheretic at gmail.com> wrote:
> 
>> ** Hey Ben,
>>
>> If you log-in to the router and manually run udhcpc on that port with a
>> longer timeout (currently 3 tries/5 seconds, I believe), does it then get a
>> lease? I'm not experienced with that particular modem, but I have had issues
>> with DHCP leases on OpenWRT with other, similar hardware.
>> --
>> Josh King
>>
>> "I am an Anarchist not because I believe Anarchism is the final goal, but
>> because there is no such thing as a final goal." -Rudolf Rocker
>>
>>
>> Ben West <me at benwest.name> wrote:
>>>
>>> I just tried out the Buffalo router running r26910 on a Charter cable
>>> uplink for WasabiNet, and sadly it wouldn't take a DHCP lease from the cable
>>> modem (which I connected to eth1, aka blue WAN port).  Oddly enough, eth1
>>> does get its DHCP address fine if I attach it to a port on a DD-WRT router I
>>> have sitting around, but not the cable modem.
>>>
>>> Has anyone else had similar difficulties using their NFiniti with a wired
>>> broadband connection that issues DHCP leases?  I don't have this problem
>>> with the Mikrotik rb532a boards running Backfire rc4, when connected to a
>>> Charter cable modem.
>>>
>>> On Tue, Jul 5, 2011 at 12:30 PM, Brian Duggan <bcdugga at gmail.com> wrote:
>>>
>>>> Support for this router might be stabilizing. OpenWRT trunk r27437
>>>> worked for me this weekend, too.
>>>>
>>>> Brian
>>>>
>>>> On 7/3/11 9:01 AM, pablito wrote:
>>>>> Wow this is helpful!  For people not building their own, I also had
>>>>> luck with a pre-built image as I mentioned on the riseup/crabgrass
>>>>> group:
>>>>>
>>>>> I managed to leave DC without the recipe for flashing the Buffalo
>>>>> router, so after some experimentation and reading, came to find that
>>>>> TFTPing a nightly build from the openwrt
>>>>> trunk(http://downloads.openwrt.org/snapshots/) worked. I used
>>>>> openwrt-ar71xx-generic-wzr-hp-g301nh-jffs2-tftp.bin as
>>>>> openwrt-ar71xx-generic-wzr-hp-g300nh-jffs2-tftp.bin didn’t work for
>>>>> me.
>>>>>
>>>>> I'm not sure what the .config is for pre-built images, so very happy
>>>>> Ben figured out something which works!
>>>>>
>>>>> -p
>>>>>
>>>>> On Sat, Jul 02, 2011 at 10:43:17PM -0500, Ben West wrote:
>>>>>> Hi All,
>>>>>>
>>>>>> I just finally got a working instance of OpenWRT r26910 on the
>>>>>> Buffalo NFiniti, including the 802.11n radio.
>>>>>>
>>>>>> Do note that Daniel is referring to the "trunk" branch of OpenWRT
>>>>>> and not the "backfire" branch.  The latter branch is apparently
>>>>>> still missing support for the newer g301nh chipset.
>>>>>>
>>>>>> In particular, this is what I did to checkout / compile the
>>>>>> revision of OpenWRT mentioned, with luci and some other stuff
>>>>>> enabled.
>>>>>>
>>>>>> I'm also attaching my config for make menuconfig. (I.e unzip this
>>>>>> file and name it .config in the root of the OpenWRT repo, before
>>>>>> running make world.)
>>>>>>
>>>>>> svn co -r 26910 svn://svn.openwrt.org/openwrt/trunk/
>>>>>> ./trunk-r29610 cd trunk-r29610 cp feeds.conf.default feeds.conf
>>>>>> ./scripts/feeds update -a ./scripts/feeds install -a -p luci
>>>>>> ./scripts/feeds install -a -p luci-ssl ./scripts/feeds install
>>>>>> bmon #copy in .config file make world V=99 #wait for several hours
>>>>>>
>>>>>> I used the tftp method described in the wiki to flash the router.
>>>>>> You may have luck using the upgrade page provided with the stock
>>>>>> DD-WRT firmware.
>>>>>>
>>>>>> Finally, do note this version of OpenWRT appears to have everything
>>>>>> at / mounted read-only.  The writeable overlay is located at
>>>>>> /overlay, specifically at /overlay/etc.  If you have to copy a file
>>>>>> from /etc over to /overlay/etc, e.g. opkg.conf, you may need to
>>>>>> have to reboot to get the writeable file recognized.
>>>>>>
>>>>>> On Mon, Jun 6, 2011 at 5:09 PM, Daniel Bryg <fermenthor at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi everyone,
>>>>>>>
>>>>>>> Here are the promised details of the successful build i made on
>>>>>>> Friday during the meeting in DC.
>>>>>>>
>>>>>>> - I used Openwrt trunk r26910. It won't boot with the current
>>>>>>> trunk code or the snapshots - r27096 doesn't work either despite
>>>>>>> being reported by the router as a result of code merging.
>>>>>>>
>>>>>>> - flashed following the usual tftp steps for Bufallo:
>>>>>>> http://wiki.openwrt.org/toh/buffalo/wzr-hp-g300h
>>>>>>>
>>>>>>> - you need the wzr-hp-g300nh image the for the older "A0 D0"
>>>>>>> model and wzr-hp-g301nh for "A2 F0B"
>>>>>>>
>>>>>>> I'll be continuing these efforts later this week, maybe i'll set
>>>>>>> up a code repo. Let me know if you need a link to binaries and
>>>>>>> whatnot.
>>>>>>>
>>>>>>> It was great to meet some of you last week.
>>>>>>>
>>>>>>> Cheers, Daniel _______________________________________________
>>>>>>> Commotion-dev mailing list Commotion-dev at lists.chambana.net
>>>>>>> http://lists.chambana.net/mailman/listinfo/commotion-dev
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> -- Ben West me at benwest.name
>>>>>
>>>>>
>>>>>> _______________________________________________ Commotion-dev
>>>>>> mailing list Commotion-dev at lists.chambana.net
>>>>>> http://lists.chambana.net/mailman/listinfo/commotion-dev
>>>>>
>>>>>
>>>>
>>>> --
>>>> Brian Duggan
>>>> Technical Projects Developer
>>>> UC Independent Media Center
>>>> http://www.ucimc.org | 631 223 8442
>>>> _______________________________________________
>>>> Commotion-dev mailing list
>>>> Commotion-dev at lists.chambana.net
>>>> http://lists.chambana.net/mailman/listinfo/commotion-dev
>>>>
>>>
>>>
>>>
>>> --
>>> Ben West
>>> me at benwest.name
>>>
>>>
> 
> 

-- 
Josh King

"I am an Anarchist not because I believe Anarchism is the final goal,
but because there is no such thing as a final goal." -Rudolf Rocker

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.chambana.net/pipermail/commotion-dev/attachments/20110801/4874bd15/attachment.bin>


More information about the Commotion-dev mailing list