-
Notifications
You must be signed in to change notification settings - Fork 14
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
USB Wifi Hotspot #1
Comments
Hi, I did try to hack the unit myself via telnet. My RPi0W is designed to connect to my phone's hotspot automatically, and then I simply SSH into it and then telnet into the car. Here is some network analysis: Starting Nmap 7.40 ( https://nmap.org ) at 2017-12-29 12:47 CET Port 3333 is GPS data. Telnet commands (help command): help Print this list NOTE: Arguments specifying 'task' can be either task ID or name. Testing some commands: -> whoami value = 1 = 0x1 -> version -> ioHelp cd "path" Set current working path "attr" contains one or more of: " + - A H S R" characters -> pwd BTW there's a NFS transfert method provided by this telnet thing (see nfsHelp), and I tried to transfer firmware files using this method, but all I got was the equivalent content of the update USB stick, so no use :) Thanks for letting me know about your repo, looks like interesting stuff! Yann |
Interesting. Regarding NFS mount, I guess you mounted RPI remote storage from vxWorks ? I also used nmap to check open ports, but I stayed in a low range. Last but not least, can you provide more details on the RPI0W config ? |
Great, looking forward that new list :) About NFS, that's right, I connected vxWorks into the RPI, did not try the opposite (I'm not even sure it's possible). I don't know what port 20000 is for. The RPI0W USB gadget config is located in the myusbgadget file here: https://github.com/Mwyann/psakey/blob/master/resources/myusbgadget Yann |
Thanks for point out these details. By any chance, do you have some spare memories (or a log) of commands to mount an NFS from vxWorks to RPI ? |
I recieved my ZeroW and i'm following your guide to setup the key. I just had a look to vxWorks disassembly and I can only find references of EEM support. One question, can you argue on the need to set the filesystem in RO ? a comment indicates that the Rpi might reboot without notice. Why ? |
I don't have a log for how to mount NFS from vmWorks, I just remember that I've set up an NFS server on the RPi, and then mounted it on vxWorks using the appropriate commands. When that was done, I used the cp command to copy all the available files I could into the NFS server. And when I had a look at what I gathered, I could only find files that came from the update USB stick, so that was pointless after all ;) And yes, I tried the other USB networking gadgets and none of them worked, that's why I had to build EEM myself. About the RO filesystem: I found that the car shuts the 5V supply on the USB socket 1m30s after the engine is stopped, but there's no notice of this happening (I tried tcpdumping to see if the car sends any sort of message to the key to initiate a proper shutdown, but I couldn't see any). Also, during my debugging sessions I may have the need to pull the RPi quickly without having to SSH into it to power it off properly. So to avoid any corruption on the root FS which could make the RPi unable to boot, I simply turned it read-only, used tmpfs for working dirs, and one RW partition to store debugging data (tcpdump files, apache logs... nothing critical to boot). I provided the "remount" command which turns the root FS read-write, if needed. Don't forget to poweroff or reboot properly after using it to avoid problems, of course. |
Thanks for you feedback, I'll save a lot of time not testing other Ethernet models over USB. I'll build the module for the current kernel, and push it to your git, and try to play with DKMS. |
Funny thing, not so funny. |
You're right :) You cannot use both Mass Storage and EEM (even in composite mode it doesn't work). So if you want to switch between the two, you have to reset the USB gadget config. |
I did try to use Mass Storage only with this config :
But SMEG+ refuses to scan it for storage. |
This may work if you use You may want to investigate the Facedancer project also. |
If I understand correctly, dummy_hcd isn't a USB function for gadgets, but it allows to set up a fake USB host so you can try USB gadgets locally without having compatible hardware (i.e. a proper USB OTG interface). This is different from a fake USB hub gadget function that you can use to attach more than one (virtual) device to it. And I couldn't find that too. Also, when the original USB key was still working, I tried using a real USB hub with the PSA key and some flash stick, to see if I could use both, but it didn't work, even when powered externally (from the lighter socket). Maybe my hub was faulty, or the power supply I was using was not good enough (the PSA key needed some proper voltages to work), but I concluded that the car doesn't react if the "root device" is not what it's waiting for. |
SMEG Unit USB controller is very sensitive. You should not try to draw power from it. I'll definitely give a try to dummy_hcd. That sounds promising. I'm always pleased to realized how far we can go in linux kernel to simulate USB devices. Developping USB devices could be such a nightmare ! And when I did it, it was only about USB2 :) |
I see. Perhaps I misinterpreted it. I'll see it when I get to try.
That's well possible. Which exact hardware version do you have? As far as I read only the version with two USB ports may be able to do that. @bousqi Facedancer with the appropriate hardware is your best bet to get started quickly. |
Really? Mine has only one USB port, but the PSA key advertised a MaxPower of 500 mA on the USB bus, and I used a RPI0w and also an OrangePi (which I currently use) without any problem at all. My OrangePi even have an extra USB Wifi dongle (because the integrated Wifi controller is garbage) and a USB BT dongle for the OBD2 communication ;-) |
I don't know exactly which version I have. The upgrade screen tells me my hardware ID is 155. And I have only one USB port. |
Hi Mwyann,
I'm reaching you as I found your work on PSAKEY.
Have you ever tried to make a simple Wifi Hotspot with your CDC_EEM Usb Key (based on a RPI Zero) ?
Such hotspot would allow to easily connect a computer to SMEG+ telnet shell.
I'm currently playing a little bit with my SMEG+ unit in my car, trying to understand how it works.
You can find my actual work in my SMEG_PLUS repo.
My work is based on a Bluetooth link and replacing it by a wifi link would be better. I won't have to sit in the car to test few things.
I'm even thinking of a RPI Zero W that would feed last ZAR over wifi and replace EEM Gadget by a Mass Storage Gadget to automatically install it when available.
The text was updated successfully, but these errors were encountered: