Hello
I ve got 3 Riotboard and when I connect the ethernet port tu my network, the three receive the same IP address as their MAC address seems the same
How can I change some setting to force different IP address for each board
Xavier
Hello
I ve got 3 Riotboard and when I connect the ethernet port tu my network, the three receive the same IP address as their MAC address seems the same
How can I change some setting to force different IP address for each board
Xavier
Android or Linux ?
Essentially, the fuse block in the SoC that would hold the mac address is left un-programmed. This should cause the kernel driver to pick a random mac address on every boot. That does appear to happen on the 3.15-rc* kernels I'm using.
Unfortunately distros try to be smart and force things, or save and restore the settings somewhere. In Debian/Ubuntu you should be able to do something like adding a line similar to
hwaddress ether 01:02:03:04:05:06
into /etc/network/interfaces at the appropriate place. Just pick a different address on each board.
I don't know much about how android might do this, I'm not really an android person, but there should be a way.
Note that simply giving each board a different static IP address won't work as long as they're on the same network, having duplicate mac address will still cause you problems in that scenario.
Hello
Sorry for the confusion
I am using Android distro.
Any body could help me ?
Xavier
I think I´ve seen something to spoof the Mac within terminal with help of busybox.
Inside the terminal when busybox is installed you can change it with:
ifconfig eth0 hw ether 00:11:22:33:44:55
But you need to have root for this. And I don´t know if or how this is possible at the moment.
As far as I know no one got root working by now. Maybe you have to ask a bit around. Maybe someone got it to work.
I´m using the riotboard with Linux. So I only can share my knowledge with my rooted Android phone.
Yes, I am facing the root problem on RiOtBoard on Android
How to install busybox on RiotBoard
Xavier
Ok, so for the don't-have-a-clue-about-android person here, please explain where you see your mac address in the android gui ?
There's a possible way to set unique address that works elsewhere, but I don't seem to be able to get it to work with android..
Connect a serial console, and stop u-boot at the prompt. Type the following two lines:
setenv ethaddr 00:11:22:33:44:55
saveenv
then power cycle.
Essentially this is supposed to cause u-boot to set the mac which is then picked up by the kernel later. This works elsewhere - on Sabre-Lite and a much newer version of u-boot.
I only have android on one of my boards, but it always seems to get a mac of 00:00:00:00:00:00 as seen in the initial u-boot, then when android loads it gets 1E:ED:19:27:1A:B3. Are you all getting that same mac address in android ?
albeit very temporary, here's a way that does work....
Connect a serial console.
After the board boots all the way into android, you'll have root access on the serial console, so type these commands
ip link set down dev eth0
ip link set dev eth0 addr 00:11:22:33:44:55
ip link set up dev eth0
yes you will loose the address on a reboot.
I have the same problem and need to change the MAC-Address of the riotboard.
The procedure described is working, but as you mentioned after reboot the MAC-Address is lost.
Is there no other way to change it permanetly?
Another point is how to deactivate DHCP and set a fiexed IP-Address?
Does anybody could help ?
If you manage to compile Android itself you could do the following to gain root on the shell.
With root you could change the settings as you like.
You have to change the file system/core/rootdir in the Android sources.
There you have to change this
service console /system/bin/sh class core console disabled user shell group log
to this
service console /system/bin/sh class core console disabled user root group root
and then compile it.
But I couldn´t compile it until now. Mainly because the Android sources described in the manual do NEED the Oracle JDK 6 that isn´t officially available anymore on Debian.
Normally you´d use the OpenJDK to compile Android. But that doesn´t work with the sources for Android for the RioTBoard...
I think I have root access on console.
I could change MAC with the following commands:
ip link set down dev eth0
ip link set dev eth0 addr 00:11:22:33:44:55
ip link set up dev eth0
But after reboot the old MAC-Adddress ist active.
I found on the net that I have to change the content of the file "nvram.txt" or something else, but I could not find such a file on my riotboard.
Thanks
I think I have root access on console.
I could change MAC with the following commands:
ip link set down dev eth0
ip link set dev eth0 addr 00:11:22:33:44:55
ip link set up dev eth0
But after reboot the old MAC-Adddress ist active.
I found on the net that I have to change the content of the file "nvram.txt" or something else, but I could not find such a file on my riotboard.
Thanks
If you really have root access you could create a script file with this commands in /system/etc/init.d/
Then it would be executed at boot.
Could you give me the way to be root?
I could not connected with su as root
X
It certainly appears to give you a root shell on the serial console. Usually changing the hwaddr would need either root of something with the correct capability flags.
I know android is different in many ways though, so not being an android person I really don't know if the 'looks like root' shell on the serial console really is or not. That said, a developer board with a locked down version of Android wouldn't appear to make a lot of sense.
If the Image of Android for the RioTBoard that is downloadable right now is the same as in the sources, then it´s really locked up.
The relevant settings in system/core/rootdir are set like this as I´ve written above.
service console /system/bin/sh
class core
console
disabled
user shell
group log
Also I can´t find anything in "device/fsl/RIoTboard_6solo/init.rc" that would grant access to root.
So the user doesn´t have root access in the shell right now.
To get full root access there is also a bit more to do. Like implementing a compiled version of the su-binary and a SuperUser.apk.
The missing modified su binary is the reason why you can´t connect as root with su.
I´m still trying to compile it, but it appears to not working. I managed to install the old Oracle JDK6 and it started to compile. But I still get errors...
I bow to your greater knowledge of Android. The sum total of my exposure to android is the RioTboard, I have no illusions that I know anything much about it
I've not downloaded either the Android sources or image, I just have the pre-installed image on the eMMC.. Really wouldn't surprise me if that's different though.
I wanted to make an Image the official way to root the RioTBoard. But since I can´t even compile it right now I will try something else as soon I´m at home.
There´s a method to root almost any device using the Master Key vulnerability.
I´ll test it and will write a blog entry on success.
Booted to the android image that was pre-installed on my board, I have a file in / called init.rc presumably this is where the things you've mentioned already actually end up after everything is compiled.
In that file, amongst lots of other service sections I have this:
service console /system/bin/sh class core console user root group root
from what you say there's more to it than just that, but for simple serial console root access how close is this?
The prompt I get on the serial console is root@riot_6solo:/ #
It also seems that the versions we have are somehow fundamentally different.. What's the best place for me to look to find some sort of version number that we can use to compare?
Just came home. Put Android on my RioTBoard with the downloaded image.
And jup. You´re right. When I connect with UART I am greeted with user root and the relevant settings are set in init.rc.
But I still don´t have write access on /system/etc for example.
To get the version, you can look into the file /system/build.prop.
The entry "ro.build.description" would give you type, version and date.
Mine is "riot_6solo-user 4.3 1.0.0-rc2 20131108". Which I assume would be the same as yours.
same version...
mount -w -o remount /dev/block/mmcblk0p5 /system
gives access to /system/etc as it's been mounted ro by default, presumably there's somewhere to change that, but I'm short on ideas as /etc/fstab doesn't seem to exist!
That would be enough to get write access to create a script file to run the commands. But it seems there is no init.d folder.
So I assume the support for it isn´t there. But I know something to get it running. Just have to test it though.
I´m not THAT big in my knowledge with Android. It´s just that I´ve been using rooted devices now for a somewhat long time.
But let´s see if we can get it working.