[beagleboard] ifdown wlanx make system hang
Hi, I am using BB Black RevC. It is offered by Element 14; its OS is Debian. The BBB is used to collect some sensor data and forward it to a server through WiFi interface; the WiFi dongle used is TP-Link TL-WN821N. The BBB is required to function at 7/24 basis. So I run a script inside BBB to do check and maintain WiFi connection: while (true) { res = fping router a few times if (res == yes) { # do nothing } else { ifdown wlanx ifup wlanx } } However, it happens quite often during my test that ifdown wlanx will make the BBB hang. Anyone has similar issue? Is it hardware related: the TP-Link dongle and its driver; Or is there some bug in OS? -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Re: Reading from ADC hangs
Hi Guys, Thank you all for your replies. I found after issuing command: echo cape-bone-iio /sys/devices/bone_capemgr.9/slots The ADC can be read from /sys/devices/ocp.3/helper.15/AIN* files just as pointed out in http://hipstercircuits.com/reading-analog-adc-values-on-beaglebone-black/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: BB black Debian wifi problem
I think the firmware is loaded, the following is the syslog when the wifi dongle is plugged in Mar 3 14:03:47 beaglebone kernel: [426986.157795] usb 1-1.3: new high-speed USB device number 10 using musb-hdrc Mar 3 14:03:47 beaglebone kernel: [426986.238721] usb 1-1.3: default language 0x0409 Mar 3 14:03:47 beaglebone kernel: [426986.239497] usb 1-1.3: udev 10, busnum 1, minor = 9 Mar 3 14:03:47 beaglebone kernel: [426986.239543] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=8178 Mar 3 14:03:47 beaglebone kernel: [426986.239583] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Mar 3 14:03:47 beaglebone kernel: [426986.239618] usb 1-1.3: Product: 802.11n WLAN Adapter Mar 3 14:03:47 beaglebone kernel: [426986.239651] usb 1-1.3: Manufacturer: Realtek Mar 3 14:03:48 beaglebone kernel: [426986.239683] usb 1-1.3: SerialNumber: 00e04c01 Mar 3 14:03:48 beaglebone kernel: [426986.241043] usb 1-1.3: usb_probe_device Mar 3 14:03:48 beaglebone kernel: [426986.241095] usb 1-1.3: configuration #1 chosen from 1 choice Mar 3 14:03:48 beaglebone kernel: [426986.243373] usb 1-1.3: adding 1-1.3:1.0 (config #1, interface 0) Mar 3 14:03:48 beaglebone kernel: [426986.244042] rtl8192cu 1-1.3:1.0: usb_probe_interface Mar 3 14:03:48 beaglebone kernel: [426986.244092] rtl8192cu 1-1.3:1.0: usb_probe_interface - got id Mar 3 14:03:48 beaglebone kernel: [426986.245335] rtl8192cu: Chip version 0x11 Mar 3 14:03:48 beaglebone kernel: [426986.354106] rtl8192cu: MAC address: 00:26:75:7f:d7:7b Mar 3 14:03:48 beaglebone kernel: [426986.354140] rtl8192cu: Board Type 0 Mar 3 14:03:48 beaglebone kernel: [426986.354242] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1 Mar 3 14:03:48 beaglebone kernel: [426986.354395] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw.bin Mar 3 14:03:48 beaglebone kernel: [426986.356190] ieee80211 phy3: Selected rate control algorithm 'rtl_rc' Mar 3 14:03:48 beaglebone kernel: [426986.357973] rtlwifi: wireless switch is on Somehow I guess the problem may be at the wpa configuration part. On Tuesday, March 3, 2015 at 2:04:34 AM UTC+8, sven.n...@gmail.com wrote: One more thing to check is that the firmware is available and gets loaded. Then it has worked for me. /Sven Den måndag 2 mars 2015 kl. 11:17:05 UTC+1 skrev Dajiang He: Hi, I have a BB Black RevC with its original Debian OS. When I plugged in a Aztech wifi dongle: the dongle's blue light is on. when I do lsusb, I can see us 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 413c:2003 Dell Computer Corp. Keyboard Bus 001 Device 006: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter Bus 001 Device 005: ID 0461:4d15 Primax Electronics, Ltd Dell Optical Mouse the wifi adapter is detected. when I do lsmod, Module Size Used by binfmt_misc 5377 1 g_multi47670 2 libcomposite 14299 1 g_multi arc41660 2 rtl8192cu 73560 0 rtlwifi63798 1 rtl8192cu rtl8192c_common51523 1 rtl8192cu mac80211 411868 3 rtlwifi,rtl8192c_common,rtl8192cu cfg80211 344277 2 mac80211,rtlwifi rfkill 16656 1 cfg80211 mt7601Usta601404 0 it looks like the driver is loaded into OS. this is my interface file in /etc/networks regarding to wlan0 part #auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-driver wext wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf #nl80211 and wpa_supplicant part network={ ap_scan=1 ssid=myssid psk=** key_mgmt=WPA-PSK2 My problem is I cannot get the wifi connection. If I do ifconfig, I can see wlan0. Can any expert tell me what I missed? -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Re: Reading from ADC hangs
Hi, by issuing command: echo cape-bone-iio /sys/devices/bone_capemgr.9/slots, now i can see iio:device0. However, when I ran echo 1 /sys/bus/iio/devices/iio\:device0/scan_elements/in_voltage0_en echo 256 /sys/bus/iio/devices/iio\:device0/buffer/length echo 1 /sys/bus/iio/devices/iio\:device0/buffer/enable The last one always fails with echo write error: invalid argument. On Friday, February 27, 2015 at 12:12:58 AM UTC+8, cmbaker3 wrote: What cape did you load? When I reboot, I see as you did : ls -als /sys/bus/iio/devices/ total 0 0 drwxr-xr-x 2 root root 0 Dec 31 1999 . 0 drwxr-xr-x 4 root root 0 Dec 31 1999 .. 0 lrwxrwxrwx 1 root root 0 Dec 31 1999 iio_sysfs_trigger - ../../../devices/iio_sysfs_trigger After I echo cape-bone-iio /sys/devices/bone_capemgr.9/slots then I see : ls -als /sys/bus/iio/devices/ total 0 0 drwxr-xr-x 2 root root 0 Dec 31 1999 . 0 drwxr-xr-x 4 root root 0 Dec 31 1999 .. 0 lrwxrwxrwx 1 root root 0 Feb 26 10:07 iio:device0 - ../../../devices/ocp.3/44e0d000.tscadc/tiadc/iio:device0 0 lrwxrwxrwx 1 root root 0 Dec 31 1999 iio_sysfs_trigger - ../../../devices/iio_sysfs_trigger and : cat /sys/devices/bone_capemgr.9/slots 0: 54:PF--- 1: 55:PF--- 2: 56:PF--- 3: 57:PF--- 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN 7: ff:P-O-L Override Board Name,00A0,Override Manuf,cape-bone-iio Chad On 2/26/2015 4:03 AM, dajia...@gmail.com javascript: wrote: Hi, How come in my system, there is no /sys/bus/iio/devices/iio:device0? Under /sys/bus/iio/devices/, there is only one file iio_sysfs_trigger, which is a symbolic link to some other directory. Is there any configuration I need to do? I am using the latest BB black Rev C by Element14. It is OS is 3.8.13-bone47. Thx. On Wednesday, February 25, 2015 at 8:36:18 PM UTC+8, mala...@elisanet.fi wrote: Thanks for the suggestion. I'll keep that in mind if I need higher sampling rates. However, I did find a way to read ADC through IIO so that it doesn't hang. First set up the channels and the buffer through sysfs: echo 1 /sys/bus/iio/devices/iio\:device0/scan_elements/in_voltage0_en echo 256 /sys/bus/iio/devices/iio\:device0/buffer/length echo 1 /sys/bus/iio/devices/iio\:device0/buffer/enable and then read from /dev/iio:device0. This way I can achieve about 8 kHz sampling rate with a single channel, 4 kHz with two channels and down to ~300 Hz with all eight channels. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Re: Reading from ADC hangs
Hi following ur guide, it almost worked. However, when issuing command echo 1 /sys/bus/iio/devices/iio\:device0/buffer/enable System gives me error: echo: wrrite error: Invalid argument I already use root to issue to command, and strangely echo 1 /sys/bus/iio/devices/iio\:device0/buffer/length worked. On Friday, February 27, 2015 at 12:12:58 AM UTC+8, cmbaker3 wrote: What cape did you load? When I reboot, I see as you did : ls -als /sys/bus/iio/devices/ total 0 0 drwxr-xr-x 2 root root 0 Dec 31 1999 . 0 drwxr-xr-x 4 root root 0 Dec 31 1999 .. 0 lrwxrwxrwx 1 root root 0 Dec 31 1999 iio_sysfs_trigger - ../../../devices/iio_sysfs_trigger After I echo cape-bone-iio /sys/devices/bone_capemgr.9/slots then I see : ls -als /sys/bus/iio/devices/ total 0 0 drwxr-xr-x 2 root root 0 Dec 31 1999 . 0 drwxr-xr-x 4 root root 0 Dec 31 1999 .. 0 lrwxrwxrwx 1 root root 0 Feb 26 10:07 iio:device0 - ../../../devices/ocp.3/44e0d000.tscadc/tiadc/iio:device0 0 lrwxrwxrwx 1 root root 0 Dec 31 1999 iio_sysfs_trigger - ../../../devices/iio_sysfs_trigger and : cat /sys/devices/bone_capemgr.9/slots 0: 54:PF--- 1: 55:PF--- 2: 56:PF--- 3: 57:PF--- 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN 7: ff:P-O-L Override Board Name,00A0,Override Manuf,cape-bone-iio Chad On 2/26/2015 4:03 AM, dajia...@gmail.com javascript: wrote: Hi, How come in my system, there is no /sys/bus/iio/devices/iio:device0? Under /sys/bus/iio/devices/, there is only one file iio_sysfs_trigger, which is a symbolic link to some other directory. Is there any configuration I need to do? I am using the latest BB black Rev C by Element14. It is OS is 3.8.13-bone47. Thx. On Wednesday, February 25, 2015 at 8:36:18 PM UTC+8, mala...@elisanet.fi wrote: Thanks for the suggestion. I'll keep that in mind if I need higher sampling rates. However, I did find a way to read ADC through IIO so that it doesn't hang. First set up the channels and the buffer through sysfs: echo 1 /sys/bus/iio/devices/iio\:device0/scan_elements/in_voltage0_en echo 256 /sys/bus/iio/devices/iio\:device0/buffer/length echo 1 /sys/bus/iio/devices/iio\:device0/buffer/enable and then read from /dev/iio:device0. This way I can achieve about 8 kHz sampling rate with a single channel, 4 kHz with two channels and down to ~300 Hz with all eight channels. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: Reading from ADC hangs
Hi, How come in my system, there is no /sys/bus/iio/devices/iio:device0? Under /sys/bus/iio/devices/, there is only one file iio_sysfs_trigger, which is a symbolic link to some other directory. Is there any configuration I need to do? I am using the latest BB black Rev C by Element14. It is OS is 3.8.13-bone47. Thx. On Wednesday, February 25, 2015 at 8:36:18 PM UTC+8, mala...@elisanet.fi wrote: Thanks for the suggestion. I'll keep that in mind if I need higher sampling rates. However, I did find a way to read ADC through IIO so that it doesn't hang. First set up the channels and the buffer through sysfs: echo 1 /sys/bus/iio/devices/iio\:device0/scan_elements/in_voltage0_en echo 256 /sys/bus/iio/devices/iio\:device0/buffer/length echo 1 /sys/bus/iio/devices/iio\:device0/buffer/enable and then read from /dev/iio:device0. This way I can achieve about 8 kHz sampling rate with a single channel, 4 kHz with two channels and down to ~300 Hz with all eight channels. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.