ybox2: Initial Configuration Failed
About a month ago I built the ybox2. I ordered the pcb online and all other parts from digikey.
Upon startup I receive the "Initial Configuration Failed" Error. Has anyone else ever gotten this? All files are from http://svn.deepdarc.com/code/ybox2/trunk/firmware/
I first went to search the ybox2 forums and it appears I was not the only one with this issue: http://forums.ladyada.net/viewtopic.php?f=30&t=11622
Unfortunately, darco has not been around to answer this yet. All parts were ordered from ladyada's parts list.
Any ideas?
Upon startup I receive the "Initial Configuration Failed" Error. Has anyone else ever gotten this? All files are from http://svn.deepdarc.com/code/ybox2/trunk/firmware/
I first went to search the ybox2 forums and it appears I was not the only one with this issue: http://forums.ladyada.net/viewtopic.php?f=30&t=11622
Unfortunately, darco has not been around to answer this yet. All parts were ordered from ladyada's parts list.
Any ideas?
Comments
Im guessing you can't read spin?
fnot settings.findKey(settings#NET_MAC_ADDR)
if \initial_configuration <> 1
term.str(string("Initial configuration failed!",13))
then I looked for "initial_configuration" which is a "PRI"
And located in the PRI is this: (PRI stands for private method)
PRI initial_configuration | i
term.str(string("First boot!",13))
settings.purge
random.start
' Make a random UUID
repeat i from 0 to 16
byte[noparse][[/noparse]@stack] := random.random
settings.setData(settings#MISC_UUID,@stack,16)
' Make a random MAC Address
byte[noparse][[/noparse]@stack][noparse][[/noparse]0] := $02
repeat i from 1 to 5
byte[noparse][[/noparse]@stack] := random.random
settings.setData(settings#NET_MAC_ADDR,@stack,6)
random.stop
settings.commit
return 1
So whats going on is your code is returning without a 1
That means that its never getting to "return 1"
somehow the code is "returning" without finishing the Private method
most likely its returning from another PUB or PRI method, or object.
after looking at "settings.spin" it looks like the issue is in there somewhere.
This object handles the storage and retreval of variables
and data which need to persist across power cycles.
By default requires a 64KB EEPROM to save things persistantly.
You can make it work with a 32KB EEPROM by changing the
EEPROMOffset constant to zero.
Can you program the bootloader into the eeprom properly? (not just load it)
Post Edited (Clock Loop) : 8/19/2009 5:48:13 PM GMT