English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware

 
 
Thread Tools
Old 31 March 2016, 14:18   #21
cmsj
Registered User
 
cmsj's Avatar
 
Join Date: Feb 2016
Location: London / UK
Posts: 166
Quote:
Originally Posted by idrougge View Post
I think it would make sense if one could supply an argument for a certain card identifier to be tested, with the programming reporting back an OK/FAIL code if it found the card. That would make it easy to use in scripts.
I pushed up new code which lets you supply an argument to test a particular identifier, and added a script (currently untested) for integrating cardInfo with Roadshow. There's also a binary in the repo now, but I'm still holding off on releasing it properly until I have permission from @Thomas

Code:
; Roadshow example script for cardInfo.
; v1.0 by Chris Jones <cmsj@tenshu.net>
;
; This script is intended to be called from S:User-Startup
; It must be called *before* Roadshow's script

; NOTE: THIS SCRIPT WILL DELETE EVERYTHING IN DEVS:NetInterfaces/
;       YOU SHOULD THINK VERY CAREFULLY ABOUT WHETHER YOU WANT THAT.
;       AT THE VERY LEAST YOU SHOULD BE SURE TO HAVE ALL YOUR INTERFACE
;       DEFINITIONS IN SYS:Storage/NetInterfaces/

FAILAT 20

; Remove all NetInterfaces
Delete >NIL: DEVS:NetInterfaces/#?

; Copy CNet16 if my NetGear FA411 is present
cardInfo >NIL: p 1041
IF NOT WARN
  Copy >NIL: SYS:Storage/NetInterfaces/CNet16#? DEVS:NetInterfaces/
ENDIF

; Copy Prism2 if my NetGear MA401 is present, and start WirelessManager
cardInfo >NIL: p 29440
IF NOT WARN
  Copy >NIL: SYS:Storage/NetInterfaces/Prism2#? DEVS:NetInterfaces/
  Run <>NIL: C:WirelessManager prism2.device
ENDIF
cmsj is offline  
Old 31 March 2016, 14:32   #22
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
Great!
idrougge is offline  
Old 31 March 2016, 15:10   #23
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Writing to the SYS-partition is a no-go. And delete #? is a bad idea in any case.

I'd rather change the Network-Startup script to AddNetInterface only the present interface.
thomas is offline  
Old 31 March 2016, 15:46   #24
cmsj
Registered User
 
cmsj's Avatar
 
Join Date: Feb 2016
Location: London / UK
Posts: 166
Quote:
Originally Posted by thomas View Post
Writing to the SYS-partition is a no-go. And delete #? is a bad idea in any case.
Yes, I am not thrilled about the way that script works.

Quote:
Originally Posted by thomas View Post
I'd rather change the Network-Startup script to AddNetInterface only the present interface.
So, I did have another thought here, which is that my current script is incompatible with someone who has multiple interfaces, at least one of which is not PCMCIA (maybe a 1200 in a tower with a permanent Zorro/PCI NIC, and occasional PCMCIA wifi).

However, I'm also not particularly keen on the idea of modifying Network-Startup, since that's a file supplied by another program, which will very likely get overwritten at some point when Roadshow gets updated.

So, what I'm thinking now is that I will remove all of the delete/copy stuff from the script, and suggest that people only put their permanent NICs in DEVS:NetInterfaces/, then use a cardInfo script to just directly run AddNetInterface SYS:Storage/NetInterfaces/whatever.

Thanks for your suggestions - also what are your thoughts about me releasing this as GPL with the bits of our code that I've copied?
cmsj is offline  
Old 31 March 2016, 16:03   #25
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Quote:
Originally Posted by cmsj View Post
However, I'm also not particularly keen on the idea of modifying Network-Startup, since that's a file supplied by another program, which will very likely get overwritten at some point when Roadshow gets updated.
Network-Startup is the place you are supposed to start your network-dependent software from (for example an NTP client or SMBFS and the like). I doubt it will be overwritten without notice.


