GithubHelp home page GithubHelp logo

Comments (6)

JorgePe avatar JorgePe commented on July 21, 2024 1

OK, I'll try.

The problem with capturing is that I have to establish several sessions until one gets captured and even then just for a while so have to be quick. Not sure if it is a problem with my Android phone (I don't have an Android tablet with BLE), BOOST, my laptop or even ubertooth sniffer itself.

Will also give some whole capture files for everybody to look at it instead of just waiting for my findings.

I only capture late at night because it requires full attention so expect just a few captures each night.

from boostreveng.

JorgePe avatar JorgePe commented on July 21, 2024

OK, I got it.

motor A 50º at 100%:
0e:00:81:37:11:0b:32:00:00:00:64:64:7f:03
4th byte = 37h = motor A
7th byte = 32h = 50d
117th byte = 64h = 100d

motor A 1º at 100%:
0e:00:81:37:11:0b:01:00:00:00:64:64:7f:03

motor A 25º (19h) at 50% (32h):
0e:00:81:37:11:0b:19:00:00:00:32:64:7f:03

I can turn motor A by 1º at 100% duty cycle with:
gatttool -b 00:16:53:A4:CD:7E --char-write-req --handle=0x0e --value=0e008137110b0100000064647f03

Sorry but don't have capture files. Today I can't capture not even one initiall connection session. I'm at work (my first captures were at home and then I went on holidays) and there are a few laptops and smartphones around... I think my ubertooth sniffer needs a clean environment to work.

To get this captures I had to keep pressing the green start/run/play/whatever block until something was captured.

from boostreveng.

JorgePe avatar JorgePe commented on July 21, 2024

I tried to capture a long rotation command but cannot capture anything else and I'm getting warnings that battery is low (but it is not, at least the battery level shown when selecting the LEGO Move Hub is Full).

But the maximum angle that the App allows is 9999 or 27 full rotations and a bit more than 3/4 (9999 = 27x360+270+9 degrees) that will be 270Fh so only two bytes are needed.

from boostreveng.

helje5 avatar helje5 commented on July 21, 2024

I think @hobbyquaker got sniffing equipment as well now and may soon provide captures as well.

Wrt my original issue, I can do this know. The motor-angle notifications report the location of the motor, and you can simply rotate until you reach the desired state (w/ a low dutycycle to keep it precise). We have all that is necessary documented.

I'm keeping this issue open, since I still wonder whether there might be an additional "turn-to" packet in addition to the "turn-by" and "duration" ones we already have.

from boostreveng.

JorgePe avatar JorgePe commented on July 21, 2024

If such a command exists we need a block in the App to generate it for capture or keep trying issuing our own commands randomly.

But honestly I don't expect it. I don't see the BOOST designed as a robotic product. Perhaps things change and future firmware versions make me change my opinion.

from boostreveng.

glebreutov avatar glebreutov commented on July 21, 2024

Going through Lego BLE doc, and I think their "GotoAbsolutePosition" is just what you need.

Here is a quick example of command in Swift. Though, no guarantee that it works properly

    public let portId: PortId
    public let absPos: Int32

    public let speed: Int8
    public let maxPower: UInt8
    
    public init(portId: PortId, absPos: Int32, speed: Int8, maxPower: UInt8 = 100) {
        self.portId = portId
        self.absPos = absPos
        self.speed = speed
        self.maxPower = maxPower
    }
    
    public var data: Data {
        let speed = UInt8(bitPattern: self.speed)
        let degreeBytes = withUnsafeBytes(of: absPos.littleEndian, Array.init)

        var d = Data([0x09, 0x00, 0x81, portId, 0x11, 0x0D])
            d.append(contentsOf: degreeBytes)
            d.append(speed)
            d.append(maxPower)
            d.append(EndState.breakFlag.rawValue)
        return d
    }
    
}```

from boostreveng.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.