RE: [Owfs-developers] More on Hanging Problems
I noticed there were a missing usb_release_interface() before trying to reconnect. That was probably why it didn't work as you wanted. It could never claim the interface without this missing call. BTW: Do you mind if I add a semi-colon to all lock function-calls like STATLOCK, STATUNLOCK etc. It screw up my emacs-indent and I think it looks much cleaner if there are an ending semi-colon too... :) I will checkin some changes within a few minutes and this should work much better I hope.. :) /Christian On Sun, 2005-06-26 at 20:39 -0400, Alfille, Paul H.,M.D. wrote: Actually, Jan says it didn't help. My next attempt will be to re-enumerate as part of the reconnect -- Apparently the old USB device structure pointer doesn't work. Things get a little more complicated if more than one USB adapter is used. We can reconnect, but the order may have changed. In any case, it's great that Jan has a setup where he can consistently trigger the errors. Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Christian Magnusson Sent: Sunday, June 26, 2005 4:31 PM To: owfs-developers Subject: Re: [Owfs-developers] More on Hanging Problems This seem to be a god idea... Perhaps a debug counter should be there to show how many reconnects there have been too. I'll try to add the reconnect-code for the serial adapter tomorrow if I get some spare time at work. /Christian On Sun, 2005-06-26 at 06:27, Paul Alfille wrote: On Saturday 25 June 2005 04:32 am, Jan Kandziora wrote: Am Samstag, 25. Juni 2005 05:50 schrieb Paul Alfille: Your logs show mainly BUS_select_low_errors increasing. And DS... errors. But I think that's just a summary, am I right? Unfortunately there are 5 places in file ow_bus.c function BUS_select_low where that variable is incremented. I've added some (temporary) printf's to run the program in foreground and flip the garbalizer. Ok, I've attempted a fix. We now have a reconnect method for each adapter (ony the USB is really implemented). If there is an error of the type you've been finding, the USB adapter is closed and reopened and reinitialized. I hop it works. Give it a try. Paul --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492opÌk ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers -- Christian Magnusson [EMAIL PROTECTED] --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers
RE: [Owfs-developers] More on Hanging Problems
I think most of us have seen the occasional failures from these EMC effects, but without your setup and observations it would be hard to hunt down. Again, thank you. Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jan Kandziora Sent: Monday, June 27, 2005 5:35 AM To: owfs-developers@lists.sourceforge.net Subject: Re: [Owfs-developers] More on Hanging Problems Am Montag, 27. Juni 2005 05:26 schrieb Gregg C Levine: Hello from Gregg C Levine Paul, explain this phrase in better detail please: In any case, it's great that Jan has a setup where he can consistently trigger the errors. In an embedded an environment it is sometimes considered desirable to stress test the file system by triggering power cycles. There's an article on that, and the methods used somewhere on the Linux-MTD site. What I do isn't stress-testing. That would mean to get parameters when some component will probably fail and has to be replaced. That's not what I'm after, at least at the moment. I just ran into that failure - it makes 1-wire completely unusable for my application. Now I can see for myself how a rigged system would be desirable for stress testing the file system that we've created. But a detailed explanation would be good thing. Jan, what are you running? Which distribution? What is the hardware configuration? I walked into this meeting late, and left my agenda and most of my notes in a different location. I'm designing a semiautomatic vending machine with a lot of attached devices (flow-rate sensors and solenoid driven valves), most of them in a ten-meter range around the machine, but some of them about 100m far away. The computer which will be built into this will be a MIPS based embedded board, which isn't completed yet. The computer I use to test is a Gene6310 embedded (more like barebone) PC board. Its i386-family based. This computer is working and would be used as a backup solution, if the MIPS board is not completed in time. I have a testbench, where I can arrange the devices like they were already put into that vending machine. I hooked up the 1-wire to USB via a off-the-shelf DS9490 adapter to the barebone. There is a mains transformer 230/24V~ 150W (completely passive, not a switching one), which is the power supply for the sensors and solenoids. The actual transformer for the machine will be a 400W type, which makes things even worse. This mains transformer generates some kind of EMC when switching it ON or OFF with an ordinary 230V switch. This is understandable if the switching happens outside of the zero-cross of voltage (ON-switching) or current (OFF- switching). The EMC pulse causes either the USB or the 1-wire (or both) to disconnect - which leads owfs into an unusable state. I'm pretty sure I can minimize this EMC by putting a zero-cross and snubbing circuit into my transformer - but I'm very unsure other appliances in the pub or gas station where the vending machines will be mounted are so kind. That's why I think we have to be able to recover from this error automatically. Kind regards Jan -- There's light at the other end of the the Windows. --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers
RE: [Owfs-developers] More on Hanging Problems
I was wondering about that. I've been making changes and sending a tar-ball of the source to Jan for testing. The semicolon sounds like a good idea. My indents are also screwed up. Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Christian Magnusson Sent: Monday, June 27, 2005 6:20 AM To: owfs-developers@lists.sourceforge.net Subject: RE: [Owfs-developers] More on Hanging Problems I noticed there were a missing usb_release_interface() before trying to reconnect. That was probably why it didn't work as you wanted. It could never claim the interface without this missing call. BTW: Do you mind if I add a semi-colon to all lock function-calls like STATLOCK, STATUNLOCK etc. It screw up my emacs-indent and I think it looks much cleaner if there are an ending semi-colon too... :) I will checkin some changes within a few minutes and this should work much better I hope.. :) /Christian On Sun, 2005-06-26 at 20:39 -0400, Alfille, Paul H.,M.D. wrote: Actually, Jan says it didn't help. My next attempt will be to re-enumerate as part of the reconnect -- Apparently the old USB device structure pointer doesn't work. Things get a little more complicated if more than one USB adapter is used. We can reconnect, but the order may have changed. In any case, it's great that Jan has a setup where he can consistently trigger the errors. Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Christian Magnusson Sent: Sunday, June 26, 2005 4:31 PM To: owfs-developers Subject: Re: [Owfs-developers] More on Hanging Problems This seem to be a god idea... Perhaps a debug counter should be there to show how many reconnects there have been too. I'll try to add the reconnect-code for the serial adapter tomorrow if I get some spare time at work. /Christian On Sun, 2005-06-26 at 06:27, Paul Alfille wrote: On Saturday 25 June 2005 04:32 am, Jan Kandziora wrote: Am Samstag, 25. Juni 2005 05:50 schrieb Paul Alfille: Your logs show mainly BUS_select_low_errors increasing. And DS... errors. But I think that's just a summary, am I right? Unfortunately there are 5 places in file ow_bus.c function BUS_select_low where that variable is incremented. I've added some (temporary) printf's to run the program in foreground and flip the garbalizer. Ok, I've attempted a fix. We now have a reconnect method for each adapter (ony the USB is really implemented). If there is an error of the type you've been finding, the USB adapter is closed and reopened and reinitialized. I hop it works. Give it a try. Paul --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492opÌk ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers -- Christian Magnusson [EMAIL PROTECTED] --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=ick ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles,
RE: [Owfs-developers] More on Hanging Problems
Nice changes, Christian. I'm a little worried about burning CPU cycles if the adapter is unplugged. We will aggressively try to reconnect. I notice you make 3 attempts at reconnecting each time. That will be multiplied by the 3 attempts ar read/write. Would there be any harm in a delay before the 2nd and third reconnect attempt? 1 second? I suppose we could also allow a command line parameter to change that value for embedded systems where precisely tuning delays and utilization is important. Jan can offer some feedback on this. Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Christian Magnusson Sent: Monday, June 27, 2005 7:18 AM To: owfs-developers@lists.sourceforge.net Cc: [EMAIL PROTECTED] Subject: Re: [Owfs-developers] More on Hanging Problems Try the latest cvs again... I have fixed a missing usb_release_interface() and some other statistics from those errors. /Christian On Mon, 2005-06-27 at 11:34 +0200, Jan Kandziora wrote: Am Montag, 27. Juni 2005 05:26 schrieb Gregg C Levine: Hello from Gregg C Levine Paul, explain this phrase in better detail please: In any case, it's great that Jan has a setup where he can consistently trigger the errors. In an embedded an environment it is sometimes considered desirable to stress test the file system by triggering power cycles. There's an article on that, and the methods used somewhere on the Linux-MTD site. What I do isn't stress-testing. That would mean to get parameters when some component will probably fail and has to be replaced. That's not what I'm after, at least at the moment. I just ran into that failure - it makes 1-wire completely unusable for my application. Now I can see for myself how a rigged system would be desirable for stress testing the file system that we've created. But a detailed explanation would be good thing. Jan, what are you running? Which distribution? What is the hardware configuration? I walked into this meeting late, and left my agenda and most of my notes in a different location. I'm designing a semiautomatic vending machine with a lot of attached devices (flow-rate sensors and solenoid driven valves), most of them in a ten-meter range around the machine, but some of them about 100m far away. The computer which will be built into this will be a MIPS based embedded board, which isn't completed yet. The computer I use to test is a Gene6310 embedded (more like barebone) PC board. Its i386-family based. This computer is working and would be used as a backup solution, if the MIPS board is not completed in time. I have a testbench, where I can arrange the devices like they were already put into that vending machine. I hooked up the 1-wire to USB via a off-the-shelf DS9490 adapter to the barebone. There is a mains transformer 230/24V~ 150W (completely passive, not a switching one), which is the power supply for the sensors and solenoids. The actual transformer for the machine will be a 400W type, which makes things even worse. This mains transformer generates some kind of EMC when switching it ON or OFF with an ordinary 230V switch. This is understandable if the switching happens outside of the zero-cross of voltage (ON-switching) or current (OFF- switching). The EMC pulse causes either the USB or the 1-wire (or both) to disconnect - which leads owfs into an unusable state. I'm pretty sure I can minimize this EMC by putting a zero-cross and snubbing circuit into my transformer - but I'm very unsure other appliances in the pub or gas station where the vending machines will be mounted are so kind. That's why I think we have to be able to recover from this error automatically. Kind regards Jan -- Christian Magnusson [EMAIL PROTECTED] --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers
[Owfs-developers] NSLUG2 and OWFS
Hello from Gregg C Levine Paul here's a bit of a nasty poser for you. I remember when the OWFS list was just cranking up, and we were discussing the porting to the LinkSys wireless router of the OWFS binaries, this came up; a decidedly frustrated and rather angry poster complained to use that he couldn't get his USB fob to work on this device after building the OWFS binaries and installing them. Naturally I don't have my local archives of the list. I had a bit of a computer problem last month. It happens that the fellow, who provided the photos for opening the wireless router, and installing the serial ports on it, also did one for the NSLUG2 device. Also another gentleman has gotten the famous, or is that infamous one wire weather station to work on his NSLUG2 device it seems to me that he's followed a totally different route for such work. He originally brought that thing to Linux, and then discovered that Linux ran on the NSLUG2, and followed suit. Almost forgot, here's the location for the whole business, http://oww.sourceforge.net/index.html Of course what's interesting to me is the obvious thing, is this, what prompted LinkSys to have these serial ports on their hardware? And why didn't they tell us about them to begin with? I suppose I raised this issue when we started I suppose at some point I'll probably buy one of those things. --- Gregg C Levine [EMAIL PROTECTED] --- The Force will be with you... Always. Obi-Wan Kenobi --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers
RE: [Owfs-developers] NSLUG2 and OWFS
Hi Gregg, Do you want to look up the fellow? The OWFS list is searchable on GMANE (http://dir.gmane.org/gmane.comp.file-systems.owfs.devel) and Mail Archive (http://www.mail-archive.com/owfs-developers%40lists.sourceforge.net/)\ I'm sure we could get OWFS to run on the NSLU2, or practically any linux-enabled device. Christian has ported it to everything including a Coldfire board, and the memory and resource requirements are quite modest. Clearly our architecture works very well with these devices. owserver can run locally or remotely, and we can aggregate multiple sources easily and flexibly. The only reason I explored the LinkSys router specifically is that wireless access is sometimes essential for an application. If wiring were possible, the sensor could have been connected directly. The speculation is that the serial headers on the board were for design and posssible expansion. The processor has dedicated serial pins natively, and being able to put a serial port in during the design and testing phase was probably useful. Get one of these devices. It's fun! Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gregg C Levine Sent: Monday, June 27, 2005 11:32 PM To: owfs-developers@lists.sourceforge.net Subject: [Owfs-developers] NSLUG2 and OWFS Hello from Gregg C Levine Paul here's a bit of a nasty poser for you. I remember when the OWFS list was just cranking up, and we were discussing the porting to the LinkSys wireless router of the OWFS binaries, this came up; a decidedly frustrated and rather angry poster complained to use that he couldn't get his USB fob to work on this device after building the OWFS binaries and installing them. Naturally I don't have my local archives of the list. I had a bit of a computer problem last month. It happens that the fellow, who provided the photos for opening the wireless router, and installing the serial ports on it, also did one for the NSLUG2 device. Also another gentleman has gotten the famous, or is that infamous one wire weather station to work on his NSLUG2 device it seems to me that he's followed a totally different route for such work. He originally brought that thing to Linux, and then discovered that Linux ran on the NSLUG2, and followed suit. Almost forgot, here's the location for the whole business, http://oww.sourceforge.net/index.html Of course what's interesting to me is the obvious thing, is this, what prompted LinkSys to have these serial ports on their hardware? And why didn't they tell us about them to begin with? I suppose I raised this issue when we started I suppose at some point I'll probably buy one of those things. --- Gregg C Levine [EMAIL PROTECTED] --- The Force will be with you... Always. Obi-Wan Kenobi --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=ick ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers
RE: [Owfs-developers] More on Hanging Problems
I agree... 3 attempts are perhaps not necessary. If it fails it should only be necessary to try 1 attempt and then return read-error, since it's not possible to retry the old on-going operation anyway. I tried to start owserver to /dev/ttyS0 and then launch minicom on /dev/ttyS0 too. This will trig the read errors at once since minicom set the speed to 19200 baud and they will probably grab some chars each... :) When minicom exits everything initialize and owserver works again. I noticed one bug with oldSerialTio on COM_open() which should be separate for each serial port though. /Christian On Mon, 2005-06-27 at 18:40 -0400, Alfille, Paul H.,M.D. wrote: Nice changes, Christian. I'm a little worried about burning CPU cycles if the adapter is unplugged. We will aggressively try to reconnect. I notice you make 3 attempts at reconnecting each time. That will be multiplied by the 3 attempts ar read/write. Would there be any harm in a delay before the 2nd and third reconnect attempt? 1 second? I suppose we could also allow a command line parameter to change that value for embedded systems where precisely tuning delays and utilization is important. Jan can offer some feedback on this. Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Christian Magnusson Sent: Monday, June 27, 2005 7:18 AM To: owfs-developers@lists.sourceforge.net Cc: [EMAIL PROTECTED] Subject: Re: [Owfs-developers] More on Hanging Problems Try the latest cvs again... I have fixed a missing usb_release_interface() and some other statistics from those errors. /Christian On Mon, 2005-06-27 at 11:34 +0200, Jan Kandziora wrote: Am Montag, 27. Juni 2005 05:26 schrieb Gregg C Levine: Hello from Gregg C Levine Paul, explain this phrase in better detail please: In any case, it's great that Jan has a setup where he can consistently trigger the errors. In an embedded an environment it is sometimes considered desirable to stress test the file system by triggering power cycles. There's an article on that, and the methods used somewhere on the Linux-MTD site. What I do isn't stress-testing. That would mean to get parameters when some component will probably fail and has to be replaced. That's not what I'm after, at least at the moment. I just ran into that failure - it makes 1-wire completely unusable for my application. Now I can see for myself how a rigged system would be desirable for stress testing the file system that we've created. But a detailed explanation would be good thing. Jan, what are you running? Which distribution? What is the hardware configuration? I walked into this meeting late, and left my agenda and most of my notes in a different location. I'm designing a semiautomatic vending machine with a lot of attached devices (flow-rate sensors and solenoid driven valves), most of them in a ten-meter range around the machine, but some of them about 100m far away. The computer which will be built into this will be a MIPS based embedded board, which isn't completed yet. The computer I use to test is a Gene6310 embedded (more like barebone) PC board. Its i386-family based. This computer is working and would be used as a backup solution, if the MIPS board is not completed in time. I have a testbench, where I can arrange the devices like they were already put into that vending machine. I hooked up the 1-wire to USB via a off-the-shelf DS9490 adapter to the barebone. There is a mains transformer 230/24V~ 150W (completely passive, not a switching one), which is the power supply for the sensors and solenoids. The actual transformer for the machine will be a 400W type, which makes things even worse. This mains transformer generates some kind of EMC when switching it ON or OFF with an ordinary 230V switch. This is understandable if the switching happens outside of the zero-cross of voltage (ON-switching) or current (OFF- switching). The EMC pulse causes either the USB or the 1-wire (or both) to disconnect - which leads owfs into an unusable state. I'm pretty sure I can minimize this EMC by putting a zero-cross and snubbing circuit into my transformer - but I'm very unsure other appliances in the pub or gas station where the vending machines will be mounted are so kind. That's why I think we have to be able to recover from this error automatically. Kind regards Jan -- Christian Magnusson [EMAIL PROTECTED] --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click