Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 30 Aug 2015, 11:50
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Problem with Blinky
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 4 [56 Posts]   Goto page: 1, 2, 3, 4 Next
Author Message
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7454
Location: Perth, Western Australia

PostPosted: Fri 03 Feb 2006, 04:59    Post subject:  Problem with Blinky  

I've started this thread so hacking Blinky can be coordinated.
Anyone who wants to fix the problem can let the rest of us know, so we don't get 3 or 4 people simultaneously working on the same problem.
(well, I hope we do get one volunteer!)

The problem is described in the Developer News page for Jan. 3:
http://www.puppylinux.com/news.htm
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Fri 03 Feb 2006, 05:10    Post subject:  

I use adsl, and your blinky-binary works.
It blinks blue and green.
I run it from a xterm in Fluxbox.

Code:
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:EB:0B:95:AD 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33952 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35465 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:18134355 (17.2 MiB)  TX bytes:5764284 (5.4 MiB)
          Interrupt:11 Base address:0xcc00

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:208229 errors:0 dropped:0 overruns:0 frame:0
          TX packets:208229 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:85177618 (81.2 MiB)  TX bytes:85177618 (81.2 MiB)

ppp0      Link encap:Point-Point Protocol 
          inet addr:213.39.230.56  P-t-P:213.191.84.196  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:32299 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33812 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:17324510 (16.5 MiB)  TX bytes:4970757 (4.7 MiB)

# dmesg |grep eth
eth0: Realtek RTL8201 PHY transceiver found at address 1.
eth0: Using transceiver found at address 1 as default
eth0: SiS 900 PCI Fast Ethernet at 0xcc00, IRQ 11, 00:50:eb:0b:95:ad.
eth0: Media Link On 100mbps full-duplex
#


Mark
Back to top
View user's profile Send private message Visit poster's website 
jcoder24-guest
Guest


PostPosted: Fri 03 Feb 2006, 07:27    Post subject:  

With your ifconfig I believe blinky is most likely using the ppp0 interface instead of the eth0.
Back to top
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Fri 03 Feb 2006, 07:40    Post subject:  

it seems to work ok with my adsl ... it blinks green and blue, anyway

i am connecting directly using Roaring Penguin, so my interface is ppp0

if i were connecting using adsl through a router, my interface would be eth0, and it would be setup in the network wizard using dhcp
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Fri 03 Feb 2006, 07:42    Post subject:  

oh yes, you are right... My fault Embarassed
I use adsl-start , that uses /etc/ppp/pppoe.conf.

Mark
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7454
Location: Perth, Western Australia

PostPosted: Fri 03 Feb 2006, 08:38    Post subject:  

Yeah, I get the problem when only eth0 is up.

The info is definitely there in /proc/net/dev, the C file that parses it is not picking up the active eth0 line.
Back to top
View user's profile Send private message Visit poster's website 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Fri 03 Feb 2006, 22:32    Post subject:  

Where can I get jwm 1.3? I tried searching but the forum search is not working.

jc
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7454
Location: Perth, Western Australia

PostPosted: Fri 03 Feb 2006, 23:53    Post subject:  

http://www.joewing.net/
Back to top
View user's profile Send private message Visit poster's website 
lior2b
Guest


PostPosted: Sat 04 Feb 2006, 07:44    Post subject: Got it to work! :)  

It didn't really use the /proc/net/dev file, it had some issues inserting new interfaces...
I'm attaching both files I've changed, let me know if it works for you!

http://lior.f2o.org/puppy/usage-proc.c
http://lior.f2o.org/puppy/ifa.c
Back to top
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7454
Location: Perth, Western Australia

PostPosted: Sat 04 Feb 2006, 08:53    Post subject:  

lior2b,
No, with my eth0 interface up, blinky displays blue LEDs, meaning that it has
found the interface, but they don't flash green. Hovering the mouse pointer over displays 0 bytes sent, 0 bytes received.

I only briefly looked at your mods. I saw the comment that it quits if no interface.
Blinky will run in the taskbar, and must not quit. If there are no active interfaces,
Blinky is supposed to display dark-red LEDs, then if an interface becomes active,
the LEDs become blue. This is great for dialup people as they can see at a glance
if their line has dropped out... I think maybe that's the idea? -- it depends how /proc/net/dev really works. I guess -- can't ppp0 be up even after the line has dropped out/disconnected?
Back to top
View user's profile Send private message Visit poster's website 
lior2b


Joined: 04 Feb 2006
Posts: 97
Location: The Holy Land

PostPosted: Sat 04 Feb 2006, 09:04    Post subject:  

Barry, it doesn't quit blinky, it skips the specific line in the /proc/net/dev file,
that's the terminology the original authour used Smile

I'll research about /proc/net/dev to see how i can figure out if the interface is disconnected. Now blinky displays all interfaces listed in /proc/net/dev, and blinks upon activity. If an interface isn't listed anymore, blinky hides it.

Anyways, I'll work on it!
Back to top
View user's profile Send private message Visit poster's website 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Sat 04 Feb 2006, 09:08    Post subject:  

lior2b,
I successfully tested your changes with:

- eth0 only active
- ppp0 only active
- eth0 + ppp0 both active

maybe we could omit displaying the lo0 interface.

I was looking at the code before your changes but got stuck at what look (only did begginers c) liked an uninitialised variable.
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7454
Location: Perth, Western Australia

PostPosted: Sat 04 Feb 2006, 09:57    Post subject:  

I wonder why mine isn't blinking.
I have an active eth0, but just have two blue LEDs.

I just looked at /proc/net/dev, the eth0 line is definitely functioning.
Here's a snapshot:

Code:
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
  eth0: 1669215    2616    0    0    0     0          0         0   248945    2205    0    0    0     0       0          0
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7454
Location: Perth, Western Australia

PostPosted: Sat 04 Feb 2006, 10:05    Post subject:  

Ha ha, now I know!

As I have two interfaces active, eth0 and lo, running blinky from the commandline displays two rows of LEDs.
However running blinky in the taskbar I only see the top row, which is the lo interface.

So, we need to get it to ignore the lo interface.

But that still leaves a problem, as the taskbar can only display the one row of
LEDs. If someone has both eth0 and ppp0 active, there's a problem.
Unless both interfaces are combined into the one row of LEDs?
-- that is, blinky only displays two adjacent LEDs regardless how many
interfaces, the Tx and Rx figures are just summed together.

However, a per interface breakdown could be displayed when the mouse is
hovered over the LEDs.
Note, we need to increase the timeout on the info display -- when mouse
pointed moves over the LEDs the info window pops up but disappears
too quickly.
Back to top
View user's profile Send private message Visit poster's website 
lior2b


Joined: 04 Feb 2006
Posts: 97
Location: The Holy Land

PostPosted: Sat 04 Feb 2006, 10:14    Post subject:  

I made it ignore the lo interface, and i have some ideas:
(*) If no bytes ever recieved mark the interface as inactive (red)
(*) Show all intrefaces (except lo) that exist in /proc/net/dev, if anything disappears from /proc/net/dev mark it as inactive
(*) List all interfaces horizontally, not vertically

What do you say?
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 4 [56 Posts]   Goto page: 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1459s ][ Queries: 13 (0.0198s) ][ GZIP on ]