Quote:
So, what I'm thinking now is that I will remove all of the delete/copy stuff from the script, and suggest that people only put their permanent NICs in DEVS:NetInterfaces/, then use a cardInfo script to just directly run AddNetInterface SYS:Storage/NetInterfaces/whatever.
That's the right way to go.
thomas is offline  
Old 31 March 2016, 16:49   #26
cmsj
Registered User
 
cmsj's Avatar
 
Join Date: Feb 2016
Location: London / UK
Posts: 166
Quote:
Originally Posted by thomas View Post
Network-Startup is the place you are supposed to start your network-dependent software from (for example an NTP client or SMBFS and the like). I doubt it will be overwritten without notice.
Hmm, ok, well then that's just a documentation change. I have updated the comments in the script to suggest the option of calling the script from Network-Startup.

Quote:
Originally Posted by thomas View Post
That's the right way to go.
Updated it to do that: https://github.com/cmsj/cardInfo/blo...dInfo-Roadshow

I need an answer about releasing this though, please!
cmsj is offline  
Old 31 March 2016, 17:45   #27
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
I am not sure if checking only the product number is sufficient. AFAIK the vendor number is unique but the product number is unique only within the same vendor. Different vendors might use the same product number for different products.
thomas is offline  
Old 31 March 2016, 23:09   #28
cmsj
Registered User
 
cmsj's Avatar
 
Join Date: Feb 2016
Location: London / UK
Posts: 166
Quote:
Originally Posted by thomas View Post
I am not sure if checking only the product number is sufficient. AFAIK the vendor number is unique but the product number is unique only within the same vendor. Different vendors might use the same product number for different products.
While that's true, I don't feel the need to do anything about it. I'm not intending on building a repository for every pcmcia card out there. Each user just needs to find one attribute that uniquely identifies each of their cards (or add logic to test multiple attributes in their script).

Edit: I'd also be very surprised if it's even possible to build such a repository, since it's very likely that I could take two apparently identical PCMCIA cards and find that they return different tuple information

Last edited by cmsj; 01 April 2016 at 10:47.
cmsj is offline  
Old 01 April 2016, 09:04   #29
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
My example is public domain, you can do whatever you want with it.

Furthermore at least in Germany is it allowed to learn from other people's code and then publish your own code created from what you've learned, as long as you don't copy any piece 1:1. Therefore I think you don't need to use the GPL only because you looked at the cnet code.
thomas is offline  
Old 01 April 2016, 10:46   #30
cmsj
Registered User
 
cmsj's Avatar
 
Join Date: Feb 2016
Location: London / UK
Posts: 166
Quote:
Originally Posted by thomas View Post
My example is public domain, you can do whatever you want with it.
Thanks

Quote:
Originally Posted by thomas View Post
Furthermore at least in Germany is it allowed to learn from other people's code and then publish your own code created from what you've learned, as long as you don't copy any piece 1:1. Therefore I think you don't need to use the GPL only because you looked at the cnet code.
I did take some actual code, I think, but I will go and audit both codebases and be sure. I would prefer to do the MIT license, but I think GPL is also fine really.

Thanks again for all of your help!
cmsj is offline  
Old 04 April 2016, 10:21   #31
cmsj
Registered User
 
cmsj's Avatar
 
Join Date: Feb 2016
Location: London / UK
Posts: 166
cardInfo 1.0 is now on Aminet: http://aminet.net/package/util/cli/cardInfo
cmsj is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
PCMCIA SRAM Cards ? Audronic Hardware mods 24 18 December 2016 17:12
Are pcmcia cards hot swappable? trydowave support.Hardware 15 25 September 2013 10:11
PCMCIA flash memory cards beatnik support.Hardware 9 23 July 2010 17:25
Question about PCMCIA cards Gavilan support.Hardware 5 19 January 2006 17:38
PCMCIA Flash Cards Smiley support.Hardware 7 02 March 2005 20:21

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:13.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.15188 seconds with 16 queries