Usinagaz Documentation & Frequently Asked Questions (FAQ) Samuel Thibault Fri, 22 Aug 2008 11:43:54 +0100 Documentation and Answers to Frequently Asked Questions about Usinagaz & Internet connection of HP calculators ______________________________________________________________________ Table of Contents 1. Introduction 2. Usinagaz 2.1 CHAT 2.2 PPPON 2.3 PPPOFF 2.4 UIDLE 2.5 USOCKET 2.6 UBIND 2.7 UCONNECT 2.8 UCLOSE 2.9 UWRITE 2.10 UREAD 2.11 UACCEPT 2.12 RESOLV 2.13 USOCK2MASK 2.14 USELECT 2.15 UGETOPT 2.16 USETOPT 3. Utools 3.1 PING 3.2 PINGFLOOD 3.3 ECHO 3.4 NETTIME 4. Mail&News 4.1 Mail 4.2 News 5. How to use a Unix-box as a TCP/IP network provider for the hp, thanks to pppd 5.1 Connection 5.2 Bringing interneting to the hp 6. How to use Zindoz 9x as a TCP/IP network provider for the hp 7. How to use Zindoz 2000 as a TCP/IP network provider for the hp 8. How to connect to an isp using a modem (or a mobile phone) 8.1 First stage: serial connection 8.2 Second stage: modem / mobile phone configuration 8.3 Third stage: network connection 9. NB 10. FAQ 10.1 So, how does all this work? 10.2 What is an IP? 10.3 Why is the alarm annunciator lit? 10.4 Why does the left shift sometimes light? 10.5 CHAT hangs waiting for the first "OK" 10.6 What is 'Upar'? 10.7 Thost, DNS, MCL,... so many annoying little settings! 10.8 I got the error 'Circular Reference'?! 10.9 What log to send for debuging? 10.10 I patched kernel 2.2.x, 0<=x<=15, and compilation says 'has no member poll_wait' (or something like this) 10.11 I don't understand what Usinagaz Does 10.12 Why did you call it Usinagaz? Is this a Gaz factory?! 10.13 Oh god! Usinagaz Rebooted the calc! 10.14 I couldn't find the source code, where is it? ______________________________________________________________________ 1. Introduction This File is maintained by Samuel Thibault If: o your question doesn't appear here ; o my answer doesn't fit to your expects ; o my answer seems wrong ; o I made a tipo, o you managed to do something with my messy software o you didn't manage to do something with my messy software please mail Well, generally speaking, please mail! I don't have much feedback, so it is quite difficult to meet people's need... This document was made using the SGML-Tools (Standard Generalized Markup Language) package and is available in ASCII and HTML versions. All versions come from the same source, and are thus updated simultaneously. You can find newer versions here: . 2. Usinagaz The main software! 2.1. CHAT Takes a chat-list (ie a string list like { "wait1" "send1" "wait2" ...} ) and applies it on the serial port (see 'man chat' for Unix users): example: { "" "hello" "hi" "how are you?" "nice" } CHAT will: o Wait for nothing, hence do nothing ; o Send "hello" (without ", of course); o Wait for "hi" ; o Send "how are you?" ; o Wait for "nice". If the machine which is connected to your hp doesn't says what is waited for, CHAT may hang (pressing ON can still interrupt it), for example, if it replies "hello" to our "hello", CHAT will hang, but if it replies "philosophically enough, hello", it won't, since this indeed contains 'hi' (even twice)! This is quite useful so as to connect to an isp via a modem. If you set flag 32 (32 SF), the last line of the screen shows the current expected Question, and the discussion is shown over it. It is mostly used for debugging. 2.2. PPPON Does ppp negociation, ie compression and IP adress negociation. Hold DROP down if you want to abort negociation. Annunciators should light while the negociation is processed (No, it's not christmas ;-). <- LCP Request was sent <- -> LCP Ack was received <- -> a LCP Ack was sent <- -> a (*) LCP negociation was done -> a (*) IPCP request was sent a (*) IPCP Ack was received (*) IPCP Ack was sent IPCP negociation was done If connection doesn't seem to get establised, a Timeout error is raised. You can force Timeout by pressing left shift for instance (way to abort connection). If you need PAP authentication, push login and password onto the stack before calling PPPON. They won't be dropped, but will be copied in Upar for future calls (hence you won't have to enter them again). Beware! If you call PPPON with two strings pushed onto the stack (which are not your password or login), you may get an error... Yes, it's weird, and I'll look for another solution if someone really needs it. example: "mylogin" "mypassword" PPPON 2.3. PPPOFF Cuts ppp connection down. If connection doesn't seems to get down, a Timeout error is raised. You can force Timeout by pressing left shift for instance. 2.4. UIDLE just call it from time to time so that basic services can work (icmp for instance) and buffers can be flushed. If a ppp disconnection or a tcp RST happens, an error is raised. 2.5. USOCKET Must be called to get a socket (for now, only socket <0h> is supported). Takes an approx real number: 0. for dgram (UDP), 1. for stream (TCP), 2. for raw. It gives a strange object which looks like <0h>. This "Magic socket number" *must* be kept untouched: just store it in a local variable so as to be able to give it back. Some day, when I have time to loose, I will implement multi socket... example: 1. USOCKET -> s \<< blabla... \>> to get a socket number. Warning: when you call USOCKET, flags 33, 34 and 35 are cleared for compatibility. See UREAD for more details. 2.6. UBIND If you want your local port to be something else than default, call UBIND with the magic socket number and the binary int corresponding to the wanted local port. If you want to go back to a default port, call it with #0 example: s #25d UBIND if you want to be a smtp server. (s holds the magic socket number) 2.7. UCONNECT Before sending or receiving, you must say to whom and on which port you want to connect. It takes a magic socket number, the IP address, and the remote port to connect to, the two latter being binary ints. If that socket is a TCP one, Usinagaz will duly connect, or else only recording is done. example: s "smtp.isp.net" #25d UCONNECT if you want to connect to your isp's e-mail service. If connection doesn't seem to get established, a Timeout error is raised. 2.8. UCLOSE If the socket is a TCP one, to UCLOSE ourself is mandatory, so do it as soon as you've finished sending your data, giving it your magic socket number. This will also free the socket for other applications. example: s UCLOSE Please always try to close sockets, even when your application terminates on some error! 2.9. UWRITE Takes a string and a magic socket number, and sends the string using that socket's parameters. example: "HELO" s UWRITE If data doesn't seem to get acked by the peer, a Timeout error is raised. No assumption can then be made about what data was effectively received, so that your application should handle this problem, or the connection should be cut off and retried. 2.10. UREAD Takes a magic socket number, and waits for some data on that socket then pushes it as a string. Hold DROP down if you want to stop waiting. Warning! No NEWOB is done on the string, you must do it yourself if you want. example: s UREAD If no data seems to arrive, an empty string is returned after some time. If you chose TCP, and the peer disconnected, you get a "disconnected" error, and you *must* disconnect yourself using UCLOSE, as soon as you want (you may still want to send data before doing this) You may not want to wait, and read what is ready. For this, set flag 33 (33 SF). On the contrary, you may want to fill the buffer as much as possible, and only get back when buffer is full or timed out. For this, set flag 35 (35 SF) Usinagaz doesn't treat data by default. However, if you only want to get a line from the buffer, leaving the rest for future use, please set flag 34 (34 SF). Usinagaz will then recognize the CR+LF, LF, CR and LF+CR sequences, only push what precedes the first occurence, and drop these sequences. 2.11. UACCEPT Takes a magic socket number, and waits until a connection to the hp is tried on that socket. The result is another magic socket number, on which you can then use UREAD, UWRITE and UCLOSE. example: s UACCEPT If you stop being patient, you may press DROP to stop UACCEPT. You then get an "interrupted" error. 2.12. RESOLV PPPON automatically gets DNS addresses when connecting, so that you can use RESOLV to translate a domain name into an IP example: "www.thefreecat.org" RESOLV note: Applied to an IP (already resolved), it does nothing, and applied to "10.11.12.13" ie the dotted decimal representation, it returns #0A0B0C0D, as expected, without asking to any server, you even needn't be connected! "0" returns remote host's ip note: The returned object is always the same, so if you want to keep several results, call NEWOB on them or else you'll just get the last result. important note: always call RESOLV *before* establishing your socket: RESOLV itself needs a socket to make the resolution, so it would destroy your own socket. 2.13. USOCK2MASK Given a socket number, returns a mask containing only that socket number. Masks can be ORed and ANDed thanks to usual AND and OR functions. example: s USOCK2MASK note: The returned object is always the same, so if you want to keep several results, call NEWOB on them or else you'll just get the last result. 2.14. USELECT Given a read mask, a write mask, an exception, and a timeout (in 1024th of second, as a real), wait until some socket is ready for read, write or exceptionnal event, or the timeout expires. Timeout >= 1048576 means indefinite timeout. The result is the modified masks, in the same order. example: s USOCK2MASK #0 #0 0 immediately returns #0 #0 #0 if s is not ready for reading, or #1 #0 #0 if (s is <0h> and) is ready for reading. s USOCK2MASK #0 #0 1024 immediately returns #1 #0 #0 if (s is <0h> and) is ready for reading. Else it waits at most for a second for this to happen. 2.15. UGETOPT Returns the content of a given option: #0 Local IP (the IP of the calculator) #1 Remote IP (the IP of the computer which the calculator is connected to) #2 Number of DNS servers #3 IP of first DNS server #4 IP of second DNS server #5 Login #6 Password example: #0 UGETOPT 2.16. USETOPT Sets some option. See previous section for the list of options. Can be useful to set DNS servers by hand: #2 #2 USETOPT #0A000001 #3 USETOPT #0A000002 #4 USETOPT 3. Utools Useful tools to tinker with interneting. 3.1. PING Takes an IP, and gives 1 if ping succeded, else 0 3.2. PINGFLOOD Takes an IP, and keeps pinging. By breaking it with ON, one gets the success percentage (generally 1!) 3.3. ECHO Takes a real n and an IP, sends n chars on the echo port of the IP, and gives the number of corresponding received chars. 3.4. NETTIME Takes an IP, asks the server and updates hp's clock. You'll need to set a MCL variable to tell the timezone and Daylight Saving state, for instance GMT-4 and Daylight Saving enabled: { 0 0 0 -4 -4 1 1 0 } 'MCL' STO 4th and 5th elements must be the current timezone (in hours) and the 6th and 7th element must be 1 if Daylight Saving is enabled, 0 else. It is not very precise, but precise enough for hp: ~=1 sec offset. You should install Heiko Arnemann's ClckAdjst program: NETTIME will then call it to tell the needed shift. Hence by calling NETTIME from times to times your can very easily tune ClckAdjst's adjustment. If the shift makes the date change, it is considered as too big, and hence NETTIME just calls ClIni after setting the clock. WARNING: to keep it simple, it is unable to manage midnight's date change. So avoid running it just around midnight. 4. Mail&News A little mail & news implementation. 4.1. Mail o Set a SMTP capable IP in 'smarthost' (ask your isp) o Set your hostname in 'hostname' (some isp require it, others don't bother) o Write messages in the stack as the following example suggest: 4: "fromadr@email" 3: "toadr@email" 2: "The subject" 1: "The body of the letter" and launch 'sendmail'. The message is now in Unsent. o To flush messages, launch 'sendmailq' ( If some error happen, you should get a warning during the post, and the whole error message + the body of the message are send to you in Inbox (as usual) ) o Set POP3 servers in 'fetchmailrc' as the following example suggests: { { "pop.mail.fr" { { "mum" "herpass" 1 1 } { "dad" "hispass" 0 1 } ... } } { "pop.isp.uk" { { "toto" "hispass" 1 0 } ... } } ... } where 1 1 is respectively for "delete mails after reading" and "fetch only unread mails" and 0 0 would be "keep them on server after reading" and "fetch all mails" and launch 'fetchmail' NB: It is very important to keep messages on the server when you also read them from another machine. You can now read them in 'Inbox' 4.2. News o Set a NNTP capable IP in 'newshost' (ask your isp) o Put posts in 'Unposted' as the following suggests: { "From: you@yourhost.com Newsgroups: comp.sys.hp48 Subject: nothing interesting hello Best Regards" ... } o And launch 'POST' to post unposted posts (!) Beware: Don't let a single . on its own line in any message, it would break it. 5. How to use a Unix-box as a TCP/IP network provider for the hp, thanks to pppd 5.1. Connection The kernel must be compiled with async ppp support (either within the kernel or as a loadable module), and the pppd package must be installed Linux users must apply a patch so as to get xon/xoff working: see then, you'll have to launch pppd on the connected serial port: for instance, in my /etc/inittab file, there's the line: hp:2345:respawn:/usr/sbin/pppd nodetach call hp &>/dev/null and in /etc/ppp/peers, there's the file hp containing: /dev/ttyS0 9600 10.0.0.1:10.0.0.5 local xonxoff noccp novj noauth silent persist proxyarp lock ms-dns 194.149.160.9 ms-dns 194.149.160.1 o /dev/ttySx is the serial port. For HP49G+ via USB, use /dev/ttyUSBx. For HP49G+ via IR, use /dev/ircommx o 9600 is 9600bps (sig...) o 10.0.0.1 is the ip of the unix system o 10.0.0.5 is an arbitrary IP number o local is because no hardware control is available o xonxoff should trigger software control, should! o noccp and novj are not mandatory, but fasten connection o noauth prevents the Unix box from using CHAP or PAP o in the same way, silent & persist are here to save time o proxyarp lets the hp appear on an ethernet network o lock allows me to switch between pppd and minicom: I kill pppd a dozen times ; then init gives up respawning it, I then can launch minicom, and the lock file will do the rest o ms-dns lines are there to tell the hp which dns servers to use. Make sure that there is no lcp-echo-interval or lcp-echo-failure in /etc/ppp/options (else the connection would keep breaking...) type init q to ask init to reread inittab, and voila! You can now connect to you Unix box at any time. 5.2. Bringing interneting to the hp Check that inetd or xinetd is set up look at /etc/inetd.conf, and look for lines like: time dgram udp wait root internal tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /home/tftp If a # precedes them, erase it. If they don't exist, type them. Then try something like /etc/init.d/netbase restart, or /etc/rc.d/init.d/inetd restart, or any mixture of both :) If inetd isn't automatically started at bootup, you should ask it to be. Hp can now ask for the time by using NETTIME, or for a file located in /home/tftp by using TFTP. That's not much, but it's up to you to write your own interneting programs, using usinagaz! (see examples in bin) Well, you may also use your Unix box as a gateway to internet for your hp, thanks to forwarding and masquerading. Please look at the appropriate howtos. 6. How to use Zindoz 9x as a TCP/IP network provider for the hp (not that easy ;-) ) (it may vary upon windows versions) (to my knowledge, this is not possible with the IR of hp49g+) It's a bit like setting up a connection to Internet: first copy mdmcbx.inf to c:\windows\inf (or something like that) Go to control panel, then Modem, Add, Don't probe, select (on the left) VirginiaTech, and (on the right) Direct Connection, Next, choose the com port to which you'll plug your hp, Next, and Terminate. We now have a fake modem, let's set up a fake internet connection: Go to distant network access, Add, type whatever name you want, select the modem Direct Connection, and Configure (that is the most important) within Configure, set the speed (9600), in connection, see in advanced to set Xon/Xoff, and do some logging. That should be ok. Next, type any phone number, OK right-click on that new connection, and select Properties: See in 'type of server': uncheck: o connect to a network o NetBEUI o IPX/SPX check: o TCP/IP click on TCP/IP parameters: o check 'specify an adress' and type whatever IP adress you want (*not* 0.0.0.0!) o uncheck 'use as default Gateway' OKOK Type the following program on the hp: \<< 13 CHR DUP 2 \->LIST CHAT PPPON \>> (save it ;-) and launch it then on win, launch the connection (type whatever login & password you want) and *pray*. Connected? YES Well, ok, but I wonder what you will do with it: Zindoz doesn't have much things to bring to hp with regards to interneting ;-) What you can do is to install Cygwin with its inetutils package, and then use inetd, just like in the Unix section above. NO Argnn, I can't do much: both zindoz & usinagaz are bugged, and ppp debugging in that case is quite difficult without a dedicated machine in between (see ) Maybe merely retrying will work? 7. How to use Zindoz 2000 as a TCP/IP network provider for the hp (quite easyer ;-) It's a bit like setting up a connection to Internet: Go to Remote connection, Remote Network Access, select set up a new connection via modem. Choose to add a private network connection, type any phone number, Go to the properties of the freshly created network connection, clic on configure: set maximum baud rate to 9600, *don't* activate hardware flow control, and choose no scripting. OK In Options, uncheck "ask for a name, a password, a certificate, etc...", as well as "ask for a phone number" In Security, keep standard parameters, allowing a non encrypted password, and choose no scripting. In Network handling, choose PPP, and in parameters, uncheck multibundle negociation, ok. Check TCP/IP. OK. Type the following program on the hp: \<< { "" "CLIENT" "CLIENTSERVER" } CHAT PPPON \>> if you have Windows NT4, and \<< { "" "CLIENT" "" "CLIENT" "CLIENTSERVER" } CHAT PPPON \>> if you have Windows 2000 (save it ;-) and launch it then on win, launch the connection and *pray*. Connected? YES Well, ok, but I wonder what you will do with it: Zindoz doesn't have much things to bring to hp with regards to interneting ;-) What you can do is to install Cygwin with its inetutils package, and then use inetd, just like in the Unix section above. NO Argnn, I can't do much: both zindoz & usinagaz are bugged, and ppp debugging in that case is quite difficult without a dedicated machine in between (see ) Maybe merely retrying will work? 8. How to connect to an isp using a modem (or a mobile phone) It isn't that easy, it will depend on: o your modem (or mobile phone) o your provider 8.1. First stage: serial connection This is in fact the crucial point: if this works, the rest should work. But until it works, you won't be able to do anything... Don't run away! I managed to do it with my own Robotics Modem, so there's some hope :) Plug (or align IrDA leds of) the modem or mobile phone to your hp (there are plenty of plans on ). Configure serial connection in IOPAR to maximum speed (unless you have good reasons not to do so). For IrDA, your device needs to support the COMM protocol. Try some OPENIO "AT" 13 CHR + 10 CHR + XMIT DROP and then look what BUFLEN DROP SRECV says: if it says "OK", you've done it! If it doesn't, you may have to ask the modem to ignore DTR and RTSCTS by either switching a dip on the modem (US Robotics modem may have it, for instance), or by sending a configuration string thanks to a computer before connecting it to the hp. This is really modem- dependant, so I can't help much here. See for more information. 8.2. Second stage: modem / mobile phone configuration This is in fact related to First stage, since the parameters you give here may hold those you had to give to your modem thanks to a computer before connecting it to your hp. Look in your modem manual, to know the initialisation string to set XONXOFF on your modem and disable RTSCTS, it should be something like AT&F&H2&I1&R1 If you don't have any manual (most general case nowadays... *snif*), ask Windows to do some logging in your modem's configuration panel, then connect to your favorite isp with xonxoff but no rtscts, at 9600 bps. Your initialisation string(s) is(are) in c;\windows\modemlog.txt. now, \<< 32 SF "" 13 CHR 10 CHR + @ avoid garbage "" "ATZ" 13 CHR + 10 CHR + @ resets modem "OK" "AT&FYourinitialisationString" 13 CHR + 10 CHR + @ setups modem "OK" "ATDTPhoneNumber" 13 CHR + 10 CHR + @ dial number "sillything" 9 \-> LIST CHAT \>> should work, and you should see at least CONNECT 9600 (or something similar) (if you have several initialisation strings, add lines like "OK" "ATYourNextInitialisationString" 13 CHR + 10 CHR + between the line containing the first initialisation string and the "ATDT" line, and increase 9 by twice as much as the number of lines you added (in fact, by the number of strings you added)). The "avoid garbage" line is there to ensure that the AT letters of ATZ will be the first on its line (just in case someone did some "garbage" XMIT before launching the script). For mobile phone connection (gprs for instance), you may use something like E0V1 as initialization string, and *99# as phone number. Just have a look at documentations on the net for gprs & linux, you'll probably find what you need. 8.3. Third stage: network connection According to your isp's policy, you may have to login via scripts, or via PAP. Indeed, while testing the program of the Second Stage, you should have got something appearing just after CONNECT, either o Login: or something similar, you'll need a script ; o some garbage like ~y}#.!}!},} }.}"}&} }*} } }(}"}'}"g.~ you'll need PAP. If you need a script, you may just adapt this one to your parameters: << 32 SF "" 13 CHR 10 CHR + @ avoid garbage "" "ATZ" 13 CHR + 10 CHR + @ resets modem "OK" "AT&FYourInitialisationString" 13 CHR + 10 CHR + @ setups modem "OK" "ATDTPhoneNumber" 13 CHR + 10 CHR + @ dial number "ogin:" "login" 13 CHR + 10 CHR + @ logs in "asswd:" "passwd" 13 CHR + 10 CHR + "~" 13 \-> LIST CHAT PPPON >> If you need PAP, you may just adapt that one to your parameters: << 32 SF "" 13 CHR + 10 CHR + @ avoid garbage "" "ATZ" 13 CHR + 10 CHR + @ resets modem "OK" "AT&FYourInitialisationString" 13 CHR + 10 CHR + @ setups modem "OK" "ATDTPhoneNumber" 13 CHR + 10 CHR + @ dial number "CONNECT" 9 \-> LIST CHAT "login" "passwd" PPPON DROP2 >> YourInitialisationString was found in your manual (or in Windows, or in last resort, mine), and PhoneNumber, login and passwd were given to you by your isp. If it works once, it should always work. You may then remove "32 SF" for a more quiet connection. Good luck! 9. NB What precedes may be some help, but it won't replace good observation of your situation, and adapting, mixing, retrying it might very well be needed, but once its works... Well it works! So save your script everywhere you can, print it, learn it by heart! 10. FAQ 10.1. So, how does all this work? Of course you installed and configured usinagaz.lxy (available in bin). (Warning: on HP48, you *must* install it in port 0 or 1, and on HP49/50, you *must* install it in port 0) For mail & news, install mail.l4x (anywhere) For ping, echo & time getting (tinkering), install utools.l4x (anywhere) o You must set up what you will need on internet (ask your isp), ie: o SMTP, NEWS and POP3 servers: "smtp.yourisp.net" 'smarthost' STO "news.yourisp.net" 'newshost' STO { { "pop.yourisp.net" { { "yourname" "yourpass" 0 1 } } } } 'fetchmailrc' STO (see mail_news to know what 0 1 means) o your Timezone, for example GMT-01, and Daylight Saving active: { 0 0 0 0 -1 0 1 0 } 'MCL' STO o Plug your hp either directly to a host's serial port or to a modem (have a look at 'isp' for modem connecting) o Use the library Usinagaz to connect: Launch CHAT if needed, then PPPON, which negociates a ppp connection and lights announciators to tell how well it looks. o Now we are connected, ie the hp has entered the strange world of Internet. We can start using this connection, thanks to the library utools, for example #0 PING will test if the host to which we are connected is really up. If you have set a time server up on your Unix box (see section Unix), you can try #0 NETTIME to update hp's clock (* What follows requires your host to do IP masquerading if you connected the hp to your own host. If you don't know what it is, your host doesn't, sig*** On Unix boxes, please RTFM *) o Now, let's start doing real interneting: "youpibouh.thefreecat.org" PING will test if my site is still up. sendmailq will send the pending mails in Unsent, as described in 'mail' POST will post the pending articles. fetchmail will fetch the mail boxes you set up in 'fetchmailrc' o Now it's time to disconnect: PPPOFF will close the connection Your modem may not hangup automatically. If so, do it manually. 10.2. What is an IP? As I write 'IP', I mean either: o a domain name, like "www.hpcarc.org" o a 32bit binary int corresponding to the dec pointed adress (big endian), like #0A040301h for 10.4.3.1. o #0h to say 'the remote host' the hp is connected to (quite faster for local test :) 10.3. Why is the alarm annunciator lit? On 48 series, because the host you are connecting to doesn't handle XON/XOFF. If it is a Linux host with kernel < 2.6, just apply a patch to the kernel (see ) (It seems that SCO Unix also has that bug, please send me its source code so as to correct it) A heavy load may also beget overflow. If it is a Windows host, I don't see much to do except checking one more time the option XON/XOFF in the modem configuration. If it is a modem, please check the configuration string to set XON/XOFF up. Oh... Yes, your battery may also be dead ;-) 10.4. Why does the left shift sometimes light? It is a transmission error, and a frame was lost. If it comes to be quite frequent, please check your cable. Low Battery can also beget transmission errors. 10.5. CHAT hangs waiting for the first "OK" There are chances that your modem require CR: When editing on the hp, "ATZ " is the same string as "ATZ" 10 CHR +, which means ATZ\n Most modem require CR, ie want ATZ\r\n be sent. To do this on a hp, enter the string "ATZ" 13 CHR + 10 CHR +, or when typing a program, type "ATZ, call the CHAR tool, insert the character 13, exit the CHAR tool, press <-/ and finish with ". When editing, it should appear like "ATZ* " (where * is a little square ;-) (\n = 10 CHR = 0x0A = LF = Line Feed, \r = 13 CHR = 0x0D = CR = Carriage Return) 10.6. What is 'Upar'? If you are not connected, you can PURGE it to save memory: it is just a static buffer so as to avoid excessive garbage collections and store connection parameters. You can look what is stored in thanks to 'analyse.d4x' But on 49/50 series, always purge it *after* you called PPPOFF, since the interrupt handler puts data into it. Some checking is done, but... I can tell you ;-) 10.7. Thost, DNS, MCL,... so many annoying little settings! You can throw them in any port so as not to see them in VAR: #0 :2:Thost STO 10.8. I got the error 'Circular Reference'?! This surely means you are talking to your modem, which echoes the request and replies, so that you actually connected to yourself! A 32 bits magic number is used to prevent this (your ISP would surely have chosen a different from Usinagaz' one, or else you're really unlucky :) Retry, just to see ;-) It usually happens when you failed to connect to your ISP's modem, but you weren't able to detect it. For instance, you didn't put a "CONNECT" statement in chat list, and launched PPPON without being sure your modem is really connected. Correct your script to add such one, just have a look at what your modem says when it is connected, by asking CHAT to wait for "silly string". But don't include the connection speed, ie prefer "CONNECT" rather than "CONNECT 9600", since who knows whether the weather is not so horrible that your phone line really can't get more than 300 bps? 10.9. What log to send for debuging? If you are connecting to your own linux host, calling pppd with option debug should be enough, provided that there is a line '*.debug /var/log/debug' in your /etc/syslogd.conf so as to save logs in /var/log/debug (beware: that file will grow very much!). If you are connecting to a remote host or to a silly host (such as window$), and if (and only if) you feel crazy enough to set a host act as a logger, you may find analyse ( ) useful (although pre-alpha version). Please always try to download the latest release on my own site before reporting. Anyway, please tell me its date (in README's header), and which (zip or tgz). 10.10. I patched kernel 2.2.x, 0<=x<=15, and compilation says 'has no member poll_wait' (or something like this) Yes, those kernels don't have such member. Please remove this line in linux/drivers/net/ppp.c: wake_up_interruptible(&tty->poll_wait); 10.11. I don't understand what Usinagaz Does Well, I'm sorry to say that, but I think that what you don't understand is merely what "Internet" is. Internet is a network of networks. Everybody says that, but not everybody understands what it really means. I'd even say: very few people really fully understand it. Usinagaz is merely the piece of software which connects the hp to the internet, ie negociates a ppp connection, just as Zindozs does when you click on 'connect to the Internet', and then lets other programs be able to use this connection. Usinagaz doesn't do anything on Internet. You can consider it as a library to be used to program internet applications: mail&news reader, www browser, telnet, icq, irc.... Anything you want, provided that you write the appropriate program. Here are the main provided commands: USOCKET gives you a magic socket number, which represent the record within Usinagaz which holds the connection's parameters. UBIND lets you ask Usinagaz to talk from another port than the default. UCONNECT asks Usinagaz to connect to the specified computer, on the specified port. UCLOSE disconnects if TCP socket, and free the socket. UACCEPT accepts incoming connections. UREAD reads data. UWRITE writes data. RESOLV translates between domain names ("www.thefreecat.org") and IP addresses (213.11.8.225) And *not* more! This is how Unix (the kernel) works: it lets programs connect, read&write data, and close. How all data should be understood must be handled by applications. As I wrote Usinagaz, I only wanted to bring my TCP/IP knowledge to the hp community. I don't have much time to write the applications, I only wrote some: mail&news, tftp, wget, which I need for my personal use. If someone needs something in particular, he can either: o write a program to do it. This will require his reading the rfc (Request For Comments: the internet standards documentation, available on ) about it, or any other documentation, so as to know how it works *exactly*, and then implement it. o "ask someone who knows" to do it for you 10.12. Why did you call it Usinagaz? Is this a Gaz factory?! Well, I'd say yes :o) To be convinced, please have a look at usinagaz.eps in the source package, or on http://youpibouh.thefreecat.org/info/prog/down/usinagaz.eps It is a diagram of the function calls. I don't keep it up to date, but it is enough to show that even if I try my best to do terminal calls (those links whith a white arrow), the current used stack levels (first number) + the number of used stack levels (second number) may come up to 6! The bold lines indicate those which bring the maximum stack level. 10.13. Oh god! Usinagaz Rebooted the calc! Aow, please mail me the content of your Upar at Samuel Thibault , so that I can know what was exactly happening (the received packet, Usinagaz' state, etc...) 10.14. I couldn't find the source code, where is it? It's not on hpcalc.org for disk space reasons. But you can download them from the Usinagaz website http://youpibouh.thefreecat.org/info/prog/down/.