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 Tue 19 Nov 2019, 10:15
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Virtualization
Problem using a USB modem in Wine
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [14 Posts]  
Author Message
WoodLark


Joined: 17 Apr 2007
Posts: 131
Location: South Carolina, USA

PostPosted: Sat 26 Jan 2019, 16:20    Post subject:  Problem using a USB modem in Wine  

I am using portable wine 3.3_v2 in tahrpup 6.0.6. to run a program named Accessbase2000 originally written for windows XP. The program works fine except for one problem.

The program needs to communicate with a remote site via modem. I have a USRobotics v.everything connected to a usb port via a usb to serial adapter. Puppy detects the adapter and assigns it to ttyUSB0.

Wine creates a link com5 to ttyUSB0. However the program will only allow direct communication via serial cable if a com port is selected. It requires that I choose a port labelled "modem". I have tried deleting the symlink to com5 and creating one to "modem" in the dosdevices folder, but this is not recognized by the software. I have also tried creating the link using regedit, but this was apparently not recognized. In both cases I get the message "No telephony devices (modems) defined.

Has anyone here successfully dealt with a similar situation?
Back to top
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 1397
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: Sat 26 Jan 2019, 17:11    Post subject:  

Take a look at post #2 in this link
https://ubuntuforums.org/showthread.php?t=1335098

You say that you tried changing symlinks already, I just posted this info because you were not specific so this may not apply.

I use wine but not with any external devices.

.
Back to top
View user's profile Send private message 
WoodLark


Joined: 17 Apr 2007
Posts: 131
Location: South Carolina, USA

PostPosted: Sat 26 Jan 2019, 19:45    Post subject:  

Thanks for trying to help. The thread you posted was about getting the usb device recognized as a com port. I have no problem with that, by default, it created a link to com5. My problem is that my software distinguishes between com ports and a modem port, but can't find the modem port even with symlinks. I have tried:

ln-s /dev/ttyUSB0 modem (from the dosdeves folder)
ln-s /dev/ttyUSB0 /dev/modem + ln -s /dev/modem modem

The first creates a broken link. The second creates a valid link, but doesn't solve the problem.

I have also tried both links created in registry under wine\ports. The links do not get created at all.
Back to top
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 1397
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: Sun 27 Jan 2019, 04:13    Post subject:  

I can't find anything on running Accessbase2000 under wine.

For more background heres a link to your thread over at winehq
https://forum.winehq.org/viewtopic.php?f=2&t=31873


.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5553
Location: King's Lynn, UK.

PostPosted: Sun 27 Jan 2019, 07:26    Post subject:  

@ woodlark:-

Following the link perdido's given to your thread over at WineHQ, I see you mention about 'a number of other programs being deleted'.

Which is not surprising. When you install WINE (whatever version) the first thing you have to do is to run 'winecfg' - either by clicking directly, or through the terminal. This sets the WINE 'environment' up, in the process creating the hidden .wine directory inside your user directory - which in Puppy's case is, of course, /root.

When you installed a new version, either by deleting, then re-installing - or by 'over-installing' on top of the existing one - you would have 'over-written' the existing ~/.wine directory with a new, empty WINE 'container' (this is essentially what the .wine directory is). Hence, why your existing programs disappeared.

-------------------------------

Like perdido, I too run a fair number of programs under WINE. Also, like him, none of my Windows programs require external connections. (Unless you count an external USB HDD, which WINE handles with aplomb). My guess here would be that it's probably to do with the difference between the way in which Windows labels network connection stuff, and the way in which it's done in Linux.....and that, even with the newest version of WINE, something is being 'lost' in the translation.

Can I ask where you obtained WINE 4.0 from? Our community WINE 'guru', version2013, hasn't currently got as far as a stable version of WINE 4.0 (I believe he may have attempted a trial compilation of one of the 'testing' versions).....and many of us prefer his packages, since they are built specifically for Puppy.

One final point. It's perhaps a silly question, but.....I take it you have made certain you're running WINE in XP-compat mode? WINE will permit compatible emulation with most versions of Windows, all the way from the current WIN 10, right back to Windows 2.0.....


Mike. Wink

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
WoodLark


Joined: 17 Apr 2007
Posts: 131
Location: South Carolina, USA

PostPosted: Sun 27 Jan 2019, 08:30    Post subject:  

I first tried Wine while running MX-17. Based on the first reply I got in WineHQ Forum, I upgraded Wine to 4.0 which I downloaded using the debian repository recommended on the WineHQ website.

When I said it deleted a number of programs, they were not Windows programs; they were linux programs: featherpad, keepassxc et al. I was not happy. In all fairness, I don't think it was wine at fault. I believe it was synaptic.

I decide to wipe the hard drive and start over with tahrpup. That is when I discovered portable wine. What I have installed now is portable wine 3.3_v2.1. I like the idea of portable wine since it operates separately from the main OS.

Unfortunately, if I can't solve this modem problem, I may just have to give up on wine entirely. I suspect the problem may lie inside the accessbase2000 program itself. The company that produced accessbase2000 has the worst customer support that I have encountered, and is no help at all.

To your final point: I am running wine in XP mode.
Back to top
View user's profile Send private message 
Peterm321

Joined: 29 Jan 2009
Posts: 406
Location: UK

PostPosted: Mon 28 Jan 2019, 10:13    Post subject:  

I'm using a broadband wireless modem and it works flawlessly with WINE, of course the modem emulates ethernet and so is handled by dhpcd daemon all natively and in the background by linux. So WINE just deals with any network communication in the application layer.

I'm no expert in this accessbase software or getting WINE to use the com[1..9] ports. That said, perhaps I can make a few points as I do use WINE a fair bit.

If I were getting a message such as modems not being found, etc I would ask WINE via the WINEDEBUG environment variable to show me all the files a program is trying to open. Of course all the files that it tries to open as it scans each element in the PATH are also shown but its easy to open a Terminal Window, and dump the debug output of a Windows program to a file and then use an editor or the command line utility grep to scan through the output looking for example, strings such as "com" or "modem":

Code:

export WINEDEBUG="+file"
wine <path to Accessbase2000 exe>  &>/tmp/winereport.txt


https://forum.winehq.org/viewtopic.php?t=11269

I also use "dependency walker" with WINE. I've had it for years. It is a small windows program works well to show missing DLLs etc and does a fair job at an API scan.
Back to top
View user's profile Send private message 
WoodLark


Joined: 17 Apr 2007
Posts: 131
Location: South Carolina, USA

PostPosted: Mon 28 Jan 2019, 11:47    Post subject:  

Thank you for responding. My issue is not that wine won't recognize the modem. It does, as ttyUSB0 and assigns it to com5. My problem is that my software can't deal with a modem as "com5", it needs to be identified as "modem".

Unfortunately, I just received a reply from one of the developers at wineHQ, and he says that what I need can't be done in wine.
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 3485
Location: 500 seconds from Sol

PostPosted: Mon 28 Jan 2019, 11:56    Post subject:  

Probably a stupid question, but will it recognize a symlink to com5 named 'modem'?

Alternative: can windows shortcuts be created under Wine?
Back to top
View user's profile Send private message 
WoodLark


Joined: 17 Apr 2007
Posts: 131
Location: South Carolina, USA

PostPosted: Mon 28 Jan 2019, 13:07    Post subject:  

Will not work with symlink (I've tried).
Back to top
View user's profile Send private message 
Peterm321

Joined: 29 Jan 2009
Posts: 406
Location: UK

PostPosted: Mon 28 Jan 2019, 20:54    Post subject:  

woodlark Mon 28 Jan 2019, 15:47 wrote:

Unfortunately, I just received a reply from one of the developers at wineHQ, and he says that what I need can't be done in wine.


If you are referring to Bob Wya's reference to tapi32.dll being stubs - that post is correct insofar as a lot of WINE's minor or less system central DLLs use a lot of stubs. That, though, may not be the conclusive issue in this case.

I would not rule out WINE working with that modem without a determination of what device the accessbase2000 software is looking for and why it fails. Of course you may decide the amount of trawling through debugging logs is not worth it.

My latest modem is a breeze. It can be configured through a standard web hi.link interface. So I configured it to switch automatically into ethernet mode. So when I plug it in it self registers as eth0 device.

But the first modem I had was a Huawei E169 and that was not so friendly. Unlike Windows (which registered it initially as a CD device then switched it to modem mode) Linux had to be tweaked to do it. The idea of the modem initially being treated as a CD device was when in CD mode, it had software on it that Windows could recognise and install and thereafter switch into modem mode automatically.

Its not Linux's fault if Hardware manufacturers assume that "everyone uses Windows" so let's only create a windows platform for install purposes.

But in Puppy linux I had to configure a program called usb_modeswitch to send the modem a control string to tell it to switch to modem mode, and it ran not through the cdc_ether kernel driver but rather through PPP.

This article I came across, albeit a bit dated, seems to describe something similar to get linux to recognise one kind of USB robotics modem:

https://support.usr.com/support/9000/9000-linux-ug/Installing%20the%20modem.html

Before giving up it may be worth checking linux compatibility with the hardware and also investigate the Windows program with WINEDEBUG set suitably.

The terminal command lsusb also gives useful information on a connected USB device, eg for me

Code:

lsusb
Bus 002 Device 009: ID 12d1:14dc Huawei Technologies
....



If I had trouble getting my modem to work I would search with the vendor/product ID (in the above for example search "12d1 14dc" with the word linux) and see if Linux will work with the particular device. If there exists a Linux native program and or device driver that will work with the device the if Linux can see it, then so should WINE. From then on its a matter of finding out how to get the windows program to interact with the Linux network or device layer.

In my experience USB modems will work with Linux but they may need a bit of coaxing and configuring.

two more points

Special device files can also be created with the mknod program - the information needed is the major and minor number EG

Code:
ls -l /dev/ttyS0

crw-r--r-- 1 root tty 4, 64 Jan 27 22:10 /dev/ttyS0   

mknod modem c 4 64


IE create special character device file called "modem" with Major, minor number 4 64. In effect modem would be the same device as /dev/ttyS0 (but it would not be a symlink)

My second point is that hot-plugable devices such as USB modems tend to be handled by the udev daemon, and running the below command in a terminal window may at least show the reaction of udev to the plugging in of the device:

Code:
udevadm monitor
Back to top
View user's profile Send private message 
WoodLark


Joined: 17 Apr 2007
Posts: 131
Location: South Carolina, USA

PostPosted: Tue 29 Jan 2019, 17:35    Post subject:  

Getting the modem to work under linux is no problem at all. It was automatically detected and assigned to ttyUSB0. I verifed that it works by using to pupdial to dial an outside number.

The problem is that my software looks for a device named "Modem", and I have been unable to convince Windows (Wine) that "Modem" is the same as "ttyUSB0". I have tried symlinks created in the Wine dosdevices directory, in the Wine registry, and in the linux /dev directory. None of them have worked.

In another version of linux, I have tried a udev rule, but hat didn't work either. I am looking at using a udev rule like:

Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303" KERNEL==ttyUSB*", SYMLINK+="Modem"


in puppy, but I am not sure of the best place to put it or what to name it.
Back to top
View user's profile Send private message 
Peterm321

Joined: 29 Jan 2009
Posts: 406
Location: UK

PostPosted: Tue 29 Jan 2019, 20:38    Post subject:  

Tue 29 Jan 2019, 21:35 wrote:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303" KERNEL==ttyUSB*", SYMLINK+="Modem"


According to https://askubuntu.com/questions/471821/pl2303-attached-to-ttyusb0-change-it-to-ttys its something more like

SUBSYSTEM=="tty" ATTRS{idVendor}=="067b" ATTRS{idProduct}=="2303" SYMLINK+="devicename%n" MODE:="0666" ???

maybe try

Code:

SUBSYSTEM=="tty" ATTRS{idVendor}=="067b" ATTRS{idProduct}=="2303" SYMLINK+="modem%n" MODE:="0666"


NB that site also refers to linking the USB serial to Linux standard serial devices /dev/ttyS[0-9].

Perhaps https://www.downtowndougbrown.com/2014/03/linux-udev-rules/ may help?

Unfortunately a piece of software might come up with something like "No telephony devices (modems) defined." maybe because it can't find a particular named file or device or because it does find a named file or device, opens it up but the device doesn't respond to particular ioctl commands. As per perdido's post previous, this accessbase2000 software doesn't seem well discussed on winehq forums, but it shouldnt be that difficult to do a trace via the WINEDEBUG to see if the software is looking for a particular named file or device and bails out after failing to find it.

By the way a user ejona86 at https://forum.winehq.org/viewtopic.php?f=8&t=29627 reported that renaming com5 to com1 fixed a problem.

As an aside (not being sure this relates to this issue) but it is possible to copy certain of XP DLLs (typically to the folder the program resides in) then using winecfg under the "libraries" tab to tell WINE to try a native DLL first.


https://linuxconfig.org/configuring-wine-with-winecfg
Back to top
View user's profile Send private message 
WoodLark


Joined: 17 Apr 2007
Posts: 131
Location: South Carolina, USA

PostPosted: Thu 07 Feb 2019, 16:04    Post subject:  

Sorry I haven't responded sooner, but I had to delay this project for a while.

The windows drivers in XP set up a registry entry in HKEY_LOCAL_MACHINE:Current ControlSet:Enum:SERENUM:USR0100.

I think this is where AccessBase 2000 is looking to find whether a modem is installed or not. Since Windows drivers can't be used in Wine, this registry key is never created.

At this point, I think I am looking at diminishing returns, and will have to drop the project permanently.

Thanks to everyone for your helpful suggestions.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [14 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Virtualization
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.0750s ][ Queries: 12 (0.0201s) ][ GZIP on ]