-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redwire IO Configuration #48
Comments
Hello, Have you tried flashing the firmware directly into ram ? If that works it's probably a bug in the flasher tool and I will have a look at it. If it was programmed correctly, you should be able to access http://[bbbb::100] without further configuration About connecting two IO, it is not possible using RPL enabled builds. What you have to do is either use the NDP-Router mode and the two IO will act as vanilla IPv6 routers. Another possibility is to use full transparent bridge mode, in that case each IO will forward packet received on one interface to the other and vice-versa. (please note that this mode is untested on IO, although it should work) |
Attempting to load into RAM (i.e. - ./mc1322x-load.pl -t /dev/ttyUSB1 -f ~/git/6lbr/examples/6lbr/bin_red-io/cetic_6lbr_smart_bridge) results in an indefinite hang (i.e. - lots of ................. that never end). Any thoughts on this? Additionally, bbmc is now reporting: For our particular application full transparent bridge mode may be what we are looking for. I will continue to do some digging on this. Thank you for the recommendation. |
The bbmc issue proved to be a permissions issue that I had experienced before and simply overlooked. sudo fixed it. Attempting to load into RAM still hangs though, elevated permissions or not. |
Progress. (Apologies for the multiple posts in a row.) Erasing memory before trying to upload into RAM seemed to do the trick. The webserver started and I was able to access the index page. Of course, this is not persistent between reboots. user@host: Also, these resets at the end just continue to pop up. Any thoughts on this? |
Hello, Indeed you can only program in RAM with an erased flash, otherwise the bootloader will not enter programming mode. The "enc28j60: resetting chip" is normal, when the Ethernet controller is idle it is reset periodically (this is a hardware workaround), the trace should be at debug level and not info though... I had a look at the flasher, it seems the latest version can corrupt the flash, resulting in a non working flash (I still have to understand why and when it happens). In the mean time I rollbacked the flasher binary (flasher_m12.bin) in the develop branch to a older version that is stable. You can give it a try. |
The old flasher from develop did the trick. The images are now loading into NVM and are persistent. Thanks. Might I suggest updating the wiki to reflect some of these findings perhaps? Thank you again! |
We now seem to be having some trouble with the flasher script. Running: This is the version of the script from master, though it looks the same as the one in develop? I updated the script to include the appropriate paths to mc1322x-load.pl and bbmc. As the router firmware for the Redwire IO seems to be the light version of 6lbr there is no configuration option on the routers web interface (i.e. - http://[bbbb::100]), nor can I seem to locate the 6lbr.conf file discussed under "Configuration" in the wiki anywhere, so it would appear as though the NVM Tool and flasher are my only option. I don't see anything obviously wrong with the way the actual command gets generated at the end of the file: echoing out these values results in: Unless there's something up with the hexdump arguments at the end there? I would expect to see more specific output than just a never-ending sting of ellipses if that were the case though. Thanks again for the help. |
Indeed, the nvm-tool is the only option, the ram on the mc1322x is too small to support the configuration part of the webserver. There is a bug in the documentation, once you have programmed a firmware in the flash you can not update the configuration nvm anymore (as the bootloader refuses to start from the RAM anymore); that's why you have this never-ending stream of dots (the flasher waits for the handshake of the bootloader) So you have to flash your configuration using the nvm_flasher then program your firmware using flasher_m12.bin. (Note that when I rollbacked the flasher I reintroduced an old bug that corrupted the nvm, please checkout again flasher_m12.bin from the develop branch) We will try to find a way to allow runtime reconfiguration of the IO in a future release |
So it looks as though we were able to generate an NVM file and upload it using the NVM flasher tool: user@host:~/git/6lbr/examples/6lbr/tools/econotag$ ./flash.sh --nvm ../nvm.dat --board m12 --dev /dev/ttyUSB2 (Still echoing out the actual command just for sanity) Found 1 devices with vendor id 0x0403 product id 0x6010 Then we attempt to upload the router firmware: user@host:~/git/6lbr/cpu/mc1322x/tools$ sudo ./mc1322x-load.pl -f ../../../emples/6lbr/tools/econotag/flasher_m12.bin -s ../../../examples/6lbr/bin_red-io/cetic_6lbr_router -t /dev/ttyUSB2 -b 500 -c 'sudo bbmc -l redbee-econotag reset' mc1322x init But it looks like the NVM is getting erased again ( nvm_erase returned: 0x00) when we upload the router firmware and we get an Invalid NVM Error. Perhaps we misinterpreted your instructions? |
Hello, No, you did not misinterpreted my instructions :) The flasher erase all but the configuration section of the NVM (using a mask). In short you should write your firmware in RAM, update the configuration using 6lbr_nvm_flasher and then write your firmware in NVM. A proper solution will be included in the next release (either by appending the configuration to the firmware or by adding a run-time configuration mechanism with a small footprint) |
Well, that does indeed solve the bad magic number problem. Here's the process in order. Erase: user@host:~/git/6lbr/examples/6lbr/tools/econotag$ sudo bbmc -l redbee-econotag erase Load firmware into RAM: user@host:~/git/6lbr/cpu/mc1322x/tools$ sudo ./mc1322x-load.pl -f ../../../examples/6lbr/bin_red-io/cetic_6lbr_router Flash settings into NVM: user@host:~/git/6lbr/examples/6lbr/tools/econotag$ ./flash.sh --nvm ../nvm.dat --board m12 --dev /dev/ttyUSB1 Flash firmware into NVM: user@host:~/git/6lbr/cpu/mc1322x/tools$ sudo ./mc1322x-load.pl -f ../../../examples/6lbr/tools/econotag/flasher_m12.bin -s ../../../examples/6lbr/bin_red-io/cetic_6lbr_router -t /dev/ttyUSB1 -b 500 -c 'sudo bbmc -l redbee-econotag reset' So, no bad magic number and everything is persistent. That's great. Here is what the nvm.dat file looks like as generated with the nvm_tool: user@host:~/git/6lbr/examples/6lbr/tools$ ./nvm_tool --print nvm.dat WSN network prefix : aaaa:: Eth network prefix : bbbb:: Local address rewrite : True RA daemon : True RPL instance ID : 30 Webserver configuration page disabled : False The only exceptionally odd things are the IPv6 addresses assigned to the interfaces: The WSN has autoconf enabled so I can foresee that changing but the ETH address should be bbbb::100 shouldn't it? Thanks for all of the help thus far! |
Hello, Looking at the traces it seems that the IO did not receive all the data sent by the nvm flasher; as there is no flow control on the secondary send data can be dropped; and so the content of the configuration nvm is corrupted, resulting in invalid prefixes. If the mc1322x-load.pl is the one from 6lbr repository you should add in flash.sh "-b 5000" when MC1322X_LOAD is invoked so that whatever happens no data word is erased by the next one. I made that one the default as the additional time taken to write the nvm is actually negligible, you can check it out from the develop branch. |
That seems to have done the trick! Thanks! Now we just need to figure out what all of the settings need to be in order to get two devices to talk to each other. If anything that is a documentation issue and this thread can probably be closed. Thanks again! |
Thank you for your feedback, I'll keep this issue open until the documentation is completely in line. |
In release 1.3.2 we have added a simple module to read and write the configuration NVM from the firmware directly and a simple tool to transfer the NVM data. Documentation is available here https://github.com/cetic/6lbr/wiki/Nvm-Proxy |
Greetings!
We seem to be having a bit of trouble getting 6lbr up and running on a few Redwire IO's. (i.e. - these: https://redwire.myshopify.com/products/io-embedded-router-contiki-based)
We have followed the directions found here: https://github.com/cetic/6lbr/wiki/Redwire-IO-Configuration
The host OS is Ubuntu 13.04.
Though a bit rocky at first, it appears as though we have managed to successfully build everything.
These are the results of using the loader to upload the "router" image:
user@host:~/git/6lbr/cpu/mc1322x/tools$ ./mc1322x-load.pl -t /dev/ttyUSB1 -f ~/git/6lbr/examples/6lbr/tools/econotag/flasher_m12.bin -s ~/git/6lbr/examples/6lbr/bin_red-io/cetic_6lbr_router -c 'sudo bbmc -l redbee-econotag reset' -b 200
Found 1 devices with vendor id 0x0403 product id 0x6010
Opening device 0 interface 1 using layout redbee-econotag
toggle reset
done.
.CONNECT
Size: 11420 bytes
Sending /home/user/git/6lbr/examples/6lbr/tools/econotag/flasher_m12.bin
secondary send...
.Detecting internal nvm
nvm_detect returned: 0x00 type is: 0x00000001
nvm_erase returned: 0x00
ready
Size: 72904 bytes
Sending /home/user/git/6lbr/examples/6lbr/bin_red-io/cetic_6lbr_router
done sending files.
write_len: 0x00011cc8
write successfully done
prog_len: 0xea0001ff
flasher done
So, fantastic, it looks as though everything was flashed. However, now we seem to be stuck.
There is no output on the serial. Should there be? We have assumed 115200 8N1 with no luck. Other configurations also fail to produce output.
Following the connection guide here: https://github.com/cetic/6lbr/wiki/6LBR-Connection
seems to allow us to connect. (eth0 shows connection at least)
eth0 Link encap:Ethernet HWaddr (eth0 MAC)
inet6 addr: bbbb::101/64 Scope:Global
inet6 addr: (eth0 IPv6 address)/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
What should the address of the Redwire IO be? We presumed bbbb::100 but
user@host:~$ ping6 -I eth0 bbbb::100
PING bbbb::100(bbbb::100) from bbbb::101 eth0: 56 data bytes
From bbbb::101 icmp_seq=1 Destination unreachable: Address unreachable
From bbbb::101 icmp_seq=2 Destination unreachable: Address unreachable
From bbbb::101 icmp_seq=3 Destination unreachable: Address unreachable
Alternatively, the broadcast: ping6 -I eth0 ff02::1 produces responses only from eth0's IPv6 address.
Additionally, we cannot reach the webserver http://[bbbb::100]. Should we be able to or does this require further configuration?
Ideally, we would like to be able to set up a transparent link between two Redwire IO's (i.e. - what goes in the IPv6 ethernet interface of one comes out the other and vice versa) but we can't even seem to verify that a device is working at all. How can we tell?
Any information that anyone can provide would be greatly appreciated.
Thank you in advance for your support.
The text was updated successfully, but these errors were encountered: