Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra prefix character e as incoming message from iOS application #3

Open
sauvikatinnofied opened this issue Nov 25, 2016 · 1 comment

Comments

@sauvikatinnofied
Copy link

For my current project, I need to create a communication channel in between an iOS app and a Mac. On iOS device, I am using PeerTalk's. I am just running [Peertalk iOS Example] from the library. It seems that initial handshaking is woking fine. But I am facing issues when I am sending a text message from iOS to my node application. My node application always receives the message sent from iOS app but an e character is always appended as a prefix. Do you have any idea what causes this inconsistency?

Will you please suggest me any iOS library to communicate with node-usbmux?

On Linux 16.02, this module is not working for iOS devices. Can you provide/suggest a proper communication way in between an iOS application and a node app running on Linux using your library?

@DeMille
Copy link
Owner

DeMille commented Dec 20, 2016

I'm not sure about that prefix character. Are you using getTunnel()? usbmux.getTunnel() gives back the actual net.Ssocket connection from usbmuxd (the middleman service) and after that initial handshake with usbmuxd nothing should happen. The library shouldn't even listen to messages that come through the socket at that point. You can enable debug logging to check for anything weird. Do a export DEBUG=usbmux:* to enable that output.

I did figure out the problem with linux though! Libimobiledevice behaves differently than on windows and osx. On osx/windows usbmuxd is always running in the background, but on linux it only gets started when a device is connected and is stopped as soon as the last device is disconnected (based on udev rules). So previously if you tried to listen for devices before any were plugged in it would throw an error. I've added a filesystem watcher to check for the usbmuxd.pid file to see when that's running, and that seems to be working for me (on ubuntu). It's kind of a hacky solution, I just don't think there's another way to do it.

I pushed those changed to a new branch, you can install them directly from github with:
npm install DeMille/node-usbmux#ubuntu

Let me know if that one works for you on w/e linux variant you are using, or if it's a different issue entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants