Re: Accelerometers in Kernel 2.6.28-rc4
On Wednesday 04 February 2009, Michael Tansella wrote: > > ifconfig usb0 192.168.0.202 netmask 255.255.255.0 up > > Finally this made my day. I never had to do that before. Assuming MS5 is similar to recent SHR this is because connman is taking over management of the network interfaces, and trying to get an address for usb0 using dhcp. The settings in /etc/network/interfaces will be used if you use: ifdown usb0 ifup usb0 I haven't tried using the connman dbus interface to set a static address yet, but I guess that should work too. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
> If you come up in NOR U-Boot it doesn't seem to impact NAND environment, > no idea why but nothing can be done about it now. > > So if that's the case try whatever dance of death needed to get a > console on NAND U-Boot and do the same there. After using the devirginator the same procedure worked. > ifconfig usb0 192.168.0.202 netmask 255.255.255.0 up Finally this made my day. I never had to do that before. Thank you very much for your fast and qualified help. All the best Michael ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Somebody in the thread at some point said: | QI | |> Make sure you have the "rw" in there, and the /boot/append-GTA02 is in |> the partition with the rootfs. Try adding a space before the rw in case |> I mangled it with recent changes. |> |> It's a bug I think if the rootfs does not remount root rw. |> | | the same failed to set owner root for /var/volatile/cache/ | the same failed to set mode 0755 for /var/volatile/cache/ Hum meant to be a tmpfs there. You should be able to mount on one a ro filesystem AFAIK. | UBOOT | |> You need to escape the ; with backslashes. Your setenv is only setting |> the text as far as the first ; as it stands, then taking the nand and |> bootm as new commands and running them right away. | I did the following: | r...@x:~# chown uucp.uucp /dev/ttyACM0 | r...@x:~# cu -l /dev/ttyACM0 | GTA02v5 # setenv bootcmd setenv bootargs \${bootargs_base} \${mtdparts}\; | nand read.e 0x3200 kernel 0x30\; bootm 0x3200 | GTA02v5 # saveenv | Saving Environment to NAND... | Erasing Nand...GTA02v5 # | | If I now choose boot from the bootloader it boots fine, | But after a reboot I have to do the same again it, it doesn't save it. If you come up in NOR U-Boot it doesn't seem to impact NAND environment, no idea why but nothing can be done about it now. So if that's the case try whatever dance of death needed to get a console on NAND U-Boot and do the same there. | usb0 Link encap:Ethernet Hwaddr DA:DF:7E:17:08:9A | UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1 | RX packets:17 errors:0 dropped:0 overruns:0 frame:0 | TX packets:27 errors:0 dropped:0 overruns:0 carrier:0 | Collisions:0 txqueuelen:1000 | RX bytes:9792 (9.7 KB) TX bytes:4140 (4.1 KB) Well there's no IP on usb0. ifconfig usb0 192.168.0.202 netmask 255.255.255.0 up should help with that. If this is with a kernel with the Ethernet gadget built as a module, I wonder if there's a race somewhere between inserting the module and trying to bring up the interface in initscripts. |> route -n | Kernel-IP-routingtable | DestGateway Genmask Flags Metric Ref Use Iface | |> say? dmesg on the PC side? | [23821.176092] usb 1-1: new full speed USB device using uhci_hcd and address | 108 | [23821.384140] usb 1-1: configuration #1 chosen from 2 choices | [23821.392754] usb0: register 'cdc_ether' at usb-:00:1a.0-1, CDC Ethernet | Device, 9e:08:34:97:d5:f8 | [23834.084104] usb0: no IPv6 routers present It's pretty happy otherwise. - -Andy -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkmJtDQACgkQOjLpvpq7dMrr2QCfagr27Pwb490AIw4UZA2NfOeF 5sUAmwYm0OSNaOFi1DtSfyiMxN/aR16b =f2cW -END PGP SIGNATURE- ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
QI > Make sure you have the "rw" in there, and the /boot/append-GTA02 is in > the partition with the rootfs. Try adding a space before the rw in case > I mangled it with recent changes. > > It's a bug I think if the rootfs does not remount root rw. > the same failed to set owner root for /var/volatile/cache/ the same failed to set mode 0755 for /var/volatile/cache/ UBOOT > You need to escape the ; with backslashes. Your setenv is only setting > the text as far as the first ; as it stands, then taking the nand and > bootm as new commands and running them right away. I did the following: r...@x:~# chown uucp.uucp /dev/ttyACM0 r...@x:~# cu -l /dev/ttyACM0 GTA02v5 # setenv bootcmd setenv bootargs \${bootargs_base} \${mtdparts}\; nand read.e 0x3200 kernel 0x30\; bootm 0x3200 GTA02v5 # saveenv Saving Environment to NAND... Erasing Nand...GTA02v5 # If I now choose boot from the bootloader it boots fine, But after a reboot I have to do the same again it, it doesn't save it. > What does > > ifconfig -a lo ... pan0 ... usb0 Link encap:Ethernet Hwaddr DA:DF:7E:17:08:9A UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1 RX packets:17 errors:0 dropped:0 overruns:0 frame:0 TX packets:27 errors:0 dropped:0 overruns:0 carrier:0 Collisions:0 txqueuelen:1000 RX bytes:9792 (9.7 KB) TX bytes:4140 (4.1 KB) > route -n Kernel-IP-routingtable DestGateway Genmask Flags Metric RefUse Iface > say? dmesg on the PC side? [23821.176092] usb 1-1: new full speed USB device using uhci_hcd and address 108 [23821.384140] usb 1-1: configuration #1 chosen from 2 choices [23821.392754] usb0: register 'cdc_ether' at usb-:00:1a.0-1, CDC Ethernet Device, 9e:08:34:97:d5:f8 [23834.084104] usb0: no IPv6 routers present Thanks again for helping regards Michael ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Somebody in the thread at some point said: |> I'm just adding some patches and doing some cleaning on it, I'll update |> the moredrivers kernels at http://people.openmoko.org/andy when I |> checked we didn't break the threshold stuff. | | Thanks, in the moredrivers kernel the accs are working now. But now I have the | following problems. | | When I use Qi it says it is not able to set some permissions and then hangs in | Angstroem login screen and I can not SSH into it. I also tried this from the | mailing list: | | "Just create a textfile "/boot/append-GTA02" and put whatever is needed as | kernel parameters in there - here is mine: | rw rootdelay=3 glamo_core.slow_memory=1" Make sure you have the "rw" in there, and the /boot/append-GTA02 is in the partition with the rootfs. Try adding a space before the rw in case I mangled it with recent changes. It's a bug I think if the rootfs does not remount root rw. | When I use U-boot I have to change the boot environment because it's bigger | than 2 MB. I do that the following way: | setenv bootargs ${bootargs_base} ${mtdparts}; nand read.e 0x3200 kernel; | bootm 0x3200 | | Then I would normally save the environment with saveenv but the system boots | immediately after the setenv command. So how can I save it? You need to escape the ; with backslashes. Your setenv is only setting the text as far as the first ; as it stands, then taking the nand and bootm as new commands and running them right away. | Then it boots sucessfully but I can not ssh into the freerunner with message: | ssh: connect to host 192.168.0.202 port 22: No route to host What does ifconfig -a route -n say? dmesg on the PC side? - -Andy -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkmJmq4ACgkQOjLpvpq7dMr14ACfejv9eU6ErxHb9sTYZA4/vDy+ NDsAoI7zhHSKUlutgqz5xnoKUjwYQhl5 =WLi6 -END PGP SIGNATURE- ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
> I'm just adding some patches and doing some cleaning on it, I'll update > the moredrivers kernels at http://people.openmoko.org/andy when I > checked we didn't break the threshold stuff. Thanks, in the moredrivers kernel the accs are working now. But now I have the following problems. When I use Qi it says it is not able to set some permissions and then hangs in Angstroem login screen and I can not SSH into it. I also tried this from the mailing list: "Just create a textfile "/boot/append-GTA02" and put whatever is needed as kernel parameters in there - here is mine: rw rootdelay=3 glamo_core.slow_memory=1" When I use U-boot I have to change the boot environment because it's bigger than 2 MB. I do that the following way: setenv bootargs ${bootargs_base} ${mtdparts}; nand read.e 0x3200 kernel; bootm 0x3200 Then I would normally save the environment with saveenv but the system boots immediately after the setenv command. So how can I save it? Then it boots sucessfully but I can not ssh into the freerunner with message: ssh: connect to host 192.168.0.202 port 22: No route to host Any hint? Greets Michael ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
Very nice thanks ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
On Tue, 3 Feb 2009 11:53:15 +0100 Michael Tansella wrote: > > There is a quick workaround for this that can be done I believe. > > Any hint where I can find this workaround, then I'll post it to the > wiki? The fix should now be in the latest andy-tracking kernel: http://git.openmoko.org/?p=kernel.git;a=shortlog;h=andy-tracking It has been discussed on the kernel list as well, and for at least one of the patches I'm not sure if it's the right way to go. Anyway: For your purposes I think the current andy-tracking branch will work very well. // Simon ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Somebody in the thread at some point said: |> There is a quick workaround for this that can be done I believe. | | Any hint where I can find this workaround, then I'll post it to the wiki? I'm just adding some patches and doing some cleaning on it, I'll update the moredrivers kernels at http://people.openmoko.org/andy when I checked we didn't break the threshold stuff. - -Andy -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkmIIt8ACgkQOjLpvpq7dMpzogCffYlArN6RPOfEBvWc2u0s6d2y I8YAn2KLk5NKki7CmLVeQe5evB6ordzz =0bQ1 -END PGP SIGNATURE- ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
> There is a quick workaround for this that can be done I believe. Any hint where I can find this workaround, then I'll post it to the wiki? Greets Michael ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
> Send a bug report in Trac about it. > > There is a quick workaround for this that can be done I believe. > > -Andy Thank You very much ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Somebody in the thread at some point said: |> This is reminding me of a problem we have with level interrupts on |> pcf50633 new driver, we also get twice the same interrupt there although |> the density of interrupts is so low and logically it cannot get confused |> so it doesn't make trouble. |> |> We also changed lis302dl to use level interrupts so it's suspicious now |> we see this behaviour that is so similar. |> |> -Andy | | Thanks, | Is somebody working on this or should I write a bug report? If yes where? | Can I use any other Kernel with FSO Milestone 5 which doesn't suffer from this | problem ? I want to update my system but I need proper working accels. Send a bug report in Trac about it. There is a quick workaround for this that can be done I believe. - -Andy -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkmIBM4ACgkQOjLpvpq7dMp/vgCfd2H3VtJb9gvcjbIgj83nDVXc POkAn2WB4y3BNCMyEO802DAzHPxBwwS0 =rAZM -END PGP SIGNATURE- ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
> This is reminding me of a problem we have with level interrupts on > pcf50633 new driver, we also get twice the same interrupt there although > the density of interrupts is so low and logically it cannot get confused > so it doesn't make trouble. > > We also changed lis302dl to use level interrupts so it's suspicious now > we see this behaviour that is so similar. > > -Andy Thanks, Is somebody working on this or should I write a bug report? If yes where? Can I use any other Kernel with FSO Milestone 5 which doesn't suffer from this problem ? I want to update my system but I need proper working accels. Greets Michael ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Somebody in the thread at some point said: |> are you sure this isn't just the synchronization events? | | For me the problem looks like this. | | |type| |code| |-value-| | 0006 -> Seperator time 1 | 0006 0002 0048 -> Value X1 | 0006 0002 0001 0024 -> Value Y1 | 0006 0002 0002 0396 -> Value Z1 | 0006 -> Seperator time 2 (0.2ms higher than time1) | 0006 0002 0048 -> Value X2 (the same X1 ) This is reminding me of a problem we have with level interrupts on pcf50633 new driver, we also get twice the same interrupt there although the density of interrupts is so low and logically it cannot get confused so it doesn't make trouble. We also changed lis302dl to use level interrupts so it's suspicious now we see this behaviour that is so similar. - -Andy -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkl8XEMACgkQOjLpvpq7dMoBAwCgk58mQwThsSpQKsgdM1A8y1ok KsIAn34sAwxQsBr1fd/qSuuM4yIaqDyf =/VOZ -END PGP SIGNATURE- ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
> are you sure this isn't just the synchronization events? For me the problem looks like this. |type| |code| |-value-| 0006 -> Seperator time 1 0006 0002 0048 -> Value X1 0006 0002 0001 0024 -> Value Y1 0006 0002 0002 0396 -> Value Z1 0006 -> Seperator time 2 (0.2ms higher than time1) 0006 0002 0048 -> Value X2 (the same X1 ) 0006 0002 0001 0024 -> Value Y2 (the same Y1 ) 0006 0002 0002 0396 -> Value Z2 (the same Z1 ) 0006 -> Seperator time 3 (2.5ms higher than time1) 0006 0002 0048 -> Value X3 (new Value) I modified the python script from http://wiki.openmoko.org/wiki/Accelerometer_data_retrieval (see atachment) that it prints the ms. The result is the same. 204.269 -18 90 882 204.462 -18 90 882 206.635 -18 90 900 206.808 -18 90 900 209.127 -36 72 918 209.318 -36 72 918 211.595 -18 90 918 211.789 -18 90 918 214.056 -18 72 900 214.254 -18 72 900 Anything must have changed in the new Kernel, cause with the old kernel this problem doesn't appear. Is someone else reading out the Accs and does not have this problem? Greets Michael #!/usr/bin/python import struct from math import sqrt x = 0 y = 0 z = 0 secondsensorfile = "/dev/input/event2" #int, int, short, short, int fmt = 'iihhi' #open file in binary mode in_file = open(secondsensorfile,"rb") event = in_file.read(16) while event: (time1,time2, type, code, value) = \ struct.unpack(fmt,event) time = time2 / 1000.0 if type == 2: if code == 0: x = value if code == 1: y = value if code == 2: z = value if type == 0 and code == 0: sum = int(sqrt(x*x + y*y + z*z)) print time, x, y, z event = in_file.read(16) in_file.close() ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
On Sat, 24 Jan 2009 17:21:09 +0100 Michael Tansella wrote: > I made a mistake. I do not really get two different values I get > twice the same (3D) value but a different timestamp (see below). But > anyway this is not correct. I don't want to set a threshold, because > I need every value with an equidistant timestamp. Well, it was more to see if the behavior changes with the threshold, but anyway: > Any idea what's going wrong? Looking at http://wiki.openmoko.org/wiki/Accelerometer_data_retrieval#Data_acquisition are you sure this isn't just the synchronization events? |- time --| |type| |code| |-value-| 8c66 4819 721c 0006 0002 0002 03a8 8c66 4819 7222 0006 <--- Time looks quite close to the last non-sync events 8c66 4819 99e6 0006 0002 0048 <--- Larger time distance and real data 8c66 4819 9a36 0006 0002 0001 0024 8c66 4819 9a50 0006 0002 0002 0396 8c66 4819 9a57 0006 <--- Another sync message, small time distance I'm no expert on the data format though. // Simon ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
> Could you test to set the threshold value to something low, e.g., 18 or > so? Also check the threshold file afterward you've set it so that it's > not zero, values which are too low to be represented by the threshold > code get rounded down. HI, I made a mistake. I do not really get two different values I get twice the same (3D) value but a different timestamp (see below). But anyway this is not correct. I don't want to set a threshold, because I need every value with an equidistant timestamp. Any idea what's going wrong? > Do you have this test program to share? I send U the binary of my C++ Acc Test tool offlist. If somebody else wants it I can send it. I attached the source code. You should use it with 2.6.28 Kernel otherwise U must set threshold and sample_rate manually because it is in a different folder. you will need to install one additional lib: opkg install libgio-2.0-0 It's a simple terminal tool use it the following way: MokoAcc [Number of Loops] [Accelerometer 1 or 2] [100 or 400 (Hz)] [threshold] for example: ./MokoAcc 10 2 100 0 and it will create a log file in the same directory: cat AccLog_Acc1.txt 455.131012 -0.528137 0.704183 5.633463 455.322998 -0.528137 0.704183 5.633463 457.576996 -0.176046 0.704183 8.978332 457.766998 -0.176046 0.704183 8.978332 460.061005 -0.352091 0.704183 8.626241 460.411987 -0.352091 0.704183 8.626241 462.503998 -0.352091 0.880229 8.626241 462.700012 -0.352091 0.880229 8.626241 484.566010 -0.352091 0.704183 8.626241 484.790009 -0.352091 0.704183 8.626241 first value is the timestamp in ms the X,Y,Z; Greets Michael AccTest.tar.gz Description: application/compressed-tar ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Accelerometers in Kernel 2.6.28-rc4
On Sat, 24 Jan 2009 10:35:14 +0100 Michael Tansella wrote: > When I read out the Acc values I get strange values. I set the device > to 100 Hz that means I should get one (3D) value every 10 ms but I > get two even with a different time stamp whitch differs round about > 0.4 ms. Because of the axis orientation it cannot be from the second > Accelerometer. So where does this additional (3D)value come from? Two at the price of one :-) Could you test to set the threshold value to something low, e.g., 18 or so? Also check the threshold file afterward you've set it so that it's not zero, values which are too low to be represented by the threshold code get rounded down. > This log I recorded from the first accelerometer with 100 Hz. (If set > to 400 Hz I get two values every 2.5 milliseconds, the same problem) Do you have this test program to share? Thanks, // Simon ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Accelerometers in Kernel 2.6.28-rc4
I already sent this question to the hardware list, but I think it's not really a hardware problem so I post this here again. Hi, In the new Kernel of the latest FSO I noticed some changes. The config files for parameters like threshold, sample rate etc. are now in the following folders: Acc1: /sys/class/i2c-adapter/i2c-0/0-0073/lis302dl.1 Acc2: /sys/class/i2c-adapter/i2c-0/0-0073/lis302dl.2 When I read out the Acc values I get strange values. I set the device to 100 Hz that means I should get one (3D) value every 10 ms but I get two even with a different time stamp whitch differs round about 0.4 ms. Because of the axis orientation it cannot be from the second Accelerometer. So where does this additional (3D)value come from? This log I recorded from the first accelerometer with 100 Hz. (If set to 400 Hz I get two values every 2.5 milliseconds, the same problem) What's going wrong? [mili seconds] [X-Value] [Y-Value] [Z-Value] 761.370972 0.384486 -0.133511 8.770032 761.744995 0.384333 -0.133732 8.770234 771.169006 0.384194 -0.133953 8.770455 771.552002 0.384067 -0.134173 8.770696 780.945984 0.383952 -0.134391 8.770953 781.161987 0.383846 -0.134604 8.771228 790.721008 0.383749 -0.134813 8.771520 790.937012 0.383667 -0.135022 8.771827 800.564026 0.383606 -0.135238 8.772151 800.775024 0.383569 -0.135466 8.772492 810.315002 0.383556 -0.135704 8.772849 810.536011 0.383564 -0.135948 8.773211 820.111023 0.383588 -0.136196 8.773564 820.304993 0.383626 -0.136446 8.773902 829.940979 0.383677 -0.136694 8.774227 830.156006 0.383737 -0.136940 8.774551 839.75 0.383805 -0.137180 8.774886 839.966003 0.383878 -0.137413 8.775231 849.533020 0.383954 -0.137638 8.775575 849.75 0.384033 -0.137852 8.775908 Now I'm using the latest FSO but with tho old kernel an it works fine. If I should open a ticket please tell me where to do that. Best Regards Michael ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community